summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-11-24 03:50:27 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-11-24 03:52:41 (GMT)
commite3da9407ad85a65abce72f8a32230ec4f2f95369 (patch)
treef0e6e8072e5960ef41382e0e049bd5fbb5201035 /tests
parentd32360bb33e830f8c17a6db1a31f529436c2915e (diff)
downloadQt-e3da9407ad85a65abce72f8a32230ec4f2f95369.zip
Qt-e3da9407ad85a65abce72f8a32230ec4f2f95369.tar.gz
Qt-e3da9407ad85a65abce72f8a32230ec4f2f95369.tar.bz2
Allow javascript date and regexp objects in WorkerScript messages
Task-number: QTBUG-14666 Reviewed-by: Aaron Kennedy
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
index 3140265..5a6cf3c 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
+++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
@@ -137,6 +137,11 @@ void tst_QDeclarativeWorkerScript::messaging_data()
QTest::newRow("real") << qVariantFromValue(10334.375);
QTest::newRow("string") << qVariantFromValue(QString("More cheeeese, Gromit!"));
QTest::newRow("variant list") << qVariantFromValue((QVariantList() << "a" << "b" << "c"));
+ QTest::newRow("date time") << qVariantFromValue(QDateTime::currentDateTime());
+#ifndef QT_NO_REGEXP
+ // QtScript's QScriptValue -> QRegExp uses RegExp2 pattern syntax
+ QTest::newRow("regexp") << qVariantFromValue(QRegExp("^\\d\\d?$", Qt::CaseInsensitive, QRegExp::RegExp2));
+#endif
}
void tst_QDeclarativeWorkerScript::messaging_sendQObjectList()