diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 37f874ba91..5d44b84475 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -657,6 +657,16 @@ void tst_QmlCppCodegen::asCast() QCOMPARE(qvariant_cast<QObject *>(root->property("dummyAsItem")), dummy); QCOMPARE(qvariant_cast<QObject *>(root->property("dummyAsRectangle")), nullptr); QCOMPARE(qvariant_cast<QObject *>(root->property("dummyAsDummy")), dummy); + + QCOMPARE(qvariant_cast<QObject *>(root->property("nullAsObject")), nullptr); + QCOMPARE(qvariant_cast<QObject *>(root->property("nullAsItem")), nullptr); + QCOMPARE(qvariant_cast<QObject *>(root->property("nullAsRectangle")), nullptr); + QCOMPARE(qvariant_cast<QObject *>(root->property("nullAsDummy")), nullptr); + + QCOMPARE(qvariant_cast<QObject *>(root->property("undefinedAsObject")), nullptr); + QCOMPARE(qvariant_cast<QObject *>(root->property("undefinedAsItem")), nullptr); + QCOMPARE(qvariant_cast<QObject *>(root->property("undefinedAsRectangle")), nullptr); + QCOMPARE(qvariant_cast<QObject *>(root->property("undefinedAsDummy")), nullptr); } void tst_QmlCppCodegen::attachedBaseEnum() |