2021-03-24 21:39:59 +03:00
|
|
|
fn test_isnil_byteptr() {
|
2022-04-15 14:58:56 +03:00
|
|
|
pb := &u8(0)
|
2021-03-24 21:39:59 +03:00
|
|
|
assert isnil(pb)
|
2019-11-28 09:44:43 +03:00
|
|
|
}
|
|
|
|
|
2021-03-24 21:39:59 +03:00
|
|
|
fn test_isnil_voidptr() {
|
2022-07-21 21:01:30 +03:00
|
|
|
pv := unsafe { nil }
|
2021-03-24 21:39:59 +03:00
|
|
|
assert isnil(pv)
|
2019-11-28 09:44:43 +03:00
|
|
|
}
|
|
|
|
|
2021-03-24 21:39:59 +03:00
|
|
|
fn test_isnil_charptr() {
|
2019-11-28 09:44:43 +03:00
|
|
|
pc := &char(0)
|
2021-03-24 21:39:59 +03:00
|
|
|
assert isnil(pc)
|
2019-11-28 09:44:43 +03:00
|
|
|
}
|
|
|
|
|
2021-03-24 21:39:59 +03:00
|
|
|
fn test_isnil_intptr() {
|
2019-11-28 09:44:43 +03:00
|
|
|
pi := &int(0)
|
2021-03-24 21:39:59 +03:00
|
|
|
assert isnil(pi)
|
2019-11-28 09:44:43 +03:00
|
|
|
}
|