aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-12-01 13:22:12 +0000
committerQt by Nokia <qt-info@nokia.com>2011-12-01 15:05:14 +0100
commit284b57aef7a2f9fc2336c20d2929babb7dbd0262 (patch)
treee4dc037621d38d8a2bfea521ab9b7fd39d2e716f /tests/auto/declarative/qdeclarativeecmascript
parent84079cec36b6c4ffc80316d27ca6e439be064035 (diff)
Ignore test warnings
Change-Id: Ib22ea43970e2e4c9635063dc3af6d6f130cc2a18 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 52e76614a3..c4b9c74cdb 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -4885,8 +4885,17 @@ void tst_qdeclarativeecmascript::in()
void tst_qdeclarativeecmascript::typeOf()
{
QDeclarativeComponent component(&engine, TEST_FILE("typeOf.qml"));
+
+ // These warnings should not happen once QTBUG-21864 is fixed
+ QString warning1 = component.url().toString() + QLatin1String(":16: Error: Cannot assign [undefined] to QString");
+ QString warning2 = component.url().resolved(QUrl("typeOf.js")).toString() + QLatin1String(":1: ReferenceError: Can't find variable: a");
+
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
QObject *o = component.create();
QVERIFY(o != 0);
+
QEXPECT_FAIL("", "QTBUG-21864", Abort);
QCOMPARE(o->property("test1").toString(), QLatin1String("undefined"));
QCOMPARE(o->property("test2").toString(), QLatin1String("object"));
@@ -5381,6 +5390,10 @@ void tst_qdeclarativeecmascript::switchStatement()
{
QDeclarativeComponent component(&engine, TEST_FILE("switchStatement.4.qml"));
+
+ QString warning = component.url().toString() + ":4: Unable to assign [undefined] to int";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
+
MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
QVERIFY(object != 0);
@@ -5398,7 +5411,6 @@ void tst_qdeclarativeecmascript::switchStatement()
object->setStringProperty("F");
QCOMPARE(object->value(), 3);
- QString warning = component.url().toString() + ":4: Unable to assign [undefined] to int";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
object->setStringProperty("something else");