@@ -23,7 +23,7 @@ using TestItems: @testitem
23
23
x2 = Expression (Node (; feature= 2 ); operators, variable_names)
24
24
assign_expr = assign_x2 (0.0 * x1 + 3.0 ) + x2
25
25
26
- @test string_tree (assign_expr) == " [ x2 =] ((0.0 * x1) + 3.0) + x2"
26
+ @test string_tree (assign_expr) == " ( x2 ← ((0.0 * x1) + 3.0) ) + x2"
27
27
28
28
# We should see that x2 will become 3.0 _before_ adding
29
29
result, completed = eval_tree_array (assign_expr, X)
@@ -35,7 +35,7 @@ using TestItems: @testitem
35
35
36
36
# But, with the reverse order, we get the x2 _before_ it was reassigned
37
37
assign_expr_reverse = x2 + assign_x2 (0.0 * x1 + 3.0 )
38
- @test string_tree (assign_expr_reverse) == " x2 + [ x2 =] ((0.0 * x1) + 3.0)"
38
+ @test string_tree (assign_expr_reverse) == " x2 + ( x2 ← ((0.0 * x1) + 3.0) )"
39
39
result, completed = eval_tree_array (assign_expr_reverse, X)
40
40
@test completed == true
41
41
@test result == [3.5 , 4.5 , 5.5 ]
58
58
x3 = Expression (Node (; feature= 3 ); operators, variable_names)
59
59
60
60
expr = assign_x1 (assign_x1 (x1 * 2 ) + x1)
61
- @test string_tree (expr) == " [a =]([a =] (a * 2.0) + a)"
61
+ @test string_tree (expr) == " a ← ((a ← (a * 2.0) ) + a)"
62
62
63
63
result, completed = eval_tree_array (expr, X)
64
64
@test completed == true
122
122
x2 = Expression (Node (; feature= 2 ); operators, variable_names)
123
123
expr = while_op (3.0 - x2, assign_x2 (x2 + 1.0 ))
124
124
125
- @test string_tree (expr) == " while(3.0 - x2, [ x2 =] (x2 + 1.0))"
125
+ @test string_tree (expr) == " while(3.0 - x2, x2 ← (x2 + 1.0))"
126
126
127
127
result, completed = eval_tree_array (expr, X)
128
128
@test completed == true
163
163
expr = (while_op (condition, body) * 0.0 ) + xs[3 ]
164
164
165
165
@test string_tree (expr) ==
166
- " (while(x2, (([ x5 =] (x3) + [ x3 =] (x4)) + [ x4 =] (x5 + x4)) + [ x2 =] (x2 - 1.0)) * 0.0) + x3"
166
+ " (while(x2, ((( x5 ← (x3)) + ( x3 ← (x4))) + ( x4 ← (x5 + x4))) + ( x2 ← (x2 - 1.0) )) * 0.0) + x3"
167
167
168
168
result, completed = eval_tree_array (expr, X)
169
169
@test completed == true
0 commit comments