Blame view

build3/poincare/test/store.cpp 547 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  #include <quiz.h>
  #include <poincare.h>
  #include <ion.h>
  #include <assert.h>
  #include "helper.h"
  
  using namespace Poincare;
  
  QUIZ_CASE(poincare_store_evaluate) {
    Complex<float> a[1] = {Complex<float>::Float(43.0f)};
    assert_parsed_expression_evaluates_to("1+42>A", a);
  
    Complex<double> b[1] = {Complex<double>::Cartesian(0.123, 1.0)};
    assert_parsed_expression_evaluates_to("0.123+I>B", b);
  }
  
  QUIZ_CASE(poincare_store_simplify) {
    assert_parsed_expression_simplify_to("1+2>A", "A");
    assert_parsed_expression_simplify_to("1+2>x", "x");
  }