diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-06-10 10:34:03 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-06-10 10:34:03 +0200 |
commit | 47e89026d0a94800ca6b20226e6e44927b5b7bc8 (patch) | |
tree | fa2ac8b90e82a2d7fd1821f1c261ef576b6fac3e /test | |
parent | e8c963568cd70c525234b283d15b0653114a93f4 (diff) |
Check sparse matrices with short indices
Diffstat (limited to 'test')
-rw-r--r-- | test/sparse_basic.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp index c573ae517..ad06e87ba 100644 --- a/test/sparse_basic.cpp +++ b/test/sparse_basic.cpp @@ -179,16 +179,16 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re m3.insertByOuterInner(j,k) = k+1; for(int j=0; j<rows; ++j) { - VERIFY(j==internal::real(m3.innerVector(j).nonZeros())); + VERIFY(j==math::real(m3.innerVector(j).nonZeros())); if(j>0) - VERIFY(j==internal::real(m3.innerVector(j).lastCoeff())); + VERIFY(j==math::real(m3.innerVector(j).lastCoeff())); } m3.makeCompressed(); for(int j=0; j<rows; ++j) { - VERIFY(j==internal::real(m3.innerVector(j).nonZeros())); + VERIFY(j==math::real(m3.innerVector(j).nonZeros())); if(j>0) - VERIFY(j==internal::real(m3.innerVector(j).lastCoeff())); + VERIFY(j==math::real(m3.innerVector(j).lastCoeff())); } //m2.innerVector(j0) = 2*m2.innerVector(j1); @@ -467,5 +467,8 @@ void test_sparse_basic() CALL_SUBTEST_1(( sparse_basic(SparseMatrix<double>(s, s)) )); CALL_SUBTEST_1(( sparse_basic(SparseMatrix<double,ColMajor,long int>(s, s)) )); CALL_SUBTEST_1(( sparse_basic(SparseMatrix<double,RowMajor,long int>(s, s)) )); + + CALL_SUBTEST_1(( sparse_basic(SparseMatrix<double,ColMajor,short int>(s, s)) )); + CALL_SUBTEST_1(( sparse_basic(SparseMatrix<double,RowMajor,short int>(s, s)) )); } } |