add callback and inout tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6281 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
526e70e592
commit
8cd612c7c1
5 changed files with 171 additions and 1 deletions
22
Examples/test-suite/python/inout_runme.py
Normal file
22
Examples/test-suite/python/inout_runme.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import inout
|
||||
|
||||
a = inout.AddOne1(1)
|
||||
if a != 2:
|
||||
raise RuntimeError
|
||||
|
||||
a = inout.AddOne3(1,1,1)
|
||||
if a != [2,2,2]:
|
||||
raise RuntimeError
|
||||
|
||||
a = inout.AddOne1p((1,1))
|
||||
if a != (2,2):
|
||||
raise RuntimeError
|
||||
|
||||
a = inout.AddOne2p((1,1),1)
|
||||
if a != [(2,2),2]:
|
||||
raise RuntimeError
|
||||
|
||||
a = inout.AddOne3p(1,(1,1),1)
|
||||
if a != [2,(2,2),2]:
|
||||
raise RuntimeError
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue