From a551107ccea8fe027d2672cb82f6b70e741bb996 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 20 Jul 2009 10:35:47 +0200 Subject: bugfix for a = a * b; when a has to be resized --- test/product_large.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/product_large.cpp') diff --git a/test/product_large.cpp b/test/product_large.cpp index 77ae7b587..9b53e7b89 100644 --- a/test/product_large.cpp +++ b/test/product_large.cpp @@ -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()); + } } -- cgit v1.2.3