diff --git a/test/nestbyvalue.cpp b/test/nestbyvalue.cpp index c5356bc24..3a86bea50 100644 --- a/test/nestbyvalue.cpp +++ b/test/nestbyvalue.cpp @@ -26,7 +26,7 @@ EIGEN_DECLARE_TEST(nestbyvalue) for(int i = 0; i < g_repeat; i++) { Index rows = internal::random(1,EIGEN_TEST_MAX_SIZE); Index cols = internal::random(1,EIGEN_TEST_MAX_SIZE); - MatrixXd a = MatrixXd(rows,cols); + MatrixXd a = MatrixXd::Random(rows,cols); nb_temporaries = 0; XprType x = get_xpr_with_temps(a); VERIFY_IS_EQUAL(nb_temporaries,6);