We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b38a2a6 commit eaf4446Copy full SHA for eaf4446
test/cse.jl
@@ -16,7 +16,12 @@ end
16
expr = sin(a + b) * (a + b)
17
sorted_nodes = topological_sort(expr)
18
@test length(sorted_nodes) == 3
19
+ @test isequal(sorted_nodes[1].rhs, a + b)
20
+ @test isequal(sin(sorted_nodes[1].lhs), sorted_nodes[2].rhs)
21
expr = (a + b)^(a + b)
22
23
@test length(sorted_nodes) == 2
24
25
+ ab_node = sorted_nodes[1].lhs
26
+ @test isequal(ab_node^ab_node, sorted_nodes[2].rhs)
27
end
0 commit comments