aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_basic.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-07-22 15:57:01 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-07-22 15:57:01 +0200
commitfa6d36e0f7453397627b5dd82acb64922b977686 (patch)
tree43691887912b5c0be82d1aac2b52558963ff75d8 /test/sparse_basic.cpp
parent734469e43f37839f179a9f12915889f3df89d477 (diff)
fix SparseView: clean the nested matrix type
Diffstat (limited to 'test/sparse_basic.cpp')
-rw-r--r--test/sparse_basic.cpp7
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()