mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[test] Fix tests for no symbolic computation
This commit is contained in:
@@ -93,9 +93,9 @@ QUIZ_CASE(calculation_display_exact_approximate) {
|
||||
assertCalculationDisplay("1/2", false, false, ::Calculation::Calculation::EqualSign::Equal, nullptr, nullptr, &globalContext, &store);
|
||||
assertCalculationDisplay("1/3", false, false, ::Calculation::Calculation::EqualSign::Approximation, nullptr, nullptr, &globalContext, &store);
|
||||
assertCalculationDisplay("1/0", true, false, ::Calculation::Calculation::EqualSign::Unknown, "undef", "undef", &globalContext, &store);
|
||||
assertCalculationDisplay("2x-x", true, false, ::Calculation::Calculation::EqualSign::Unknown, "x", "undef", &globalContext, &store);
|
||||
assertCalculationDisplay("2x-x", true, false, ::Calculation::Calculation::EqualSign::Unknown, "undef", "undef", &globalContext, &store);
|
||||
assertCalculationDisplay("[[1,2,3]]", false, true, ::Calculation::Calculation::EqualSign::Unknown, nullptr, nullptr, &globalContext, &store);
|
||||
assertCalculationDisplay("[[1,x,3]]", false, true, ::Calculation::Calculation::EqualSign::Unknown, nullptr, nullptr, &globalContext, &store);
|
||||
assertCalculationDisplay("[[1,x,3]]", false, true, ::Calculation::Calculation::EqualSign::Unknown, nullptr, "[[1,undef,3]]", &globalContext, &store);
|
||||
assertCalculationDisplay("28^7", false, false, ::Calculation::Calculation::EqualSign::Unknown, nullptr, nullptr, &globalContext, &store);
|
||||
assertCalculationDisplay("3+√(2)→a", false, false, ::Calculation::Calculation::EqualSign::Approximation, "√(2)+3", nullptr, &globalContext, &store);
|
||||
Ion::Storage::sharedStorage()->recordNamed("a.exp").destroy();
|
||||
|
||||
@@ -54,7 +54,8 @@ QUIZ_CASE(poincare_store_overwrite) {
|
||||
|
||||
QUIZ_CASE(poincare_store_do_not_overwrite) {
|
||||
assert_parsed_expression_simplify_to("-1→g(x)", "-1");
|
||||
assert_parsed_expression_simplify_to("1+g(x)→f(x)", "0");
|
||||
assert_parsed_expression_simplify_to("1+g(x)→f(x)", "g(x)+1");
|
||||
assert_parsed_expression_evaluates_to<double>("f(1)", "0");
|
||||
assert_parsed_expression_simplify_to("2→g", Undefined::Name());
|
||||
assert_parsed_expression_evaluates_to<double>("g(4)", "-1");
|
||||
assert_parsed_expression_evaluates_to<double>("f(4)", "0");
|
||||
|
||||
@@ -23,7 +23,7 @@ QUIZ_CASE(poincare_user_variable_simple) {
|
||||
assert_parsed_expression_simplify_to("f2(Adadas)", "2");
|
||||
|
||||
// Define fBoth with f1 and f2
|
||||
assert_parsed_expression_simplify_to("f1(x)+f2(x)→fBoth(x)", "2×x");
|
||||
assert_parsed_expression_simplify_to("f1(x)+f2(x)→fBoth(x)", "f1(x)+f2(x)");
|
||||
assert_parsed_expression_simplify_to("fBoth(4)", "8");
|
||||
assert_parsed_expression_simplify_to("fBoth(Adadas)", "6");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user