From b50c3e967e1676f248c93c1a79e6574ae746e2fd Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 9 Jan 2017 23:42:16 +0100 Subject: 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. --- test/indexed_view.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/indexed_view.cpp') 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{{1,3,2,4}})).ColsAtCompileTime == 4); -- cgit v1.2.3