diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-02-25 11:25:42 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-02-25 11:25:42 +0100 |
| commit | b97ccab8c268d260f704e11b33d64fa31f74e258 (patch) | |
| tree | 99faf72f67df4b78b13872b5c95a8f952e7b15ef /sources/shiboken2/tests/smartbinding/smart_pointer_test.py | |
| parent | 7a7952fc2e0809ef7f12a726376cec457897c364 (diff) | |
| parent | f324cced79a004d6ecb698a01189500384d0f966 (diff) | |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Ie51a929bf4a148d5500f4e1ce8fa12e6219fb057
Diffstat (limited to 'sources/shiboken2/tests/smartbinding/smart_pointer_test.py')
| -rw-r--r-- | sources/shiboken2/tests/smartbinding/smart_pointer_test.py | 13 |
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() |
