diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-04-16 11:15:55 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-04-16 11:53:40 +0200 |
commit | 561a7bf35b96ffe70ebafc3876e965ef41b4441d (patch) | |
tree | 100a9fcde25a603ddb1627da20b3a74fb912d726 /tests/auto/declarative/parserstress/tst_parserstress.cpp | |
parent | 269623184ee55bd8126cf3ae5cfb619d3bdda91b (diff) | |
download | qt4-tools-561a7bf35b96ffe70ebafc3876e965ef41b4441d.tar.gz |
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.cpp | 6 |
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 41c0a1b7dd..971496da6a 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)) { |