aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/product_extra.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-09-29 21:00:13 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-09-29 21:00:13 -0400
commit4b04a9bcfa1e55a00053588b6a50bb000af2d044 (patch)
tree180e88d009efd4ffeb9d4902658cbd83b795f54d /test/product_extra.cpp
parentfa65b0966133d7feeea5ba6e6671e6a5f6a19a6a (diff)
*add test to prevent future regression
Diffstat (limited to 'test/product_extra.cpp')
-rw-r--r--test/product_extra.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/product_extra.cpp b/test/product_extra.cpp
index 3ad99fc7a..a67e755d2 100644
--- a/test/product_extra.cpp
+++ b/test/product_extra.cpp
@@ -115,6 +115,10 @@ template<typename MatrixType> void product_extra(const MatrixType& m)
VERIFY_IS_APPROX(m1.col(j2).adjoint() * m1.block(0,j,m1.rows(),c), m1.col(j2).adjoint().eval() * m1.block(0,j,m1.rows(),c).eval());
VERIFY_IS_APPROX(m1.block(i,0,r,m1.cols()) * m1.row(i2).adjoint(), m1.block(i,0,r,m1.cols()).eval() * m1.row(i2).adjoint().eval());
+ // test (outer_product) * vector with and without temporary
+ ColVectorType vc3 = ColVectorType::Random(cols), vc4 = ColVectorType::Random(cols);
+ vcres = (vc2 * vc3.transpose()) * vc4; // without temporary
+ VERIFY_IS_APPROX(vcres, (vc2 * vc3.transpose()).eval() * vc4);
}
void test_product_extra()