diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-01-13 10:25:50 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-01-13 10:25:50 +0100 |
commit | 279786e9875cc71c7bed1f78f8df1803be215904 (patch) | |
tree | a0cf52ffbff05aea3e6e1a80929fd265f0b2eefd /test/product_small.cpp | |
parent | ae4644cc6827bb1b6d654ceed8b3a0c256b1d173 (diff) |
Fix missing evaluator in outer-product
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 } |