diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-05 09:02:17 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-05 09:02:17 +0200 |
commit | 45f79dc7e572c1a1e4c40633d5055d0c6741cfbe (patch) | |
tree | 61147ab31b0be97647417649934461b07ffa6983 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | 6839f03051d2950e4721cbb5ee88fa7b07109588 (diff) | |
parent | ffe113ab628adf6c22e96a22cf0bcda8e80c290d (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h
Change-Id: I1e6a9424e7f87d9e4ac1ea387ec70e151106f1c7
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index aeb8b08cd4..2c9f08c82a 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -7420,8 +7420,11 @@ void tst_qqmlecmascript::negativeYear() QVariant q; QMetaObject::invokeMethod(object, "check_negative_tostring", Q_RETURN_ARG(QVariant, q)); - // Strip the timezone. It should be irrelevant as the date was created with the same one. - QCOMPARE(q.toString().left(32), QStringLiteral("result: Sat Jan 1 00:00:00 -2001")); + + // Only check for the year. We hope that every language writes the year in arabic numerals and + // in relation to a specific dude's date of birth. We also hope that no language adds a "-2001" + // junk string somewhere in the middle. + QVERIFY(q.toString().indexOf(QStringLiteral("-2001")) != -1); QMetaObject::invokeMethod(object, "check_negative_toisostring", Q_RETURN_ARG(QVariant, q)); QCOMPARE(q.toString().left(16), QStringLiteral("result: -002000-")); |