PageRenderTime 25ms CodeModel.GetById 15ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/python/namespace_typemap_runme.py

#
Python | 82 lines | 56 code | 26 blank | 0 comment | 24 complexity | 6865fe266523db98a8e3e10cbc910fa9 MD5 | raw file
 1from namespace_typemap import *
 2
 3if stest1("hello") != "hello":
 4    raise RuntimeError
 5
 6if stest2("hello") != "hello":
 7    raise RuntimeError
 8
 9if stest3("hello") != "hello":
10    raise RuntimeError
11
12if stest4("hello") != "hello":
13    raise RuntimeError
14
15if stest5("hello") != "hello":
16    raise RuntimeError
17
18if stest6("hello") != "hello":
19    raise RuntimeError
20
21if stest7("hello") != "hello":
22    raise RuntimeError
23
24if stest8("hello") != "hello":
25    raise RuntimeError
26
27if stest9("hello") != "hello":
28    raise RuntimeError
29
30if stest10("hello") != "hello":
31    raise RuntimeError
32
33if stest11("hello") != "hello":
34    raise RuntimeError
35
36if stest12("hello") != "hello":
37    raise RuntimeError
38
39c = complex(2,3)
40r = c.real
41
42if ctest1(c) != r:
43    raise RuntimeError
44
45if ctest2(c) != r:
46    raise RuntimeError
47
48if ctest3(c) != r:
49    raise RuntimeError
50
51if ctest4(c) != r:
52    raise RuntimeError
53
54if ctest5(c) != r:
55    raise RuntimeError
56
57if ctest6(c) != r:
58    raise RuntimeError
59
60if ctest7(c) != r:
61    raise RuntimeError
62
63if ctest8(c) != r:
64    raise RuntimeError
65
66if ctest9(c) != r:
67    raise RuntimeError
68
69if ctest10(c) != r:
70    raise RuntimeError
71
72if ctest11(c) != r:
73    raise RuntimeError
74
75if ctest12(c) != r:
76    raise RuntimeError
77
78try:
79    ttest1(-14)
80    raise RuntimeError
81except ValueError:
82    pass