#include #include #include #include #include #include "helper.h" using namespace Poincare; QUIZ_CASE(poincare_parse_symbol) { assert_parsed_expression_type("P", Expression::Type::Symbol); assert_parsed_expression_type("X", Expression::Type::Symbol); assert_parsed_expression_type("I", Expression::Type::Complex); assert_parsed_expression_type("1.2E3", Expression::Type::Complex); assert_parsed_expression_type("ans", Expression::Type::Symbol); } QUIZ_CASE(poincare_symbol_approximate) { Complex a[1] = {Complex::Float(M_PI)}; assert_parsed_expression_evaluates_to("P", a); Complex b[1] = {Complex::Float(M_E)}; assert_parsed_expression_evaluates_to("X", b); Complex c[1] = {Complex::Float(1200.0)}; assert_parsed_expression_evaluates_to("1.2E3", c); }