~ubuntu-branches/ubuntu/oneiric/swig1.3/oneiric

« back to all changes in this revision

Viewing changes to Examples/test-suite/python/li_std_pair_runme.py

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2009-11-15 14:00:28 UTC
  • mfrom: (1.2.9 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091115140028-me7amr2rie8zz1xn
Tags: 1.3.40-2ubuntu1
* Merge from Debian testing (LP: #356529), remaining changes:
  - Drop libchicken-dev from the build-depends (it's in universe)
  - Remove Pike from package description and from configure flags
  - drop "--without-mzscheme", we don't have it in our build-depends
  - use php-config5
  - Clean Runtime/ as well.
  - debian/rules (clean): Remove Lib/ocaml/swigp4.ml.
* debian/rules: Remove hardcoded python version.
* Remove upper limit for python from Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import li_std_pair
2
 
 
3
 
p = (1,2)
4
 
p1 = li_std_pair.p_inout(p)
5
 
p2 = li_std_pair.p_inoutd(p1)
6
 
 
7
 
d1 = li_std_pair.d_inout(2)
8
 
 
9
 
i,d2 = li_std_pair.d_inout2(2)
10
 
 
11
 
i,p = li_std_pair.p_inout2(p)
12
 
p3,p4 = li_std_pair.p_inout3(p1,p1)
13
 
 
14
 
psi = li_std_pair.SIPair("hello",1)
15
 
pci = li_std_pair.CIPair(1,1)
16
 
 
17
 
 
18
 
#psi.first = "hi"
19
 
 
20
 
 
21
 
psi = li_std_pair.SIPair("hi",1)
22
 
if psi != ("hi",1):
23
 
  raise RuntimeError
24
 
 
25
 
psii = li_std_pair.SIIPair(psi,1)
26
 
 
27
 
a = li_std_pair.A()
28
 
b = li_std_pair.B()
29
 
 
30
 
pab = li_std_pair.ABPair(a,b);
31
 
 
32
 
pab.first = a
33
 
pab.first.val = 2
34
 
 
35
 
if pab.first.val != 2:
36
 
  raise RuntimeError
37
 
  
38
 
 
39
 
pci = li_std_pair.CIntPair(1,0)
40
 
 
41
 
a = li_std_pair.A(5)
42
 
p1 = li_std_pair.pairP1(1,a.this)
43
 
p2 = li_std_pair.pairP2(a,1)
44
 
p3 = li_std_pair.pairP3(a,a)
45
 
 
46
 
 
47
 
if a.val != li_std_pair.p_identa(p1.this)[1].val:
48
 
  raise RuntimeError
49
 
  
50
 
p = li_std_pair.IntPair(1,10)
51
 
p.first = 1
52
 
 
53
 
p = li_std_pair.paircA1(1,a)
54
 
p.first
55
 
p.second
56
 
 
57
 
p = li_std_pair.paircA2(1,a)
58
 
pp = li_std_pair.pairiiA(1,p)
59