diff options
Diffstat (limited to 'tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp index f545ead1f1..e89e634841 100644 --- a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp +++ b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp @@ -159,6 +159,8 @@ void tst_QExplicitlySharedDataPointer::data() const { QExplicitlySharedDataPointer<const MyClass> pointer; QCOMPARE(pointer.data(), static_cast<const MyClass *>(0)); + QVERIFY(pointer == nullptr); + QVERIFY(nullptr == pointer); } /* On const pointer. Must not mutate the pointer. */ @@ -168,6 +170,9 @@ void tst_QExplicitlySharedDataPointer::data() const /* Check that this cast is possible. */ static_cast<const MyClass *>(pointer.data()); + + QVERIFY(! (pointer == nullptr)); + QVERIFY(! (nullptr == pointer)); } /* On mutatable pointer. Must not mutate the pointer. */ |