summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/parserstress/tst_parserstress.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-04-16 09:15:55 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2010-04-16 09:53:40 (GMT)
commit561a7bf35b96ffe70ebafc3876e965ef41b4441d (patch)
tree100a9fcde25a603ddb1627da20b3a74fb912d726 /tests/auto/declarative/parserstress/tst_parserstress.cpp
parent269623184ee55bd8126cf3ae5cfb619d3bdda91b (diff)
downloadQt-561a7bf35b96ffe70ebafc3876e965ef41b4441d.zip
Qt-561a7bf35b96ffe70ebafc3876e965ef41b4441d.tar.gz
Qt-561a7bf35b96ffe70ebafc3876e965ef41b4441d.tar.bz2
Fixed parsing of inner labelled statements.
The JS grammar is ambigious and the following statement can be parsed as an object-literal followed by an inserted semicolon or as two labelled statements. outer: { inner: {} } In the old days we used to resolve the conflict by reducing the statement to an expression statement but this was wrong so now we prefer the labelled statement. As nice side effect, we pass two more tests in tests/auto/declarative/parserstress. Task-number: QTBUG-8108
Diffstat (limited to 'tests/auto/declarative/parserstress/tst_parserstress.cpp')
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index 41c0a1b..971496d 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -65,7 +65,7 @@ QStringList tst_parserstress::findJSFiles(const QDir &d)
{
QStringList rv;
- QStringList files = d.entryList(QStringList() << QLatin1String("*.js"),
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.js"),
QDir::Files);
foreach (const QString &file, files) {
if (file == "browser.js")
@@ -73,7 +73,7 @@ QStringList tst_parserstress::findJSFiles(const QDir &d)
rv << d.absoluteFilePath(file);
}
- QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
+ QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
QDir::NoSymLinks);
foreach (const QString &dir, dirs) {
QDir sub = d;
@@ -132,7 +132,7 @@ void tst_parserstress::ecmascript()
component.setData(qmlData, QUrl::fromLocalFile(SRCDIR + QString("/dummy.qml")));
QSet<QString> failingTests;
failingTests << "uc-003.js" << "uc-005.js" << "regress-352044-02-n.js"
- << "regress-334158.js" << "regress-58274.js" << "dowhile-006.js" << "dowhile-005.js";
+ << "regress-334158.js" << "regress-58274.js";
QFileInfo info(file);
foreach (const QString &failing, failingTests) {
if (info.fileName().endsWith(failing)) {