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