Skip to content

Commit 11f4465

Browse files
committed
test: fix access error
1 parent 757fb0a commit 11f4465

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/test_n_arity_nodes.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ end
507507

508508
@testitem "Node arbitrary-degree child access & mutation" begin
509509
using DynamicExpressions.NodeModule:
510-
Node, get_child, get_children, set_child!, set_children!
510+
Node, get_child, get_children, set_child!, set_children!, unsafe_get_children
511511
using Test
512512

513513
# Build a tiny 3-ary tree: +(1, 2, 3)
@@ -532,7 +532,8 @@ end
532532
@test get_child(p, 2) === c2
533533

534534
# Poison node is just self
535-
@test get_child(p, 3) === p
535+
@test_throws UndefRefError get_child(p, 3)
536+
@test unsafe_get_children(p)[3].x === p
536537
end
537538

538539
@testitem "Node property forwarding (`.l` / `.r`) still works" begin

0 commit comments

Comments
 (0)