diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-09 01:01:06 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-09 01:01:07 +0200 |
commit | 8c3172d724f3ad03cdee7bae23443fa109d350b1 (patch) | |
tree | 53ad546936e22b99d1ea395a875a312332d05516 /tests/auto/qml | |
parent | 5a5441f38e0529d852536b776cd9f26dad410e62 (diff) | |
parent | 4b6832828e04a9806aaf345da5f456817dd3970b (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2
Change-Id: I68211a7d4568a1c31c6a124fe6777709c53736a5
Diffstat (limited to 'tests/auto/qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 3cd70a0d1b..90ff6f24fa 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -366,6 +366,7 @@ private slots: void tailCallWithArguments(); void deleteSparseInIteration(); void saveAccumulatorBeforeToInt32(); + void intMinDividedByMinusOne(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -8948,6 +8949,22 @@ void tst_qqmlecmascript::saveAccumulatorBeforeToInt32() QCOMPARE(value.toString(), QLatin1String("RangeError: Maximum call stack size exceeded.")); } +void tst_qqmlecmascript::intMinDividedByMinusOne() +{ + QQmlEngine engine; + QQmlComponent component(&engine); + component.setData(QByteArray("import QtQml 2.2\n" + "QtObject {\n" + " property int intMin: -2147483648\n" + " property int minusOne: -1\n" + " property double doesNotFitInInt: intMin / minusOne\n" + "}"), QUrl()); + QVERIFY(component.isReady()); + QScopedPointer<QObject> object(component.create()); + QVERIFY(!object.isNull()); + QCOMPARE(object->property("doesNotFitInInt").toUInt(), 2147483648u); +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" |