aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore')
-rw-r--r--tests/QtCore/qbytearray_operator_test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/QtCore/qbytearray_operator_test.py b/tests/QtCore/qbytearray_operator_test.py
index 662bc6e0c..50bb5f7e8 100644
--- a/tests/QtCore/qbytearray_operator_test.py
+++ b/tests/QtCore/qbytearray_operator_test.py
@@ -56,6 +56,10 @@ class QByteArrayOperatorAt(unittest.TestCase):
obj = QByteArray(string)
self.assertRaises(IndexError, lambda :obj[len(string)])
+ def testNullStrings(self):
+ ba = QByteArray('\x00')
+ self.assertEqual(ba.at(0), '\x00')
+ self.assertEqual(ba[0], '\x00')
class QByteArrayOperatorLen(unittest.TestCase):
'''Test case for __len__ operator of QByteArray'''