diff options
Diffstat (limited to 'Examples/test-suite/go/typedef_funcptr_runme.go')
-rw-r--r-- | Examples/test-suite/go/typedef_funcptr_runme.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Examples/test-suite/go/typedef_funcptr_runme.go b/Examples/test-suite/go/typedef_funcptr_runme.go new file mode 100644 index 000000000..f76f088af --- /dev/null +++ b/Examples/test-suite/go/typedef_funcptr_runme.go @@ -0,0 +1,29 @@ +package main + +import . "swigtests/typedef_funcptr" + +func main() { + a := 100 + b := 10 + + if Do_op(a,b,Addf) != 110 { + panic(0) + } + if Do_op(a,b,Subf) != 90 { + panic(0) + } + + if Do_op_typedef_int(a,b,Addf) != 110 { + panic(0) + } + if Do_op_typedef_int(a,b,Subf) != 90 { + panic(0) + } + + if Do_op_typedef_Integer(a,b,Addf) != 110 { + panic(0) + } + if Do_op_typedef_Integer(a,b,Subf) != 90 { + panic(0) + } +} |