From d06a753d1017255f2a10a5b00a830865c30fe4df Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Tue, 22 May 2018 20:29:17 +0200 Subject: [PATCH] Make qr_fullpivoting unit test run for fixed-sized matrices --- test/qr_fullpivoting.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/qr_fullpivoting.cpp b/test/qr_fullpivoting.cpp index 70e89c198..3d9accea6 100644 --- a/test/qr_fullpivoting.cpp +++ b/test/qr_fullpivoting.cpp @@ -15,11 +15,12 @@ template void qr() { typedef typename MatrixType::Index Index; + static const int Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime; Index max_size = EIGEN_TEST_MAX_SIZE; Index min_size = numext::maxi(1,EIGEN_TEST_MAX_SIZE/10); - Index rows = internal::random(min_size,max_size), - cols = internal::random(min_size,max_size), - cols2 = internal::random(min_size,max_size), + Index rows = Rows == Dynamic ? internal::random(min_size,max_size) : Rows, + cols = Cols == Dynamic ? internal::random(min_size,max_size) : Cols, + cols2 = Cols == Dynamic ? internal::random(min_size,max_size) : Cols, rank = internal::random(1, (std::min)(rows, cols)-1); typedef typename MatrixType::Scalar Scalar; @@ -128,9 +129,10 @@ template void qr_verify_assert() void test_qr_fullpivoting() { - for(int i = 0; i < 1; i++) { - // FIXME : very weird bug here -// CALL_SUBTEST(qr(Matrix2f()) ); + for(int i = 0; i < 1; i++) { + CALL_SUBTEST_5( qr() ); + CALL_SUBTEST_6( qr() ); + CALL_SUBTEST_8( qr() ); CALL_SUBTEST_1( qr() ); CALL_SUBTEST_2( qr() ); CALL_SUBTEST_3( qr() );