Skip to content

Commit 6a00ffa

Browse files
committed
test: non-Val get_children
1 parent 4d945ac commit 6a00ffa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_n_arity_nodes.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
@test n_bin.children[3] === n_bin # Poison
3737
@test DynamicExpressions.NodeModule.get_children(n_bin, Val(2)) ==
3838
(n_bin_leaf1, n_bin_leaf2)
39+
# We can also call directly with integers
40+
@test DynamicExpressions.NodeModule.get_children(n_bin, 2) == (n_bin_leaf1, n_bin_leaf2)
3941
# .l and .r should work for Node{T,3} due to general @make_accessors Node
4042
@test n_bin.l === n_bin_leaf1
4143
@test n_bin.r === n_bin_leaf2

0 commit comments

Comments
 (0)