diff options
Diffstat (limited to 'test/product_small.cpp')
-rw-r--r-- | test/product_small.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/product_small.cpp b/test/product_small.cpp index 8b132abb6..091955a0f 100644 --- a/test/product_small.cpp +++ b/test/product_small.cpp @@ -9,6 +9,7 @@ #define EIGEN_NO_STATIC_ASSERT #include "product.h" +#include <Eigen/LU> // regression test for bug 447 void product1x1() @@ -46,5 +47,14 @@ void test_product_small() Vector3f v = Vector3f::Random(); VERIFY_IS_APPROX( (v * v.transpose()) * v, (v * v.transpose()).eval() * v); } + + { + // regression test for pull-request #93 + Eigen::Matrix<double, 1, 1> A; A.setRandom(); + Eigen::Matrix<double, 18, 1> B; B.setRandom(); + Eigen::Matrix<double, 1, 18> C; C.setRandom(); + VERIFY_IS_APPROX(B * A.inverse(), B * A.inverse()[0]); + VERIFY_IS_APPROX(A.inverse() * C, A.inverse()[0] * C); + } #endif } |