Upstream version 1.3.40
[profile/ivi/swig.git] / Examples / test-suite / python / default_args_runme.py
1 import default_args 
2
3
4 if default_args.Statics_staticMethod() != 60:
5   raise RuntimeError
6   
7 if default_args.cfunc1(1) != 2:
8   raise RuntimeError
9
10 if default_args.cfunc2(1) != 3:
11   raise RuntimeError
12
13 if default_args.cfunc3(1) != 4:
14   raise RuntimeError
15
16
17 f = default_args.Foo()
18
19 f.newname()
20 f.newname(1)
21
22
23 try:
24   f = default_args.Foo(1)
25   error = 1
26 except:
27   error = 0
28 if error:  raise RuntimeError,"Foo::Foo ignore is not working"
29
30 try:
31   f = default_args.Foo(1,2)
32   error = 1
33 except:
34   error = 0
35 if error:  raise RuntimeError,"Foo::Foo ignore is not working"
36
37 try:
38   f = default_args.Foo(1,2,3)
39   error = 1
40 except:
41   error = 0
42 if error:  raise RuntimeError,"Foo::Foo ignore is not working"
43
44 try:
45   m = f.meth(1)
46   error = 1
47 except:
48   error = 0
49 if error:  raise RuntimeError,"Foo::meth ignore is not working"
50
51 try:
52   m = f.meth(1,2)
53   error = 1
54 except:
55   error = 0
56 if error:  raise RuntimeError,"Foo::meth ignore is not working"
57
58 try:
59   m = f.meth(1,2,3)
60   error = 1
61 except:
62   error = 0
63 if error:  raise RuntimeError,"Foo::meth ignore is not working"
64