Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/test-suite/go/li_cmalloc_runme.go
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

26 lines
275 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)
}
}