diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-24 18:28:07 +0200 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-24 18:28:07 +0200 |
commit | 506541c8fca13e6f42b62b5e295513d10a4e5282 (patch) | |
tree | 2bc1dfb4fa3b256976591fbf1daa9985d0a46dd0 /tests/auto/qscriptengine/tst_qscriptengine.cpp | |
parent | 7a8cab928dd405973e102ad2e6703cdbbb6bd505 (diff) | |
parent | eff4a0f3fca2e22d4be888cdd7953e1c2ab8c918 (diff) | |
download | qtscript-506541c8fca13e6f42b62b5e295513d10a4e5282.tar.gz |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9d56563ae7af982f81f21d9d5b1a48d8be8a09cb
Diffstat (limited to 'tests/auto/qscriptengine/tst_qscriptengine.cpp')
-rw-r--r-- | tests/auto/qscriptengine/tst_qscriptengine.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index ffe6a2a..82d7f05 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -5809,6 +5809,9 @@ void tst_QScriptEngine::qRegExpInport() // effect at a given date (QTBUG-9770). void tst_QScriptEngine::dateRoundtripJSQtJS() { +#ifdef Q_OS_WIN + QSKIP("This test fails on Windows due to a bug in QDateTime."); +#endif uint secs = QDateTime(QDate(2009, 1, 1)).toUTC().toTime_t(); QScriptEngine eng; for (int i = 0; i < 8000; ++i) { @@ -5836,6 +5839,9 @@ void tst_QScriptEngine::dateRoundtripQtJSQt() void tst_QScriptEngine::dateConversionJSQt() { +#ifdef Q_OS_WIN + QSKIP("This test fails on Windows due to a bug in QDateTime."); +#endif uint secs = QDateTime(QDate(2009, 1, 1)).toUTC().toTime_t(); QScriptEngine eng; for (int i = 0; i < 8000; ++i) { @@ -5843,6 +5849,7 @@ void tst_QScriptEngine::dateConversionJSQt() QDateTime qtDate = jsDate.toDateTime(); QString qtUTCDateStr = qtDate.toUTC().toString(Qt::ISODate); QString jsUTCDateStr = jsDate.property("toISOString").call(jsDate).toString(); + jsUTCDateStr.remove(jsUTCDateStr.length() - 5, 4); // get rid of milliseconds (".000") if (qtUTCDateStr != jsUTCDateStr) QFAIL(qPrintable(jsDate.toString())); secs += 2*60*60; @@ -5856,6 +5863,7 @@ void tst_QScriptEngine::dateConversionQtJS() for (int i = 0; i < 8000; ++i) { QScriptValue jsDate = eng.newDate(qtDate); QString jsUTCDateStr = jsDate.property("toISOString").call(jsDate).toString(); + jsUTCDateStr.remove(jsUTCDateStr.length() - 5, 4); // get rid of milliseconds (".000") QString qtUTCDateStr = qtDate.toUTC().toString(Qt::ISODate); if (jsUTCDateStr != qtUTCDateStr) QFAIL(qPrintable(qtDate.toString())); |