Fix bug #626: add assertion on input ranges for coeff* and insert members for sparse objects

This commit is contained in:
Gael Guennebaud
2013-06-28 16:16:02 +02:00
parent 4cf742525f
commit a915f0292e
3 changed files with 25 additions and 4 deletions

View File

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