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

@@ -75,4 +75,11 @@ void test_qr()
mat << 1, 1, 1, 2, 2, 2, 1, 2, 3;
VERIFY(!mat.qr().isFullRank());
}
{
MatrixXf m = MatrixXf::Zero(10,10);
VectorXf b = VectorXf::Zero(10);
VectorXf x = VectorXf::Random(10);
VERIFY(m.qr().solve(b,&x));
VERIFY(x.isZero());
}
}