Files
cpp-thirdparty/winx64/bin/swigwin-4.0.0/Examples/test-suite/go/li_cmalloc_runme.go
2019-08-04 21:38:19 -05:00

26 lines
273 B
Go

package main
import . "li_cmalloc"
func main() {
p := Malloc_int()
Free_int(p)
ok := false
func() {
defer func() {
if recover() != nil {
ok = true
}
}()
p = Calloc_int(-1)
if p == nil {
ok = true
}
Free_int(p)
}()
if !ok {
panic(0)
}
}