aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/adjoint.cpp
diff options
context:
space:
mode:
authorGravatar Luke Iwanski <luke@codeplay.com>2016-09-19 14:03:54 +0100
committerGravatar Luke Iwanski <luke@codeplay.com>2016-09-19 14:03:54 +0100
commitb91e0211727b9ea5d7c30908ed86afc4e50d4c6c (patch)
tree4dd857d1aabdd4065e8b7dec1369a4bd06bac5e7 /test/adjoint.cpp
parentcb81975714a96ecb2faf33ca242feeee3543b1db (diff)
parentff47717f25aeede4878f65b214cdce264b8314e8 (diff)
Merged with default.
Diffstat (limited to 'test/adjoint.cpp')
-rw-r--r--test/adjoint.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp
index 9c895e0ac..bdea51c10 100644
--- a/test/adjoint.cpp
+++ b/test/adjoint.cpp
@@ -169,7 +169,7 @@ void test_adjoint()
// test a large static matrix only once
CALL_SUBTEST_7( adjoint(Matrix<float, 100, 100>()) );
-#ifdef EIGEN_TEST_PART_4
+#ifdef EIGEN_TEST_PART_13
{
MatrixXcf a(10,10), b(10,10);
VERIFY_RAISES_ASSERT(a = a.transpose());
@@ -187,6 +187,13 @@ void test_adjoint()
a.transpose() = a.adjoint();
a.transpose() += a.adjoint();
a.transpose() += a.adjoint() + b;
+
+ // regression tests for check_for_aliasing
+ MatrixXd c(10,10);
+ c = 1.0 * MatrixXd::Ones(10,10) + c;
+ c = MatrixXd::Ones(10,10) * 1.0 + c;
+ c = c + MatrixXd::Ones(10,10) .cwiseProduct( MatrixXd::Zero(10,10) );
+ c = MatrixXd::Ones(10,10) * MatrixXd::Zero(10,10);
}
#endif
}