From bc1020185407a324be81f613d88ce4b162f6774d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 24 Jan 2017 16:27:51 +0100 Subject: Add test for multiple symbols --- test/symbolic_index.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/symbolic_index.cpp') 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; + struct y_tag {}; static const Symbolic::SymbolExpr y; + struct z_tag {}; static const Symbolic::SymbolExpr 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() -- cgit v1.2.3