aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/indexed_view.cpp
diff options
context:
space:
mode:
authorGravatar Christopher Moore <crmoore@gmail.com>2020-05-13 19:24:42 +0000
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2020-05-13 19:24:42 +0000
commita187ffea28f04238e1a0b05ae76e9cc9d19d5f6c (patch)
treee404d8eb30913dd016c57b4ab6914b436af38c8b /test/indexed_view.cpp
parentba9d18b9388acdf27a3900a4f981fab587e59b0c (diff)
Resolve "IndexedView of a vector should allow linear access"
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r--test/indexed_view.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp
index 272b6087b..1dff972d2 100644
--- a/test/indexed_view.cpp
+++ b/test/indexed_view.cpp
@@ -429,6 +429,16 @@ void check_indexed_view()
A(all, eii).col(0) = A.col(eii(0));
}
+ // bug 1815: IndexedView should allow linear access
+ {
+ VERIFY( MATCH( b(eii)(0), "3" ) );
+ VERIFY( MATCH( a(eii)(0), "3" ) );
+ VERIFY( MATCH( A(1,eii)(0), "103"));
+ VERIFY( MATCH( A(eii,1)(0), "301"));
+ VERIFY( MATCH( A(1,all)(1), "101"));
+ VERIFY( MATCH( A(all,1)(1), "101"));
+ }
+
}
EIGEN_DECLARE_TEST(indexed_view)