bugfix for a = a * b; when a has to be resized

This commit is contained in:
Gael Guennebaud
2009-07-20 10:35:47 +02:00
parent 32b08ac971
commit a551107cce
2 changed files with 25 additions and 2 deletions

View File

@@ -42,4 +42,10 @@ void test_product_large()
m = (v+v).asDiagonal() * m;
VERIFY_IS_APPROX(m, MatrixXf::Constant(N,3,2));
}
{
// test deferred resizing in Matrix::operator=
MatrixXf a = MatrixXf::Random(10,4), b = MatrixXf::Random(4,10), c = a;
VERIFY_IS_APPROX((a = a * b), (c * b).eval());
}
}