summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-01-07 01:00:08 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-01-07 01:00:08 +0100
commitc497f79ad460afeb76eb1ade0de86d46bbb11a91 (patch)
tree10ebe88ea0c3566c2bd33968bbd4401122c9b689 /tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
parent8cf812231405e011b422a1505d9a219618fe5cee (diff)
parentecdccce8e468784e050b65052da193bb40e2d9b9 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
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, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index fb11e4c522..e2bb7dab2a 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -124,6 +124,7 @@ private slots:
void compareCustomType();
void compareCustomEqualOnlyType();
void customDebugStream();
+ void unknownType();
};
struct BaseGenericType
@@ -2541,6 +2542,16 @@ void tst_QMetaType::customDebugStream()
qDebug() << v1;
}
+void tst_QMetaType::unknownType()
+{
+ QMetaType invalid(QMetaType::UnknownType);
+ QVERIFY(!invalid.create());
+ QVERIFY(!invalid.sizeOf());
+ QVERIFY(!invalid.metaObject());
+ int buffer = 0xBAD;
+ invalid.construct(&buffer);
+ QCOMPARE(buffer, 0xBAD);
+}
// Compile-time test, it should be possible to register function pointer types
class Undefined;