aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-27 11:41:13 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-03 20:05:14 +0000
commit5747a7530206ac410b6bd7c1b8490d7d389ad3a5 (patch)
treeafca9153823b1a9efdf878be80922bce693eaefd /tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
parent7e6485a046fde121f0e6fdf954162354939ff1d8 (diff)
Add Generator support
Add support for ES6 generators. Those are currently always executed in the interpreter (we never JIT them), to simplify the initial implementation. Most functionality, except for 'yield *' expressions are supported. 'yield *' will have to wait until we support for(... of ...) Change-Id: I7c059d1e3b301cbcb79e3746b4bec346738fd426 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp')
-rw-r--r--tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp b/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
index f3367162a3..e6c8a4773b 100644
--- a/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
+++ b/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
@@ -577,7 +577,9 @@ void Test262Runner::addResult(TestCase result)
;
} else if (result.strictResult == TestCase::Crashes) {
qDebug() << "FAIL:" << test << "crashed in strict mode!";
- } else if ((result.strictResult == TestCase::Fails) == (result.strictExpectation == TestCase::Fails)) {
+ } else if ((result.strictResult == TestCase::Fails) && (result.strictExpectation == TestCase::Fails)) {
+ qDebug() << "PASS:" << test << "failed in strict mode as expected";
+ } else if ((result.strictResult == TestCase::Passes) == (result.strictExpectation == TestCase::Passes)) {
qDebug() << "PASS:" << test << "passed in strict mode";
} else if (!(result.strictExpectation == TestCase::Fails)) {
qDebug() << "FAIL:" << test << "failed in strict mode";
@@ -589,7 +591,9 @@ void Test262Runner::addResult(TestCase result)
;
} else if (result.sloppyResult == TestCase::Crashes) {
qDebug() << "FAIL:" << test << "crashed in sloppy mode!";
- } else if ((result.sloppyResult == TestCase::Fails) == (result.sloppyExpectation == TestCase::Fails)) {
+ } else if ((result.sloppyResult == TestCase::Fails) && (result.sloppyExpectation == TestCase::Fails)) {
+ qDebug() << "PASS:" << test << "failed in sloppy mode as expected";
+ } else if ((result.sloppyResult == TestCase::Passes) == (result.sloppyExpectation == TestCase::Passes)) {
qDebug() << "PASS:" << test << "passed in sloppy mode";
} else if (!(result.sloppyExpectation == TestCase::Fails)) {
qDebug() << "FAIL:" << test << "failed in sloppy mode";