Blame view

build3/poincare/test/helper.h 1.1 KB
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  #include <poincare.h>
  
  constexpr Poincare::Expression::AngleUnit Degree = Poincare::Expression::AngleUnit::Degree;
  constexpr Poincare::Expression::AngleUnit Radian = Poincare::Expression::AngleUnit::Radian;
  
  void translate_in_special_chars(char * expression);
  void translate_in_ASCII_chars(char * expression);
  Poincare::Expression * parse_expression(const char * expression);
  void assert_parsed_expression_type(const char * expression, Poincare::Expression::Type type);
  template<typename T>
  void assert_parsed_expression_evaluates_to(const char * expression, Poincare::Complex<T> * results, int numberOfRows, int numberOfColumns, Poincare::Expression::AngleUnit angleUnit = Degree);
  template<typename T>
  void assert_parsed_expression_evaluates_to(const char * expression, Poincare::Complex<T> * results, Poincare::Expression::AngleUnit angleUnit = Degree) {
    assert_parsed_expression_evaluates_to(expression, results, 0, 0, angleUnit);
  }
  void assert_parsed_expression_simplify_to(const char * expression, const char * simplifiedExpression, Poincare::Expression::AngleUnit angleUnit = Poincare::Expression::AngleUnit::Radian);