add regression test for aliasing in product rewritting

This commit is contained in:
Gael Guennebaud 2017-06-09 12:54:40 +02:00
parent 8640093af1
commit 723a59ac26

View File

@ -216,6 +216,8 @@ template<typename MatrixType> void product(const MatrixType& m)
// CwiseBinaryOp
VERIFY_IS_APPROX(x = y + A*x, A*z);
x = z;
VERIFY_IS_APPROX(x = y - A*x, A*(-z));
x = z;
// CwiseUnaryOp
VERIFY_IS_APPROX(x = Scalar(1.)*(A*x), A*z);
}