diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-11-08 18:40:22 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-11-08 18:40:22 +0100 |
commit | f62a0f69c638b962082fea11bb143e92aa01f3d9 (patch) | |
tree | 5517c72b5952bcacfea25ea89645d2769af4682d /test/indexed_view.cpp | |
parent | bf495859ff0b47a4cbc0aed85c1f2ca14b9058ed (diff) |
Fix max-size in indexed-view
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r-- | test/indexed_view.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp index 8ede612d1..6518642df 100644 --- a/test/indexed_view.cpp +++ b/test/indexed_view.cpp @@ -408,6 +408,13 @@ void check_indexed_view() VERIFY_IS_EQUAL( A(i,i), A.coeff(i_sizet, i_short) ); VERIFY_IS_EQUAL( A(i,i), A.coeff(5, i_sizet) ); + // Regression test for Max{Rows,Cols}AtCompileTime + { + Matrix3i A3 = Matrix3i::Random(); + ArrayXi ind(5); ind << 1,1,1,1,1; + VERIFY_IS_EQUAL( A3(ind,ind).eval(), MatrixXi::Constant(5,5,A3(1,1)) ); + } + } EIGEN_DECLARE_TEST(indexed_view) |