From 4b04a9bcfa1e55a00053588b6a50bb000af2d044 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 29 Sep 2009 21:00:13 -0400 Subject: *add test to prevent future regression --- test/product_extra.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/product_extra.cpp') 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 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() -- cgit v1.2.3