commit | a915f0292ee8a4db2731638376ed0a55ca6930e4 | [log] [tgz] |
---|---|---|
author | Gael Guennebaud <g.gael@free.fr> | Fri Jun 28 16:16:02 2013 +0200 |
committer | Gael Guennebaud <g.gael@free.fr> | Fri Jun 28 16:16:02 2013 +0200 |
tree | 03af5fa1341ccdca17677ad9636696d81360fbbf | |
parent | 4cf742525f47129878fe561f56be9bd6ec83feb1 [diff] [blame] |
Fix bug #626: add assertion on input ranges for coeff* and insert members for sparse objects
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp index 6954ba7..8fc1904 100644 --- a/test/sparse_basic.cpp +++ b/test/sparse_basic.cpp
@@ -91,6 +91,10 @@ 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)