diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-22 15:20:14 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-05 17:53:15 +0200 |
commit | 8ecb8a909ecde13f179b8fce170582e47373f50c (patch) | |
tree | 8aad5ec03932a4876a1302f441759131f342c314 /sources/shiboken6/tests/samplebinding | |
parent | c7d0c7c5ce00a37461908dd9329aa563cd146b1e (diff) |
shiboken6: Test nullptr_t
Testing the support introduced by
3c2ef04c9eade4226f139064c6c45cb4819834e0.
Task-number: PYSIDE-854
Change-Id: I2d7276baf2c81e24f3f7389448352541a78e18bd
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/tests/samplebinding')
-rw-r--r-- | sources/shiboken6/tests/samplebinding/sample_test.py | 4 | ||||
-rw-r--r-- | sources/shiboken6/tests/samplebinding/typesystem_sample.xml | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/samplebinding/sample_test.py b/sources/shiboken6/tests/samplebinding/sample_test.py index 660a3cd3d..d3ae4e867 100644 --- a/sources/shiboken6/tests/samplebinding/sample_test.py +++ b/sources/shiboken6/tests/samplebinding/sample_test.py @@ -96,6 +96,10 @@ class ModuleTest(unittest.TestCase): self.assertEqual(sample.addStdStrings(t1, t1), expected) self.assertEqual(sample.addStdWStrings(t1, t1), expected) + def testNullPtrT(self): + sample.testNullPtrT(None) + self.assertRaises(TypeError, sample.testNullPtrT, 42) + if __name__ == '__main__': unittest.main() diff --git a/sources/shiboken6/tests/samplebinding/typesystem_sample.xml b/sources/shiboken6/tests/samplebinding/typesystem_sample.xml index 8891efdf6..7484a43f0 100644 --- a/sources/shiboken6/tests/samplebinding/typesystem_sample.xml +++ b/sources/shiboken6/tests/samplebinding/typesystem_sample.xml @@ -4,6 +4,7 @@ <suppress-warning text="Duplicate type entry: 'SampleNamespace'" /> <primitive-type name="ObjectType::Identifier"/> + <primitive-type name="std::nullptr_t"/> <primitive-type name="Foo::HANDLE" target-lang-api-name="PyLong"/> @@ -413,6 +414,7 @@ <function signature="overloadedFunc(int)" /> <function signature="addStdStrings(const std::string&, const std::string&)"/> <function signature="addStdWStrings(const std::wstring&, const std::wstring&)"/> + <function signature="testNullPtrT(std::nullptr_t)"/> <value-type name="ArrayModifyTest"> <modify-function signature="sumIntArray(int, int*)"> |