aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/smartbinding/smart_pointer_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/smartbinding/smart_pointer_test.py')
-rw-r--r--sources/shiboken6/tests/smartbinding/smart_pointer_test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/smartbinding/smart_pointer_test.py b/sources/shiboken6/tests/smartbinding/smart_pointer_test.py
index 10e761149..a9ea91be6 100644
--- a/sources/shiboken6/tests/smartbinding/smart_pointer_test.py
+++ b/sources/shiboken6/tests/smartbinding/smart_pointer_test.py
@@ -239,5 +239,12 @@ class SmartPointerTests(unittest.TestCase):
r = o.takeSharedPtrToInteger(integer2)
self.assertEqual(r, integer2.value())
+ def testOperatorNbBool(self):
+ null_ptr = Obj.createNullSharedPtrToInteger()
+ self.assertFalse(null_ptr)
+ zero = Obj.createSharedPtrToInteger(0)
+ self.assertTrue(zero)
+
+
if __name__ == '__main__':
unittest.main()