diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-07-03 07:37:12 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-07-03 08:13:09 +0200 |
commit | 88534ba623421c956d8ffcda2d27f41d704d15ef (patch) | |
tree | fccc55245aec3f7381cd525a1355568e10ea37f4 /eigen/test/array_for_matrix.cpp | |
parent | 3ee09beb3f0458fbeb0b0e816f854b9d5b406e6b (diff) |
update eigen
Diffstat (limited to 'eigen/test/array_for_matrix.cpp')
-rw-r--r-- | eigen/test/array_for_matrix.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/eigen/test/array_for_matrix.cpp b/eigen/test/array_for_matrix.cpp index c150194..b872139 100644 --- a/eigen/test/array_for_matrix.cpp +++ b/eigen/test/array_for_matrix.cpp @@ -235,12 +235,31 @@ template<typename MatrixTraits> void resize(const MatrixTraits& t) VERIFY(a1.size()==cols); } +template<int> void regression_bug_654() { ArrayXf a = RowVectorXf(3); VectorXf v = Array<float,1,Dynamic>(3); } +// Check propagation of LvalueBit through Array/Matrix-Wrapper +template<int> +void regrrssion_bug_1410() +{ + const Matrix4i M; + const Array4i A; + ArrayWrapper<const Matrix4i> MA = M.array(); + MA.row(0); + MatrixWrapper<const Array4i> AM = A.matrix(); + AM.row(0); + + VERIFY((internal::traits<ArrayWrapper<const Matrix4i> >::Flags&LvalueBit)==0); + VERIFY((internal::traits<MatrixWrapper<const Array4i> >::Flags&LvalueBit)==0); + + VERIFY((internal::traits<ArrayWrapper<Matrix4i> >::Flags&LvalueBit)==LvalueBit); + VERIFY((internal::traits<MatrixWrapper<Array4i> >::Flags&LvalueBit)==LvalueBit); +} + void test_array_for_matrix() { for(int i = 0; i < g_repeat; i++) { @@ -280,5 +299,6 @@ void test_array_for_matrix() CALL_SUBTEST_5( resize(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) ); CALL_SUBTEST_6( resize(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) ); } - CALL_SUBTEST_6( regression_bug_654() ); + CALL_SUBTEST_6( regression_bug_654<0>() ); + CALL_SUBTEST_6( regrrssion_bug_1410<0>() ); } |