more cases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5816 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0c8f4b34bf
commit
9bf8d63e04
3 changed files with 58 additions and 1 deletions
40
Examples/test-suite/python/lib_std_pair_runme.py
Normal file
40
Examples/test-suite/python/lib_std_pair_runme.py
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import lib_std_pair
|
||||
|
||||
p = (1,2)
|
||||
p1 = lib_std_pair.p_inout(p)
|
||||
p2 = lib_std_pair.p_inoutd(p1)
|
||||
|
||||
d1 = lib_std_pair.d_inout(2)
|
||||
|
||||
i,d2 = lib_std_pair.d_inout2(2)
|
||||
|
||||
i,p = lib_std_pair.p_inout2(p)
|
||||
p3,p4 = lib_std_pair.p_inout3(p1,p1)
|
||||
|
||||
psi = lib_std_pair.SIPair("hello",1)
|
||||
pci = lib_std_pair.CIPair(1,1)
|
||||
|
||||
|
||||
psi.first = "hi"
|
||||
|
||||
|
||||
psi = lib_std_pair.SIPair("hi",1)
|
||||
if psi != ("hi",1):
|
||||
raise RuntimeError
|
||||
|
||||
psii = lib_std_pair.SIIPair(psi,1)
|
||||
|
||||
a = lib_std_pair.A()
|
||||
b = lib_std_pair.B()
|
||||
|
||||
pab = lib_std_pair.ABPair(a,b);
|
||||
|
||||
pab.first = a
|
||||
pab.first.val = 2
|
||||
|
||||
if pab.first.val != 2:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
pci = lib_std_pair.CIntPair(1,0)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue