summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/inplaceadd_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python/inplaceadd_runme.py')
-rw-r--r--Examples/test-suite/python/inplaceadd_runme.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/Examples/test-suite/python/inplaceadd_runme.py b/Examples/test-suite/python/inplaceadd_runme.py
new file mode 100644
index 0000000..b703c56
--- /dev/null
+++ b/Examples/test-suite/python/inplaceadd_runme.py
@@ -0,0 +1,20 @@
+import inplaceadd
+a = inplaceadd.A(7)
+
+a += 5
+if a.val != 12:
+ print a.val
+ raise RuntimeError
+
+a -= 5
+if a.val != 7:
+ raise RuntimeError
+
+a *= 2
+
+if a.val != 14:
+ raise RuntimeError
+
+a += a
+if a.val != 28:
+ raise RuntimeError