MCPcopy Create free account
hub / github.com/ArashPartow/exprtk / run_test16

Function run_test16

exprtk_test.cpp:5880–6015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5878
5879template <typename T>
5880bool run_test16()
5881{
5882 typedef exprtk::expression<T> expression_t;
5883
5884 T x = T(1.1);
5885 T y = T(2.2);
5886 T z = T(3.3);
5887 T w = T(4.4);
5888 T u = T(5.5);
5889
5890 test_func0<T> test_func00;
5891 test_func1<T> test_func01;
5892 test_func2<T> test_func02;
5893 test_func3<T> test_func03;
5894 test_func4<T> test_func04;
5895 test_func5<T> test_func05;
5896
5897 exprtk::symbol_table<T> symbol_table;
5898 symbol_table.add_constants();
5899 symbol_table.add_variable("x",x);
5900 symbol_table.add_variable("y",y);
5901 symbol_table.add_variable("z",z);
5902 symbol_table.add_variable("w",w);
5903 symbol_table.add_variable("u",u);
5904
5905 symbol_table.add_function("test_func0",test_func00);
5906 symbol_table.add_function("test_func1",test_func01);
5907 symbol_table.add_function("test_func2",test_func02);
5908 symbol_table.add_function("test_func3",test_func03);
5909 symbol_table.add_function("test_func4",test_func04);
5910 symbol_table.add_function("test_func5",test_func05);
5911
5912 static const std::string expr_str_list[] =
5913 {
5914 "test_func0 = test_func0()",
5915 "test_func0 == test_func0()",
5916 "equal(1.1 + test_func0,test_func0() + 1.1)",
5917 "equal(test_func0 + 1.1,1.1 + test_func0())",
5918 "equal((1.1 + test_func0),(test_func0() + 1.1))",
5919 "equal((test_func0 + 1.1),(1.1 + test_func0()))",
5920 "equal(test_func0,test_func0())",
5921 "equal(test_func0,1.1234)",
5922 "equal(test_func0(),1.1234)",
5923 "equal(test_func0 + test_func0(),2 * 1.1234)",
5924 "equal((test_func0 + test_func0()),2 * 1.1234)",
5925 "equal((test_func0) + (test_func0()),2 * 1.1234)",
5926 "equal(test_func1(x),(x))",
5927 "equal(test_func2(x,y),(x + y))",
5928 "equal(test_func3(x,y,z),(x + y + z))",
5929 "equal(test_func4(x,y,z,w),(x + y + z + w))",
5930 "equal(test_func5(x,y,z,w,u),(x + y + z + w + u))",
5931 "equal(1.1 + test_func0,1.1234 + 1.1)",
5932 "equal(1.1 + test_func0(),1.1234 + 1.1)",
5933 "equal(1.1 + test_func1(x),(x + 1.1))",
5934 "equal(1.1 + test_func2(x,y),(x + y + 1.1))",
5935 "equal(1.1 + test_func3(x,y,z),(x + y + z + 1.1))",
5936 "equal(1.1 + test_func4(x,y,z,w),(x + y + z + w + 1.1))",
5937 "equal(1.1 + test_func5(x,y,z,w,u),(x + y + z + w + u + 1.1))",

Callers

nothing calls this directly

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected