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

20 lines
253 B
V
Raw Permalink Normal View History

fn test_isnil_byteptr() {
2022-04-15 14:58:56 +03:00
pb := &u8(0)
assert isnil(pb)
}
fn test_isnil_voidptr() {
2022-07-21 21:01:30 +03:00
pv := unsafe { nil }
assert isnil(pv)
}
fn test_isnil_charptr() {
pc := &char(0)
assert isnil(pc)
}
fn test_isnil_intptr() {
pi := &int(0)
assert isnil(pi)
}