From 4811b4526c93f4f28c57a085ee02b0eba0806afa Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 9 Jun 2013 23:30:04 +0200 Subject: Add regression test for bug #608 --- test/cholesky.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'test/cholesky.cpp') diff --git a/test/cholesky.cpp b/test/cholesky.cpp index ca7ecb1f4..a3b16bfc2 100644 --- a/test/cholesky.cpp +++ b/test/cholesky.cpp @@ -268,10 +268,18 @@ template void cholesky_indefinite(const MatrixType& m) { eigen_assert(m.rows() == 2 && m.cols() == 2); MatrixType mat; - mat << 1, 0, 0, -1; - LDLT ldlt(mat); - VERIFY(!ldlt.isNegative()); - VERIFY(!ldlt.isPositive()); + { + mat << 1, 0, 0, -1; + LDLT ldlt(mat); + VERIFY(!ldlt.isNegative()); + VERIFY(!ldlt.isPositive()); + } + { + mat << 1, 2, 2, 1; + LDLT ldlt(mat); + VERIFY(!ldlt.isNegative()); + VERIFY(!ldlt.isPositive()); + } } template void cholesky_verify_assert() -- cgit v1.2.3