castedNode() -> typedNode()

This commit is contained in:
Léa Saviot
2018-07-02 14:12:03 +02:00
parent 882e81e4db
commit 253db1ac2c
8 changed files with 24 additions and 24 deletions

View File

@@ -237,8 +237,8 @@ void testSimplify() {
assert_expression_approximates_to(a, 3);
assert(a.numberOfChildren() == 1);
assert(a.childAtIndex(0).castedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(0).castedNode()->approximate() == 3.0f);
assert(a.childAtIndex(0).typedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(0).typedNode()->approximate() == 3.0f);
}
void testChildSort() {
@@ -251,15 +251,15 @@ void testChildSort() {
FloatRef(3.0f));
a.addChild(FloatRef(0.0f));
assert(a.childAtIndex(0).castedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(1).castedNode()->type() == ExpressionNode::Type::Addition);
assert(a.childAtIndex(2).castedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(0).typedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(1).typedNode()->type() == ExpressionNode::Type::Addition);
assert(a.childAtIndex(2).typedNode()->type() == ExpressionNode::Type::Float);
a.sortChildren();
assert(a.childAtIndex(0).castedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(1).castedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(2).castedNode()->type() == ExpressionNode::Type::Addition);
assert(a.childAtIndex(0).typedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(1).typedNode()->type() == ExpressionNode::Type::Float);
assert(a.childAtIndex(2).typedNode()->type() == ExpressionNode::Type::Addition);
}