diff --git a/sparse/unit_test/Test_Sparse_TestUtils_RandCsMat.hpp b/sparse/unit_test/Test_Sparse_TestUtils_RandCsMat.hpp index 32a11d0a12..f85962acd6 100644 --- a/sparse/unit_test/Test_Sparse_TestUtils_RandCsMat.hpp +++ b/sparse/unit_test/Test_Sparse_TestUtils_RandCsMat.hpp @@ -19,11 +19,10 @@ namespace Test { template void doCsMat(size_t m, size_t n, ScalarType min_val, ScalarType max_val) { - using RandCs = RandCsMatrix; - using ordinal_type = typename RandCs::ordinal_type; - using size_type = typename RandCs::size_type; - auto expected_min = ScalarType(1.0); - ordinal_type expected_nnz = 0; + using RandCs = RandCsMatrix; + using size_type = typename RandCs::size_type; + auto expected_min = ScalarType(1.0); + size_type expected_nnz = 0; RandCs cm(m, n, min_val, max_val); for (size_type i = 0; i < cm.get_nnz(); ++i) ASSERT_GE(cm(i), expected_min) << cm.info; @@ -39,7 +38,7 @@ void doCsMat(size_t m, size_t n, ScalarType min_val, ScalarType max_val) { int64_t col_start = j < static_cast(m) ? map(j) : 0; ASSERT_FLOAT_EQ(cm(col_start + i), cm(expected_nnz + i)) << cm.info; } - expected_nnz += col_len; + expected_nnz += size_type(col_len); } ASSERT_EQ(cm.get_nnz(), expected_nnz) << cm.info;