aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_basic.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-06-10 10:34:03 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-06-10 10:34:03 +0200
commit47e89026d0a94800ca6b20226e6e44927b5b7bc8 (patch)
treefa2ac8b90e82a2d7fd1821f1c261ef576b6fac3e /test/sparse_basic.cpp
parente8c963568cd70c525234b283d15b0653114a93f4 (diff)
Check sparse matrices with short indices
Diffstat (limited to 'test/sparse_basic.cpp')
-rw-r--r--test/sparse_basic.cpp11
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)) ));
}
}