aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/indexed_view.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-01-09 23:42:16 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-01-09 23:42:16 +0100
commitb50c3e967e1676f248c93c1a79e6574ae746e2fd (patch)
tree04dbf025bfdb58a51ed2a1667fcbff0d9ee24ec8 /test/indexed_view.cpp
parent68064e14fac8c72c05faaeff98c1b70e2dae6ee7 (diff)
Add a minimalistic symbolic scalar type with expression template and make use of it to define the last placeholder and to unify the return type of seq and seqN.
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r--test/indexed_view.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp
index 23ad2d743..25a25499c 100644
--- a/test/indexed_view.cpp
+++ b/test/indexed_view.cpp
@@ -139,6 +139,11 @@ void check_indexed_view()
VERIFY_IS_EQUAL( (A(eii, eii)).InnerStrideAtCompileTime, 0);
VERIFY_IS_EQUAL( (A(eii, eii)).OuterStrideAtCompileTime, 0);
+ VERIFY_IS_APPROX( A(seq(n-1,2,-2), seqN(n-1-6,4)), A(seq(last,2,-2), seqN(last-6,4)) );
+ VERIFY_IS_APPROX( A(seq(n-1-6,n-1-2), seqN(n-1-6,4)), A(seq(last-6,last-2), seqN(6+last-6-6,4)) );
+ VERIFY_IS_APPROX( A(seq((n-1)/2,(n)/2+3), seqN(2,4)), A(seq(last/2,(last+1)/2+3), seqN(last+2-last,4)) );
+ VERIFY_IS_APPROX( A(seq(n-2,2,-2), seqN(n-8,4)), A(seq(end-2,2,-2), seqN(end-8,4)) );
+
#if EIGEN_HAS_CXX11
VERIFY( (A(all, std::array<int,4>{{1,3,2,4}})).ColsAtCompileTime == 4);