aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/cpp11_inheriting_constructors_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python/cpp11_inheriting_constructors_runme.py')
-rw-r--r--Examples/test-suite/python/cpp11_inheriting_constructors_runme.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Examples/test-suite/python/cpp11_inheriting_constructors_runme.py b/Examples/test-suite/python/cpp11_inheriting_constructors_runme.py
new file mode 100644
index 000000000..28fb52dbb
--- /dev/null
+++ b/Examples/test-suite/python/cpp11_inheriting_constructors_runme.py
@@ -0,0 +1,11 @@
+from cpp11_inheriting_constructors import *
+
+# Constructor inheritance via using declaration
+d = DerivedClass(10)
+if d.retrieveValue() != 10:
+ raise RuntimeError("retrieveValue() failed");
+
+# Member initialization at the site of the declaration
+s = SomeClass()
+if s.value != 5:
+ raise RuntimeError("s.value failed");