Continue addition simplification

This commit is contained in:
Léa Saviot
2018-07-02 11:49:01 +02:00
parent 2590133040
commit 9fc488f22f
6 changed files with 68 additions and 26 deletions

View File

@@ -236,7 +236,9 @@ void testSimplify() {
a.deepReduce();
assert_expression_approximates_to(a, 3);
assert(a.numberOfChildren() == 3);
assert(a.numberOfChildren() == 1);
assert(a.childAtIndex(0).castedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(0).castedNode()->approximate() == 3.0f);
}
void testChildSort() {