fix SparseView: clean the nested matrix type

This commit is contained in:
Gael Guennebaud
2010-07-22 15:57:01 +02:00
parent 734469e43f
commit fa6d36e0f7
2 changed files with 14 additions and 2 deletions

View File

@@ -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()