aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_basic.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-06-28 16:16:02 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-06-28 16:16:02 +0200
commita915f0292ee8a4db2731638376ed0a55ca6930e4 (patch)
tree03af5fa1341ccdca17677ad9636696d81360fbbf /test/sparse_basic.cpp
parent4cf742525f47129878fe561f56be9bd6ec83feb1 (diff)
Fix bug #626: add assertion on input ranges for coeff* and insert members for sparse objects
Diffstat (limited to 'test/sparse_basic.cpp')
-rw-r--r--test/sparse_basic.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp
index 6954ba7f9..8fc1904b1 100644
--- a/test/sparse_basic.cpp
+++ b/test/sparse_basic.cpp
@@ -91,6 +91,10 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
VERIFY_IS_APPROX(m.row(r) + m.row(r), refMat.row(r) + refMat.row(r));
}
*/
+
+ // test assertion
+ VERIFY_RAISES_ASSERT( m.coeffRef(-1,1) = 0 );
+ VERIFY_RAISES_ASSERT( m.coeffRef(0,m.cols()) = 0 );
}
// test insert (inner random)