summaryrefslogtreecommitdiff
path: root/trunk/Examples/test-suite/python/smart_pointer_overload_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/Examples/test-suite/python/smart_pointer_overload_runme.py')
-rw-r--r--trunk/Examples/test-suite/python/smart_pointer_overload_runme.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/trunk/Examples/test-suite/python/smart_pointer_overload_runme.py b/trunk/Examples/test-suite/python/smart_pointer_overload_runme.py
new file mode 100644
index 000000000..c9fd3a5b0
--- /dev/null
+++ b/trunk/Examples/test-suite/python/smart_pointer_overload_runme.py
@@ -0,0 +1,21 @@
+from smart_pointer_overload import *
+
+f = Foo()
+b = Bar(f)
+
+
+if f.test(3) != 1:
+ raise RuntimeError
+if f.test(3.5) != 2:
+ raise RuntimeError
+if f.test("hello") != 3:
+ raise RuntimeError
+
+if b.test(3) != 1:
+ raise RuntimeError
+if b.test(3.5) != 2:
+ raise RuntimeError
+if b.test("hello") != 3:
+ raise RuntimeError
+
+