Fix inverse unit test making sure we try to invert an invertible matrix

This commit is contained in:
Gael Guennebaud 2014-09-14 20:12:07 +02:00
parent c83e01f2d6
commit 0403d49006

View File

@ -73,6 +73,7 @@ template<typename MatrixType> void inverse(const MatrixType& m)
{
Matrix<Scalar, MatrixType::RowsAtCompileTime+1, MatrixType::RowsAtCompileTime+1, MatrixType::Options> m3;
m3.setRandom();
m3.topLeftCorner(rows,rows) = m1;
m2 = m3.template topLeftCorner<MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime>().inverse();
VERIFY_IS_APPROX( (m3.template topLeftCorner<MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime>()), m2.inverse() );
}