aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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()