aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-07-10 16:54:18 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-31 17:09:38 +0000
commit53dba3fddef25d5668ed77c929c5ad611c9da544 (patch)
tree3dc1410380b78651d840044336d11cc14c5ee34a /tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
parent77449db6e086e8ac6594c432fede027656be0da0 (diff)
Enable running module tests
They all fail right now (unless pass by accident). Change-Id: I0a64bd29459ef32f555614a1decea3419bd44170 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp')
-rw-r--r--tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp b/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
index 989c4e08a2..4fa7137820 100644
--- a/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
+++ b/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp
@@ -498,7 +498,10 @@ void SingleTest::run()
data.sloppyResult = TestCase::Skipped;
}
if (data.runInStrictMode) {
- QByteArray c = "'use strict';\n" + data.content;
+ QByteArray c = data.content;
+ // modules are strict by default.
+ if (!data.runAsModuleCode)
+ c.prepend("'use strict';\n");
bool ok = ::executeTest(c);
if (data.negative)
ok = !ok;
@@ -550,7 +553,7 @@ int Test262Runner::runSingleTest(TestCase testCase)
TestData data = getTestData(testCase);
// qDebug() << "starting test" << data.test;
- if (data.isExcluded || data.async || data.runAsModuleCode)
+ if (data.isExcluded || data.async)
return 0;
if (threadPool) {
@@ -728,6 +731,11 @@ void Test262Runner::parseYaml(const QByteArray &content, TestData *data)
data->runAsModuleCode = flags.contains("module");
data->async = flags.contains("async");
+ if (data->runAsModuleCode) {
+ data->runInStrictMode = true;
+ data->runInSloppyMode = false;
+ }
+
YamlSection includes(yaml, "includes:");
data->includes = includes.keywords();