mirror of
https://github.com/vlang/v.git
synced 2025-08-03 09:47:15 -04:00
20 lines
292 B
V
20 lines
292 B
V
fn test_isnil_byteptr() {
|
|
pb := &u8(unsafe { nil })
|
|
assert isnil(pb)
|
|
}
|
|
|
|
fn test_isnil_voidptr() {
|
|
pv := unsafe { nil }
|
|
assert isnil(pv)
|
|
}
|
|
|
|
fn test_isnil_charptr() {
|
|
pc := &char(unsafe { nil })
|
|
assert isnil(pc)
|
|
}
|
|
|
|
fn test_isnil_intptr() {
|
|
pi := &int(unsafe { nil })
|
|
assert isnil(pi)
|
|
}
|