aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/namespace_typemap_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python/namespace_typemap_runme.py')
-rw-r--r--Examples/test-suite/python/namespace_typemap_runme.py82
1 files changed, 82 insertions, 0 deletions
diff --git a/Examples/test-suite/python/namespace_typemap_runme.py b/Examples/test-suite/python/namespace_typemap_runme.py
new file mode 100644
index 000000000..682ad3bb1
--- /dev/null
+++ b/Examples/test-suite/python/namespace_typemap_runme.py
@@ -0,0 +1,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