diff options
| author | Semih Yavuz <semih.yavuz@qt.io> | 2023-01-31 14:00:04 +0100 |
|---|---|---|
| committer | Semih Yavuz <semih.yavuz@qt.io> | 2023-01-31 19:12:21 +0100 |
| commit | db71a35b1e20b028e4e07c8229551fea8ac0eafb (patch) | |
| tree | f2e57af0d9de0dba006c4a71a229e1d67f4d2724 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | e23ea6cf3ce1565fa2265e7985257a4d69526f59 (diff) | |
qmlcachegen: Improve QObject comparison code generation test
The code generated for QObject comparisons holds for both weak and
strong comparisons. Improve tst_qmlcppcodegen by adding missing weak
comparison tests.
Amends afc7928d1a1e47ecbc9d101c4e5d5fb1c5b78326.
Pick-to: 6.5
Change-Id: Ib6176a39b329e792b81b3d8e8a288dcea074320b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index dd30931868..3db83ee884 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -3112,6 +3112,13 @@ void tst_QmlCppCodegen::equalityQObjects() QVERIFY(object->property("compareSameObjects").toBool()); QVERIFY(object->property("compareDifferentObjects").toBool()); QVERIFY(object->property("compareObjectWithNullObject").toBool()); + + QVERIFY(object->property("nonStrict_derivedIsNotNull").toBool()); + QVERIFY(object->property("nonStrict_nullObjectIsNull").toBool()); + QVERIFY(object->property("nonStrict_nonNullObjectIsNotNull").toBool()); + QVERIFY(object->property("nonStrict_compareSameObjects").toBool()); + QVERIFY(object->property("nonStrict_compareDifferentObjects").toBool()); + QVERIFY(object->property("nonStrict_compareObjectWithNullObject").toBool()); } void tst_QmlCppCodegen::dateConversions() |
