aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/tests/smartbinding/smart_pointer_test.py')
-rw-r--r--sources/shiboken2/tests/smartbinding/smart_pointer_test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/shiboken2/tests/smartbinding/smart_pointer_test.py b/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
index 730b4a0da..62bfc0500 100644
--- a/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
+++ b/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
@@ -143,5 +143,18 @@ class SmartPointerTests(unittest.TestCase):
self.assertEqual(objCount(), 0)
self.assertEqual(integerCount(), 0)
+ def testSmartPointersWithNamespace(self):
+ # Create the main object
+ o = Obj()
+ self.assertEqual(objCount(), 1)
+
+ # Create a shared pointer to an Integer together with an Integer.
+ ptrToInteger = o.giveSharedPtrToInteger2()
+ self.assertEqual(objCount(), 1)
+ self.assertEqual(integerCount(), 2)
+
+ integer = ptrToInteger.data()
+ self.assertTrue(integer)
+
if __name__ == '__main__':
unittest.main()