From db71a35b1e20b028e4e07c8229551fea8ac0eafb Mon Sep 17 00:00:00 2001 From: Semih Yavuz Date: Tue, 31 Jan 2023 14:00:04 +0100 Subject: 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 --- tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp') 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() -- cgit v1.2.3