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
20
Examples/test-suite/python/typedef_funcptr_runme.py
Normal file
20
Examples/test-suite/python/typedef_funcptr_runme.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import typedef_funcptr
|
||||
|
||||
a = 100
|
||||
b = 10
|
||||
|
||||
if typedef_funcptr.do_op(a,b,typedef_funcptr.addf) != 110:
|
||||
raise RuntimeError("addf failed")
|
||||
if typedef_funcptr.do_op(a,b,typedef_funcptr.subf) != 90:
|
||||
raise RuntimeError("subf failed")
|
||||
|
||||
if typedef_funcptr.do_op_typedef_int(a,b,typedef_funcptr.addf) != 110:
|
||||
raise RuntimeError("addf failed")
|
||||
if typedef_funcptr.do_op_typedef_int(a,b,typedef_funcptr.subf) != 90:
|
||||
raise RuntimeError("subf failed")
|
||||
|
||||
if typedef_funcptr.do_op_typedef_Integer(a,b,typedef_funcptr.addf) != 110:
|
||||
raise RuntimeError("addf failed")
|
||||
if typedef_funcptr.do_op_typedef_Integer(a,b,typedef_funcptr.subf) != 90:
|
||||
raise RuntimeError("subf failed")
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue