Skip to content

Commit 30f163e

Browse files
committed
test: clean up
1 parent ef9302c commit 30f163e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_special_operators.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ using TestItems: @testitem
88
using Random
99

1010
# Define operators and variable names
11-
assign_op2 = AssignOperator(; target_register=2)
11+
assign_x2 = AssignOperator(; target_register=2)
1212
operators = OperatorEnum(;
13-
binary_operators=[+, -, *, /], unary_operators=[sin, cos, assign_op2]
13+
binary_operators=[+, -, *, /], unary_operators=[sin, cos, assign_x2]
1414
)
1515
variable_names = ["x1", "x2", "x3", "x4", "x5"]
1616

@@ -23,7 +23,7 @@ using TestItems: @testitem
2323
# and then add the return to `x2` (which should now be 3.0!)
2424
x1 = Expression(Node(; feature=1); operators, variable_names)
2525
x2 = Expression(Node(; feature=2); operators, variable_names)
26-
assign_expr = assign_op2(0.0 * x1 + 3.0) + x2
26+
assign_expr = assign_x2(0.0 * x1 + 3.0) + x2
2727

2828
@test string_tree(assign_expr) == "[x2 =]((0.0 * x1) + 3.0) + x2"
2929

@@ -36,7 +36,7 @@ using TestItems: @testitem
3636
@test X[2, :] == [0.5, 1.5, 2.5]
3737

3838
# But, with the reverse order, we get the x2 _before_ it was reassigned
39-
assign_expr_reverse = x2 + assign_op2(0.0 * x1 + 3.0)
39+
assign_expr_reverse = x2 + assign_x2(0.0 * x1 + 3.0)
4040
result, completed = eval_tree_array(assign_expr_reverse, X)
4141
@test completed == true
4242
@test result == [3.5, 4.5, 5.5]

0 commit comments

Comments
 (0)