1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tests: add a test for Node{123, unsafe { nil }, unsafe { nil }}

This commit is contained in:
Delyan Angelov 2022-07-20 11:29:01 +03:00
parent 50075d5a79
commit ee4a179e71
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -9,3 +9,9 @@ fn test_string_ref_struct() {
println(n.left) println(n.left)
assert '$n.left' == '&nil' assert '$n.left' == '&nil'
} }
fn test_string_ref_struct_with_nil_instead_of_0() {
n := Node{123, unsafe { nil }, unsafe { nil }}
println(n.left)
assert '$n.left' == '&nil'
}