Skip to content

Commit ee4a179

Browse files
committed
tests: add a test for Node{123, unsafe { nil }, unsafe { nil }}
1 parent 50075d5 commit ee4a179

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vlib/v/tests/string_ref_struct_test.v

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ fn test_string_ref_struct() {
99
println(n.left)
1010
assert '$n.left' == '&nil'
1111
}
12+
13+
fn test_string_ref_struct_with_nil_instead_of_0() {
14+
n := Node{123, unsafe { nil }, unsafe { nil }}
15+
println(n.left)
16+
assert '$n.left' == '&nil'
17+
}

0 commit comments

Comments
 (0)