aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-05-31 08:05:41 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-03 15:47:17 +0200
commit0c6f15ff05a045ca5a3331888a89bb51a1e95623 (patch)
treea34f75546c3a2507111dc487489acefe655cb277
parente2b48350138ea8b9f61aaf6c44faa8b111d83079 (diff)
shiboken6: Add tests for a named smart pointer instance
Task-number: PYSIDE-2404 Pick-to: 6.7 Change-Id: I547e564df85b61c7fad6c8c4e8f5604dc999f238 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
-rw-r--r--sources/shiboken6/tests/smartbinding/std_shared_ptr_test.py2
-rw-r--r--sources/shiboken6/tests/smartbinding/typesystem_smart.xml2
2 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken6/tests/smartbinding/std_shared_ptr_test.py b/sources/shiboken6/tests/smartbinding/std_shared_ptr_test.py
index c87a6f3e2..ddaab43f5 100644
--- a/sources/shiboken6/tests/smartbinding/std_shared_ptr_test.py
+++ b/sources/shiboken6/tests/smartbinding/std_shared_ptr_test.py
@@ -49,6 +49,8 @@ class StdSharedPtrTests(unittest.TestCase):
self.assertFalse(np)
p = StdSharedPtrTestBench.createInt()
StdSharedPtrTestBench.printInt(p)
+ ip = std.StdIntPtr(42)
+ StdSharedPtrTestBench.printInt(ip)
def testString(self):
np = StdSharedPtrTestBench.createNullString()
diff --git a/sources/shiboken6/tests/smartbinding/typesystem_smart.xml b/sources/shiboken6/tests/smartbinding/typesystem_smart.xml
index 8831629f8..e4a1ef8b7 100644
--- a/sources/shiboken6/tests/smartbinding/typesystem_smart.xml
+++ b/sources/shiboken6/tests/smartbinding/typesystem_smart.xml
@@ -50,7 +50,7 @@
value-check-method="operator bool"
ref-count-method="use_count"
reset-method="reset"
- instantiations="Integer,int,std::string">
+ instantiations="Integer,int=StdIntPtr,std::string">
<include file-name="memory" location="global"/>
</smart-pointer-type>