Fix handling of typedef'd function pointers for Go
Add equivalent runtime tests for Python and Java
This commit is contained in:
parent
72ba741d1c
commit
dcc5911839
6 changed files with 101 additions and 1 deletions
29
Examples/test-suite/go/typedef_funcptr_runme.go
Normal file
29
Examples/test-suite/go/typedef_funcptr_runme.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package main
|
||||
|
||||
import . "./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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue