Extend qr unit test

This commit is contained in:
Gael Guennebaud
2014-07-21 11:45:54 +02:00
parent 50eef6dfc3
commit 946b99dd5c
2 changed files with 7 additions and 3 deletions

View File

@@ -40,7 +40,11 @@ template<typename MatrixType> void qr()
MatrixType c = qr.matrixQ() * r * qr.colsPermutation().inverse();
VERIFY_IS_APPROX(m1, c);
// stress the ReturnByValue mechanism
MatrixType tmp;
VERIFY_IS_APPROX(tmp.noalias() = qr.matrixQ() * r, (qr.matrixQ() * r).eval());
MatrixType m2 = MatrixType::Random(cols,cols2);
MatrixType m3 = m1*m2;
m2 = MatrixType::Random(cols,cols2);