add unit tests for 0 matrix

This commit is contained in:
Gael Guennebaud
2010-07-15 20:00:50 +02:00
parent ec39a39cb6
commit c0a0d2d181
3 changed files with 26 additions and 9 deletions

View File

@@ -132,4 +132,10 @@ void test_lu()
CALL_SUBTEST( lu_invertible<MatrixXcf>() );
CALL_SUBTEST( lu_invertible<MatrixXcd>() );
}
MatrixXf m = MatrixXf::Zero(10,10);
VectorXf b = VectorXf::Zero(10);
VectorXf x = VectorXf::Random(10);
VERIFY(m.lu().solve(b,&x));
VERIFY(x.isZero());
}