summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/parserstress
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-04-21 12:39:20 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2010-04-21 12:39:20 (GMT)
commit44a28b5530d3be2a12c91d084ea02f19aa6a9db3 (patch)
treed4b3a2197228a7fffaad189857ae6e1a40134acd /tests/auto/declarative/parserstress
parent94cca4856d4a023a6f79ddc290c4495803557e93 (diff)
downloadQt-44a28b5530d3be2a12c91d084ea02f19aa6a9db3.zip
Qt-44a28b5530d3be2a12c91d084ea02f19aa6a9db3.tar.gz
Qt-44a28b5530d3be2a12c91d084ea02f19aa6a9db3.tar.bz2
Fixed declarative/parserstress autotest.
The test ecma_3/Unicode/regress-352044-02-n.js is expected to throw an uncaught syntax error when parsing the expression statement "i \u002b= 1;". Task-number: QTBUG-8108
Diffstat (limited to 'tests/auto/declarative/parserstress')
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index f1e9c6e..294f2f7 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -130,16 +130,24 @@ void tst_parserstress::ecmascript()
QDeclarativeComponent component(&engine);
component.setData(qmlData, QUrl::fromLocalFile(SRCDIR + QString("/dummy.qml")));
- QSet<QString> failingTests;
- failingTests << "regress-352044-02-n.js";
+
QFileInfo info(file);
- foreach (const QString &failing, failingTests) {
- if (info.fileName().endsWith(failing)) {
- QEXPECT_FAIL("", "QTBUG-8108", Continue);
- break;
- }
+
+ if (info.fileName() == QLatin1String("regress-352044-02-n.js")) {
+ QVERIFY(component.isError());
+
+ QCOMPARE(component.errors().length(), 2);
+
+ QCOMPARE(component.errors().at(0).description(), QString("Expected token `;'"));
+ QCOMPARE(component.errors().at(0).line(), 66);
+
+ QCOMPARE(component.errors().at(1).description(), QString("Expected token `;'"));
+ QCOMPARE(component.errors().at(1).line(), 142);
+
+ } else {
+
+ QVERIFY(!component.isError());
}
- QVERIFY(!component.isError());
}