v / vlib / builtin
Raw file | 19 loc (16 sloc) | 253 bytes | Latest commit hash 9099594a4
1fn test_isnil_byteptr() {
2 pb := &u8(0)
3 assert isnil(pb)
4}
5
6fn test_isnil_voidptr() {
7 pv := unsafe { nil }
8 assert isnil(pv)
9}
10
11fn test_isnil_charptr() {
12 pc := &char(0)
13 assert isnil(pc)
14}
15
16fn test_isnil_intptr() {
17 pi := &int(0)
18 assert isnil(pi)
19}