aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-12-18 15:00:23 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-12-19 12:39:38 +0100
commit38d65db7aecee073099a5622ec3bc6e297041041 (patch)
treea5c10709522355d4d18ae8c8a97e292b6544dd5a /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
parent3d12a83170fe3e9fcf61605bbb6ee717a9c983b5 (diff)
QmlCompiler: Drop the type shuffling on SetLookup
It's not necessary anymore. We can use the read register as-is. Also, explicitly name the type we are going to use to avoid integer range mismatches on coercion. Pick-to: 6.9 6.8 Task-number: QTBUG-132345 Change-Id: I98d246b03e5194235246ee8e4ebcb0a8e0094a5b Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 3e96ad1558..2d707ed72f 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -4926,6 +4926,10 @@ void tst_QmlCppCodegen::takeNumbers()
QCOMPARE(takeNumber->takenNegativeInt, 0);
QCOMPARE(takeNumber->takenQSizeType, 0);
QCOMPARE(takeNumber->takenQLongLong, 0);
+ QCOMPARE(takeNumber->propertyInt, 0);
+ QCOMPARE(takeNumber->propertyNegativeInt, 0);
+ QCOMPARE(takeNumber->propertyQSizeType, 0);
+ QCOMPARE(takeNumber->propertyQLongLong, 0);
o->metaObject()->invokeMethod(o.data(), "literal56");
@@ -4933,6 +4937,10 @@ void tst_QmlCppCodegen::takeNumbers()
QCOMPARE(takeNumber->takenNegativeInt, -56);
QCOMPARE(takeNumber->takenQSizeType, 56);
QCOMPARE(takeNumber->takenQLongLong, 56);
+ QCOMPARE(takeNumber->propertyInt, 56);
+ QCOMPARE(takeNumber->propertyNegativeInt, -56);
+ QCOMPARE(takeNumber->propertyQSizeType, 56);
+ QCOMPARE(takeNumber->propertyQLongLong, 56);
o->metaObject()->invokeMethod(o.data(), "variable0");
@@ -4940,6 +4948,10 @@ void tst_QmlCppCodegen::takeNumbers()
QCOMPARE(takeNumber->takenNegativeInt, 0);
QCOMPARE(takeNumber->takenQSizeType, 0);
QCOMPARE(takeNumber->takenQLongLong, 0);
+ QCOMPARE(takeNumber->propertyInt, 0);
+ QCOMPARE(takeNumber->propertyNegativeInt, 0);
+ QCOMPARE(takeNumber->propertyQSizeType, 0);
+ QCOMPARE(takeNumber->propertyQLongLong, 0);
o->metaObject()->invokeMethod(o.data(), "variable484");
@@ -4947,6 +4959,10 @@ void tst_QmlCppCodegen::takeNumbers()
QCOMPARE(takeNumber->takenNegativeInt, -484);
QCOMPARE(takeNumber->takenQSizeType, 484);
QCOMPARE(takeNumber->takenQLongLong, 484);
+ QCOMPARE(takeNumber->propertyInt, 484);
+ QCOMPARE(takeNumber->propertyNegativeInt, -484);
+ QCOMPARE(takeNumber->propertyQSizeType, 484);
+ QCOMPARE(takeNumber->propertyQLongLong, 484);
o->metaObject()->invokeMethod(o.data(), "literal0");
@@ -4954,6 +4970,10 @@ void tst_QmlCppCodegen::takeNumbers()
QCOMPARE(takeNumber->takenNegativeInt, 0);
QCOMPARE(takeNumber->takenQSizeType, 0);
QCOMPARE(takeNumber->takenQLongLong, 0);
+ QCOMPARE(takeNumber->propertyInt, 0);
+ QCOMPARE(takeNumber->propertyNegativeInt, 0);
+ QCOMPARE(takeNumber->propertyQSizeType, 0);
+ QCOMPARE(takeNumber->propertyQLongLong, 0);
}
void tst_QmlCppCodegen::testIsnan()