aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-05-12 11:32:04 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-05-18 16:24:18 +0200
commit95579c412d0960f2ffbeca97a627d3bc01a0cc2c (patch)
treec78573047a862a1796b1161b44033d9c4486bc7d /tests
parent0a673d257a02b34450d4bbeb43346d993cf3a109 (diff)
Actually test day of the week in test-case for day-of-week bug
The test-cases I added for QTBUG-78996 tested the root cause of the bug, but neglected to test the symptom actually reported - the day of the week was wrong. Add actual an day-of-week check to each (and semicolons on the ends of statements). This amends commit 290dc2da70655db9d4590600dfd37b825b81c1f8. Task-number: QTBUG-78996 Change-Id: Ic7064ddd5a8e4fa0806a10d73cd5955c7be4a4bc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/checkDate-October.qml7
-rw-r--r--tests/auto/qml/qqmlecmascript/data/checkDateTime-October.qml7
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/checkDate-October.qml b/tests/auto/qml/qqmlecmascript/data/checkDate-October.qml
index da32a899db..6ac15f9dc8 100644
--- a/tests/auto/qml/qqmlecmascript/data/checkDate-October.qml
+++ b/tests/auto/qml/qqmlecmascript/data/checkDate-October.qml
@@ -3,10 +3,11 @@ import QtQuick 2.0
MyTypeObject {
Component.onCompleted: {
- // QTBUG-78996
- dateProperty = new Date(2019, 9, 3)
+ dateProperty = new Date(2019, 9, 3);
boolProperty = (dateProperty.getUTCFullYear() == 2019
&& dateProperty.getUTCMonth() == 9
- && dateProperty.getUTCDate() == 3);
+ && dateProperty.getUTCDate() == 3
+ // QTBUG-78996, day of the week:
+ && dateProperty.getUTCDay() == 4);
}
}
diff --git a/tests/auto/qml/qqmlecmascript/data/checkDateTime-October.qml b/tests/auto/qml/qqmlecmascript/data/checkDateTime-October.qml
index c97076f887..51d6b11a2f 100644
--- a/tests/auto/qml/qqmlecmascript/data/checkDateTime-October.qml
+++ b/tests/auto/qml/qqmlecmascript/data/checkDateTime-October.qml
@@ -3,14 +3,15 @@ import QtQuick 2.0
MyTypeObject {
Component.onCompleted: {
- // QTBUG-78996
- dateTimeProperty = new Date(2019, 9, 3, 12)
+ dateTimeProperty = new Date(2019, 9, 3, 12);
boolProperty = (dateTimeProperty.getFullYear() == 2019
&& dateTimeProperty.getMonth() == 9
&& dateTimeProperty.getDate() == 3
&& dateTimeProperty.getHours() == 12
&& dateTimeProperty.getMinutes() == 0
&& dateTimeProperty.getSeconds() == 0
- && dateTimeProperty.getMilliseconds() == 0)
+ && dateTimeProperty.getMilliseconds() == 0
+ // QTBUG-78996: day of the week:
+ && dateTimeProperty.getDay() == 4);
}
}