aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/product.cpp18
-rw-r--r--test/triangular.cpp4
2 files changed, 13 insertions, 9 deletions
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<float, 1, 1>());
+ product(Matrix<float, 3, 3>());
+ product(Matrix<float, 4, 2>());
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<int>(1,320);
+ int cols = ei_random<int>(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<typename MatrixType> 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