aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-09 10:28:48 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-09 10:28:48 +0200
commit5517c63c2eb601f3a9a2cb1e43d21b5e662b18cc (patch)
tree9b8e50a5312dc17d388f3425ffb9ea9fb0db6bef /tests/auto/qml/qqmlecmascript
parentc3cbbf362c769b065fd0586b0510d043cbae92a4 (diff)
parent45f79dc7e572c1a1e4c40633d5055d0c6741cfbe (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: src/qml/qml/qqmlcomponent.cpp tests/auto/quick/scenegraph/tst_scenegraph.cpp Change-Id: Ibc811b95a57f175ca53337db7bbd1f575a745937
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp7
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 3afd761388..30ecfa7d96 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -7470,8 +7470,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-"));