aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/qr_colpivoting.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-06-26 16:22:49 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-06-26 16:22:49 +0200
commit392a30db824161a0466f7970e12e5a48ed05ebd9 (patch)
treef06e75bd415b18e5fba931bcb492c0d0953a9e3e /test/qr_colpivoting.cpp
parentc911fc8dee71809c7b6a3e60e4a582ac6da37815 (diff)
Use VERIFY_IS_EQUAL instead of VERIFY(a==b) to get more feedback in case of failure
Diffstat (limited to 'test/qr_colpivoting.cpp')
-rw-r--r--test/qr_colpivoting.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp
index eb3feac01..e7abd3725 100644
--- a/test/qr_colpivoting.cpp
+++ b/test/qr_colpivoting.cpp
@@ -23,8 +23,8 @@ template<typename MatrixType> void qr()
MatrixType m1;
createRandomPIMatrixOfRank(rank,rows,cols,m1);
ColPivHouseholderQR<MatrixType> qr(m1);
- VERIFY(rank == qr.rank());
- VERIFY(cols - qr.rank() == qr.dimensionOfKernel());
+ VERIFY_IS_EQUAL(rank, qr.rank());
+ VERIFY_IS_EQUAL(cols - qr.rank(), qr.dimensionOfKernel());
VERIFY(!qr.isInjective());
VERIFY(!qr.isInvertible());
VERIFY(!qr.isSurjective());
@@ -51,11 +51,11 @@ template<typename MatrixType, int Cols2> void qr_fixedsize()
Matrix<Scalar,Rows,Cols> m1;
createRandomPIMatrixOfRank(rank,Rows,Cols,m1);
ColPivHouseholderQR<Matrix<Scalar,Rows,Cols> > qr(m1);
- VERIFY(rank == qr.rank());
- VERIFY(Cols - qr.rank() == qr.dimensionOfKernel());
- VERIFY(qr.isInjective() == (rank == Rows));
- VERIFY(qr.isSurjective() == (rank == Cols));
- VERIFY(qr.isInvertible() == (qr.isInjective() && qr.isSurjective()));
+ VERIFY_IS_EQUAL(rank, qr.rank());
+ VERIFY_IS_EQUAL(Cols - qr.rank(), qr.dimensionOfKernel());
+ VERIFY_IS_EQUAL(qr.isInjective(), (rank == Rows));
+ VERIFY_IS_EQUAL(qr.isSurjective(), (rank == Cols));
+ VERIFY_IS_EQUAL(qr.isInvertible(), (qr.isInjective() && qr.isSurjective()));
Matrix<Scalar,Rows,Cols> r = qr.matrixQR().template triangularView<Upper>();
Matrix<Scalar,Rows,Cols> c = qr.householderQ() * r * qr.colsPermutation().inverse();