diff --git a/test/product.cpp b/test/product.cpp index 782be8f82..6fdca2cda 100644 --- a/test/product.cpp +++ b/test/product.cpp @@ -95,15 +95,19 @@ void EigenTest::testProduct() { for(int i = 0; i < m_repeat; i++) { product(Matrix()); + product(Matrix()); + product(Matrix()); product(Matrix4d()); - product(MatrixXcf(3, 3)); - product(MatrixXf(13, 25)); - product(MatrixXi(4, 4)); - product(MatrixXcd(20, 20)); } - - // test a large matrix only once - product(MatrixXf(100,100)); + for(int i = 0; i < m_repeat; i++) { + int rows = ei_random(1,320); + int cols = ei_random(1,320); + product(MatrixXf(rows, cols)); + product(MatrixXd(rows, cols)); + product(MatrixXi(rows, cols)); + product(MatrixXcf(rows, cols)); + product(MatrixXcd(rows, cols)); + } } } // namespace Eigen diff --git a/test/triangular.cpp b/test/triangular.cpp index 3b26e246f..985c6aacd 100644 --- a/test/triangular.cpp +++ b/test/triangular.cpp @@ -70,13 +70,13 @@ template void triangular(const MatrixType& m) // test overloaded operator= m1.setZero(); - m1.upper() = m2.transpose() * m2; + m1.upper() = (m2.transpose() * m2).lazy(); m3 = m2.transpose() * m2; VERIFY_IS_APPROX(m3.lower().transpose(), m1); // test overloaded operator= m1.setZero(); - m1.lower() = m2.transpose() * m2; + m1.lower() = (m2.transpose() * m2).lazy(); VERIFY_IS_APPROX(m3.lower(), m1); // test back and forward subsitution