[poincare] Store: add tests on composed functions

This commit is contained in:
Émilie Feral
2018-11-16 14:06:37 +01:00
parent 55048ab907
commit dd4a83fc59

View File

@@ -199,6 +199,12 @@ QUIZ_CASE(poincare_store_composed_functions) {
assert_parsed_expression_evaluates_to<double>("g(3)+[[1]]", "[[18]]");
assert_parsed_expression_evaluates_to<double>("g(5)", "45");
// g: x->x+1
assert_simplify("x+1>g(x)");
assert_parsed_expression_evaluates_to<double>("f(g(4))", "25");
// Add a matrix to bypass simplification
assert_parsed_expression_evaluates_to<double>("f(g(4))+[[1]]", "[[26]]");
// Clean the storage for other tests
Ion::Storage::sharedStorage()->recordNamed("f.func").destroy();
Ion::Storage::sharedStorage()->recordNamed("g.func").destroy();