diff options
Diffstat (limited to 'test/sparse_basic.cpp')
-rw-r--r-- | test/sparse_basic.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp index 3ebd59294..8c93909c6 100644 --- a/test/sparse_basic.cpp +++ b/test/sparse_basic.cpp @@ -250,6 +250,13 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re VERIFY(countTrueNonZero==m2.nonZeros()); VERIFY_IS_APPROX(m2, refM2); } + + // test sparseView + { + DenseMatrix refMat2 = DenseMatrix::Zero(rows, rows); + SparseMatrixType m2(rows, rows); + VERIFY_IS_APPROX(m2.eval(), refMat2.sparseView().eval()); + } } void test_sparse_basic() |