diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-01-24 16:27:51 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-01-24 16:27:51 +0100 |
commit | bc1020185407a324be81f613d88ce4b162f6774d (patch) | |
tree | c091d8668fb14a357eae6f9f5ca74d4aa91a0a06 /test/symbolic_index.cpp | |
parent | c43d254d1376c24c76df45bb274dda74ddfa2e19 (diff) |
Add test for multiple symbols
Diffstat (limited to 'test/symbolic_index.cpp')
-rw-r--r-- | test/symbolic_index.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/symbolic_index.cpp b/test/symbolic_index.cpp index 83f105cb8..1db85144b 100644 --- a/test/symbolic_index.cpp +++ b/test/symbolic_index.cpp @@ -85,6 +85,16 @@ void check_symbolic_index() VERIFY_IS_EQUAL( ( -last*end ).eval(last=size-1), -(size-1)*size ); VERIFY_IS_EQUAL( ( end-3*last ).eval(last=size-1), size- 3*(size-1) ); VERIFY_IS_EQUAL( ( (end-3*last)/end ).eval(last=size-1), (size- 3*(size-1))/size ); + +#if EIGEN_HAS_CXX14 + { + struct x_tag {}; static const Symbolic::SymbolExpr<x_tag> x; + struct y_tag {}; static const Symbolic::SymbolExpr<y_tag> y; + struct z_tag {}; static const Symbolic::SymbolExpr<z_tag> z; + + VERIFY_IS_APPROX( int(((x+3)/y+z).eval(x=6,y=3,z=-13)), (6+3)/3+(-13) ); + } +#endif } void test_symbolic_index() |