summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/namespace_typemap_runme.py
blob: 14379496d4c126b62bbbe62d6297ce1f771d455e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
from namespace_typemap import *

if stest1("hello") != "hello":
    raise RuntimeError

if stest2("hello") != "hello":
    raise RuntimeError

if stest3("hello") != "hello":
    raise RuntimeError

if stest4("hello") != "hello":
    raise RuntimeError

if stest5("hello") != "hello":
    raise RuntimeError

if stest6("hello") != "hello":
    raise RuntimeError

if stest7("hello") != "hello":
    raise RuntimeError

if stest8("hello") != "hello":
    raise RuntimeError

if stest9("hello") != "hello":
    raise RuntimeError

if stest10("hello") != "hello":
    raise RuntimeError

if stest11("hello") != "hello":
    raise RuntimeError

if stest12("hello") != "hello":
    raise RuntimeError

c = complex(2, 3)
r = c.real

if ctest1(c) != r:
    raise RuntimeError

if ctest2(c) != r:
    raise RuntimeError

if ctest3(c) != r:
    raise RuntimeError

if ctest4(c) != r:
    raise RuntimeError

if ctest5(c) != r:
    raise RuntimeError

if ctest6(c) != r:
    raise RuntimeError

if ctest7(c) != r:
    raise RuntimeError

if ctest8(c) != r:
    raise RuntimeError

if ctest9(c) != r:
    raise RuntimeError

if ctest10(c) != r:
    raise RuntimeError

if ctest11(c) != r:
    raise RuntimeError

if ctest12(c) != r:
    raise RuntimeError

try:
    ttest1(-14)
    raise RuntimeError
except ValueError:
    pass