summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp')
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index f693d14029..143bf2f95d 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -1563,7 +1563,6 @@ DECLARE_NONSTREAMABLE(QJsonArray)
DECLARE_NONSTREAMABLE(QJsonDocument)
DECLARE_NONSTREAMABLE(QObject*)
DECLARE_NONSTREAMABLE(QWidget*)
-DECLARE_NONSTREAMABLE(std::nullptr_t)
#define DECLARE_GUI_CLASS_NONSTREAMABLE(MetaTypeName, MetaTypeId, RealType) \
DECLARE_NONSTREAMABLE(RealType)
@@ -1602,7 +1601,10 @@ void tst_QMetaType::saveAndLoadBuiltin()
if (isStreamable) {
QVERIFY(QMetaType::load(stream, type, value)); // Hmmm, shouldn't it return false?
- QCOMPARE(stream.status(), QDataStream::ReadPastEnd);
+
+ // std::nullptr_t is nullary: it doesn't actually read anything
+ if (type != QMetaType::Nullptr)
+ QCOMPARE(stream.status(), QDataStream::ReadPastEnd);
}
stream.device()->seek(0);
@@ -1612,7 +1614,10 @@ void tst_QMetaType::saveAndLoadBuiltin()
if (isStreamable) {
QVERIFY(QMetaType::load(stream, type, value)); // Hmmm, shouldn't it return false?
- QCOMPARE(stream.status(), QDataStream::ReadPastEnd);
+
+ // std::nullptr_t is nullary: it doesn't actually read anything
+ if (type != QMetaType::Nullptr)
+ QCOMPARE(stream.status(), QDataStream::ReadPastEnd);
}
QMetaType::destroy(type, value);