aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp41
-rw-r--r--tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp29
-rw-r--r--tests/auto/qml/ecmascripttests/TestExpectations1
m---------tests/auto/qml/ecmascripttests/test2620
-rw-r--r--tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp13
-rw-r--r--tests/auto/qml/qml.pro3
-rw-r--r--tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp28
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp56
-rw-r--r--tests/auto/quick/qquickflickable/BLACKLIST2
-rw-r--r--tests/manual/v4/fact.2.js2
10 files changed, 90 insertions, 85 deletions
diff --git a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
index 33b294593f..3cd359cf48 100644
--- a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
+++ b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
@@ -1189,6 +1189,14 @@ void tst_QQmlDebugJS::stepNext()
QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(STEPACTION_QMLFILE));
}
+static QVariantMap responseBody(QJSDebugClient *client)
+{
+ const QString jsonString(client->response);
+ const QVariantMap value = client->parser.call(QJSValueList() << QJSValue(jsonString))
+ .toVariant().toMap();
+ return value.value("body").toMap();
+}
+
void tst_QQmlDebugJS::stepIn()
{
//void continueDebugging(StepAction stepAction, int stepCount = 1);
@@ -1197,21 +1205,18 @@ void tst_QQmlDebugJS::stepIn()
QFETCH(bool, namesAsObjects);
int sourceLine = 41;
- int actualLine = 37;
+ int actualLine = 36;
QCOMPARE(init(qmlscene, STEPACTION_QMLFILE), ConnectSuccess);
m_client->setBreakpoint(QLatin1String(STEPACTION_QMLFILE), sourceLine, 1, true);
m_client->connect(redundantRefs, namesAsObjects);
QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(stopped())));
+ QCOMPARE(responseBody(m_client).value("sourceLine").toInt(), sourceLine);
m_client->continueDebugging(QJSDebugClient::In);
QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(stopped())));
- QString jsonString(m_client->response);
- QVariantMap value = m_client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap();
-
- QVariantMap body = value.value("body").toMap();
-
+ const QVariantMap body = responseBody(m_client);
QCOMPARE(body.value("sourceLine").toInt(), actualLine);
QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(STEPACTION_QMLFILE));
}
@@ -1230,15 +1235,12 @@ void tst_QQmlDebugJS::stepOut()
m_client->setBreakpoint(QLatin1String(STEPACTION_QMLFILE), sourceLine, -1, true);
m_client->connect(redundantRefs, namesAsObjects);
QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(stopped())));
+ QCOMPARE(responseBody(m_client).value("sourceLine").toInt(), sourceLine);
m_client->continueDebugging(QJSDebugClient::Out);
QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(stopped())));
- QString jsonString(m_client->response);
- QVariantMap value = m_client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap();
-
- QVariantMap body = value.value("body").toMap();
-
+ const QVariantMap body = responseBody(m_client);
QCOMPARE(body.value("sourceLine").toInt(), actualLine);
QCOMPARE(QFileInfo(body.value("script").toMap().value("name").toString()).fileName(), QLatin1String(STEPACTION_QMLFILE));
}
@@ -1332,16 +1334,15 @@ void tst_QQmlDebugJS::evaluateInGlobalScope()
m_client->connect();
- do {
+ for (int i = 0; i < 10; ++i) {
// The engine might not be initialized, yet. We just try until it shows up.
m_client->evaluate(QLatin1String("console.log('Hello World')"));
- } while (!QQmlDebugTest::waitForSignal(m_client, SIGNAL(result()), 500));
+ if (QQmlDebugTest::waitForSignal(m_client, SIGNAL(result()), 500))
+ break;
+ }
//Verify the return value of 'console.log()', which is "undefined"
- QString jsonString(m_client->response);
- QVariantMap value = m_client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap();
- QVariantMap body = value.value("body").toMap();
- QCOMPARE(body.value("type").toString(),QLatin1String("undefined"));
+ QCOMPARE(responseBody(m_client).value("type").toString(), QLatin1String("undefined"));
}
void tst_QQmlDebugJS::evaluateInLocalScope()
@@ -1426,11 +1427,7 @@ void tst_QQmlDebugJS::evaluateInContext()
m_client->evaluate(QLatin1String("a + 10"), -1, object.debugId);
QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(result())));
- QString jsonString = m_client->response;
- QVariantMap value = m_client->parser.call(QJSValueList() << QJSValue(jsonString)).toVariant().toMap();
-
- QVariantMap body = value.value("body").toMap();
- QTRY_COMPARE(body.value("value").toInt(), 20);
+ QTRY_COMPARE(responseBody(m_client).value("value").toInt(), 20);
}
void tst_QQmlDebugJS::getScripts()
diff --git a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
index fd74135727..9da4a63ce6 100644
--- a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
+++ b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
@@ -38,7 +38,6 @@
#include <private/qv4debugging_p.h>
#include <private/qv8engine_p.h>
#include <private/qv4objectiterator_p.h>
-#include <private/qv4isel_moth_p.h>
#include <private/qv4string_p.h>
#include <private/qqmlbuiltinfunctions_p.h>
#include <private/qqmldebugservice_p.h>
@@ -46,7 +45,7 @@
using namespace QV4;
using namespace QV4::Debugging;
-typedef void (*InjectedFunction)(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData);
+typedef QV4::ReturnedValue (*InjectedFunction)(const QV4::BuiltinFunction *, QV4::CallData *callData);
Q_DECLARE_METATYPE(InjectedFunction)
static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
@@ -343,7 +342,6 @@ void tst_qv4debugger::init()
m_javaScriptThread = new QThread;
m_engine = new TestEngine;
m_v4 = m_engine->v4Engine();
- m_v4->iselFactory.reset(new QV4::Moth::ISelFactory);
m_v4->setDebugger(new QV4Debugger(m_v4));
m_engine->moveToThread(m_javaScriptThread);
m_javaScriptThread->start();
@@ -438,9 +436,9 @@ void tst_qv4debugger::addBreakPointWhilePaused()
QCOMPARE(state.lineNumber, 2);
}
-static void someCall(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *)
+static QV4::ReturnedValue someCall(const QV4::BuiltinFunction *function, QV4::CallData *)
{
- static_cast<QV4Debugger *>(scope.engine->debugger())
+ static_cast<QV4Debugger *>(function->engine()->debugger())
->removeBreakPoint("removeBreakPointForNextInstruction", 2);
RETURN_UNDEFINED();
}
@@ -464,7 +462,7 @@ void tst_qv4debugger::conditionalBreakPoint()
{
m_debuggerAgent->m_captureContextInfo = true;
QString script =
- "function test() {\n"
+ "var test = function() {\n"
" for (var i = 0; i < 15; ++i) {\n"
" var x = i;\n"
" }\n"
@@ -491,7 +489,6 @@ void tst_qv4debugger::conditionalBreakPointInQml()
QQmlEngine engine;
QV4::ExecutionEngine *v4 = QV8Engine::getV4(&engine);
QV4Debugger *v4Debugger = new QV4Debugger(v4);
- v4->iselFactory.reset(new QV4::Moth::ISelFactory);
v4->setDebugger(v4Debugger);
QScopedPointer<QThread> debugThread(new QThread);
@@ -531,7 +528,7 @@ void tst_qv4debugger::readArguments()
m_debuggerAgent->m_captureContextInfo = true;
QString script =
- "function f(a, b, c, d) {\n"
+ "var f = function(a, b, c, d) {\n"
" return a === b\n"
"}\n"
"var four;\n"
@@ -557,7 +554,7 @@ void tst_qv4debugger::readLocals()
m_debuggerAgent->m_captureContextInfo = true;
QString script =
- "function f(a, b) {\n"
+ "var f = function(a, b) {\n"
" var c = a + b\n"
" var d = a - b\n" // breakpoint, c should be set, d should be undefined
" return c === d\n"
@@ -583,7 +580,7 @@ void tst_qv4debugger::readObject()
m_debuggerAgent->m_captureContextInfo = true;
QString script =
- "function f(a) {\n"
+ "var f = function(a) {\n"
" var b = a\n"
" return b\n"
"}\n"
@@ -641,7 +638,7 @@ void tst_qv4debugger::readContextInAllFrames()
m_debuggerAgent->m_captureContextInfo = true;
QString script =
- "function fact(n) {\n"
+ "var fact = function(n) {\n"
" if (n > 1) {\n"
" var n_1 = n - 1;\n"
" n_1 = fact(n_1);\n"
@@ -814,13 +811,13 @@ void tst_qv4debugger::lastLineOfConditional_data()
QTest::newRow("do..while {block}") << "do {\n" << "} while (ret < 10);" << 4 << 7;
QTest::newRow("if true {block}") << "if (true) {\n" << "}"
- << 4 << 7;
+ << 4 << 8;
QTest::newRow("if false {block}") << "if (false) {\n" << "}"
<< 2 << 8;
QTest::newRow("if true else {block}") << "if (true) {\n" << "} else {\n ret += 8;\n}"
- << 4 << 7;
+ << 4 << 10;
QTest::newRow("if false else {block}") << "if (false) {\n" << "} else {\n ret += 8;\n}"
- << 8 << 9;
+ << 8 << 10;
QTest::newRow("for statement") << "for (var i = 0; i < 10; ++i)\n" << "" << 4 << 2;
QTest::newRow("for..in statement") << "for (var i in [0, 1, 2, 3, 4])\n" << "" << 4 << 2;
@@ -829,11 +826,11 @@ void tst_qv4debugger::lastLineOfConditional_data()
// For two nested if statements without blocks, we need to map the jump from the inner to the
// outer one on the outer "if". There is just no better place.
- QTest::newRow("if true statement") << "if (true)\n" << "" << 4 << 2;
+ QTest::newRow("if true statement") << "if (true)\n" << "" << 4 << 8;
QTest::newRow("if false statement") << "if (false)\n" << "" << 2 << 8;
// Also two nested ifs without blocks.
- QTest::newRow("if true else statement") << "if (true)\n" << "else\n ret += 8;" << 4 << 2;
+ QTest::newRow("if true else statement") << "if (true)\n" << "else\n ret += 8;" << 4 << 9;
QTest::newRow("if false else statement") << "if (false)\n" << "else\n ret += 8;" << 8 << 9;
}
diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations
index 27498de473..589f25d174 100644
--- a/tests/auto/qml/ecmascripttests/TestExpectations
+++ b/tests/auto/qml/ecmascripttests/TestExpectations
@@ -15,7 +15,6 @@ S15.1.2.3_A2_T10
15.5.4.20-3-5
15.5.4.20-3-6
-10.4.3-1-106 failing
11.2.3-3_3 failing
S13_A15_T4 failing
S15.4.4.3_A1_T1 failing
diff --git a/tests/auto/qml/ecmascripttests/test262 b/tests/auto/qml/ecmascripttests/test262
-Subproject fe58b18c13d1ea5d42951e5b698efc3bfab6dc8
+Subproject d60c4ed97e69639bc5bc1db43a98828debf80c8
diff --git a/tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp b/tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp
index 880e254543..4303aec2a7 100644
--- a/tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp
+++ b/tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp
@@ -35,28 +35,17 @@ class tst_EcmaScriptTests : public QObject
{
Q_OBJECT
private slots:
- void runTests_data();
void runTests();
};
-void tst_EcmaScriptTests::runTests_data()
-{
- QTest::addColumn<QString>("qmljsParameter");
-
- QTest::newRow("jit") << QStringLiteral("--jit");
- QTest::newRow("interpreter") << QStringLiteral("--interpret");
-}
-
void tst_EcmaScriptTests::runTests()
{
#if defined(Q_OS_LINUX) && defined(Q_PROCESSOR_X86_64)
- QFETCH(QString, qmljsParameter);
-
QProcess process;
process.setProcessChannelMode(QProcess::ForwardedChannels);
process.setWorkingDirectory(QLatin1String(SRCDIR));
process.setProgram("python");
- process.setArguments(QStringList() << "test262.py" << "--command=" + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs " + qmljsParameter << "--parallel" << "--with-test-expectations");
+ process.setArguments(QStringList() << "test262.py" << "--command=" + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs" << "--parallel" << "--with-test-expectations");
qDebug() << "Going to run" << process.program() << process.arguments() << "in" << process.workingDirectory();
diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro
index 05528eea30..8471d6466f 100644
--- a/tests/auto/qml/qml.pro
+++ b/tests/auto/qml/qml.pro
@@ -35,7 +35,6 @@ PUBLICTESTS += \
PRIVATETESTS += \
qqmlcpputils \
qqmldirparser \
- v4misc \
qmlcachegen
PRIVATETESTS += \
@@ -77,7 +76,7 @@ qtHaveModule(widgets) {
PUBLICTESTS += \
qjsengine \
qjsvalue \
- qwidgetsinqml
+# qwidgetsinqml
}
SUBDIRS += $$PUBLICTESTS
diff --git a/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp b/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp
index e75e51ed29..cdc9f29aab 100644
--- a/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp
+++ b/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp
@@ -30,10 +30,9 @@
#include <private/qv4compileddata_p.h>
#include <private/qv4compiler_p.h>
-#include <private/qv4jsir_p.h>
-#include <private/qv4isel_p.h>
#include <private/qv8engine_p.h>
#include <private/qv4engine_p.h>
+#include <private/qv4codegen_p.h>
#include <QQmlComponent>
#include <QQmlEngine>
#include <QQmlFileSelector>
@@ -174,9 +173,8 @@ struct TestCompiler
bool verify()
{
- QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine);
- QQmlRefPointer<QV4::CompiledData::CompilationUnit> unit = v4->iselFactory->createUnitForLoading();
- return unit->loadFromDisk(QUrl::fromLocalFile(testFilePath), QFileInfo(testFilePath).lastModified(), v4->iselFactory.data(), &lastErrorString);
+ QQmlRefPointer<QV4::CompiledData::CompilationUnit> unit = QV4::Compiler::Codegen::createUnitForLoading();
+ return unit->loadFromDisk(QUrl::fromLocalFile(testFilePath), QFileInfo(testFilePath).lastModified(), &lastErrorString);
}
void closeMapping()
@@ -231,12 +229,14 @@ void tst_qmldiskcache::regenerateAfterChange()
const QV4::CompiledData::Object *obj = testUnit->objectAt(0);
QCOMPARE(quint32(obj->nBindings), quint32(1));
QCOMPARE(quint32(obj->bindingTable()->type), quint32(QV4::CompiledData::Binding::Type_Script));
- QCOMPARE(quint32(obj->bindingTable()->value.compiledScriptIndex), quint32(1));
+ QCOMPARE(quint32(obj->bindingTable()->value.compiledScriptIndex), quint32(0));
- QCOMPARE(quint32(testUnit->functionTableSize), quint32(2));
+ QCOMPARE(quint32(testUnit->functionTableSize), quint32(1));
- const QV4::CompiledData::Function *bindingFunction = testUnit->functionAt(1);
- QVERIFY(bindingFunction->codeOffset > testUnit->unitSize);
+ const QV4::CompiledData::Function *bindingFunction = testUnit->functionAt(0);
+ QCOMPARE(testUnit->stringAt(bindingFunction->nameIndex), QString("expression for blah")); // check if we have the correct function
+ QVERIFY(bindingFunction->codeSize > 0);
+ QVERIFY(bindingFunction->codeOffset < testUnit->unitSize);
}
{
@@ -257,10 +257,12 @@ void tst_qmldiskcache::regenerateAfterChange()
QCOMPARE(quint32(obj->bindingTable()->type), quint32(QV4::CompiledData::Binding::Type_Number));
QCOMPARE(obj->bindingTable()->valueAsNumber(), double(42));
- QCOMPARE(quint32(testUnit->functionTableSize), quint32(2));
+ QCOMPARE(quint32(testUnit->functionTableSize), quint32(1));
- const QV4::CompiledData::Function *bindingFunction = testUnit->functionAt(1);
- QVERIFY(bindingFunction->codeOffset > testUnit->unitSize);
+ const QV4::CompiledData::Function *bindingFunction = testUnit->functionAt(0);
+ QCOMPARE(testUnit->stringAt(bindingFunction->nameIndex), QString("expression for blah")); // check if we have the correct function
+ QVERIFY(bindingFunction->codeSize > 0);
+ QVERIFY(bindingFunction->codeOffset < testUnit->unitSize);
}
}
@@ -364,7 +366,7 @@ void tst_qmldiskcache::basicVersionChecks()
});
QVERIFY(!testCompiler.verify());
- QCOMPARE(testCompiler.lastErrorString, QString::fromUtf8("Code generator mismatch. Found code generated by but expected %1").arg(QV8Engine::getV4(&engine)->iselFactory->codeGeneratorName));
+ QCOMPARE(testCompiler.lastErrorString, QString::fromUtf8("Code generator mismatch. Found code generated by but expected %1").arg(QStringLiteral("moth")));
}
}
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 4388e1412c..4415e6cf74 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -43,6 +43,7 @@
#include "../../shared/util.h"
#include <private/qv4functionobject_p.h>
#include <private/qv4scopedvalue_p.h>
+#include <private/qv4jscall_p.h>
#include <private/qv4alloca_p.h>
#include <private/qv4runtime_p.h>
#include <private/qv4object_p.h>
@@ -342,6 +343,8 @@ private slots:
void freeze_empty_object();
void singleBlockLoops();
void qtbug_60547();
+ void delayLoadingArgs();
+ void manyArguments();
private:
// static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -2346,7 +2349,7 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::Value &o, const
QLatin1String(source) + QLatin1String(" })");
QV4::Scope scope(QV8Engine::getV4(engine));
- QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), functionSource);
+ QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), QV4::Compiler::EvalCode, functionSource);
program.inheritContext = true;
QV4::ScopedFunctionObject function(scope, program.run());
@@ -2354,10 +2357,10 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::Value &o, const
scope.engine->catchException();
return true;
}
- QV4::ScopedCallData d(scope, 1);
- d->args[0] = o;
- d->thisObject = engine->global();
- function->call(scope, d);
+ QV4::JSCallData jsCallData(scope, 1);
+ jsCallData->args[0] = o;
+ *jsCallData->thisObject = engine->global();
+ function->call(jsCallData);
if (scope.engine->hasException) {
scope.engine->catchException();
return true;
@@ -2372,7 +2375,7 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::Value &o,
QLatin1String(source) + QLatin1String(" })");
QV4::Scope scope(QV8Engine::getV4(engine));
- QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), functionSource);
+ QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), QV4::Compiler::EvalCode, functionSource);
program.inheritContext = true;
QV4::ScopedFunctionObject function(scope, program.run());
@@ -2383,15 +2386,16 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::Value &o,
if (!function)
return false;
- QV4::ScopedCallData d(scope, 1);
- d->args[0] = o;
- d->thisObject = engine->global();
- function->call(scope, d);
+ QV4::ScopedValue value(scope);
+ QV4::JSCallData jsCallData(scope, 1);
+ jsCallData->args[0] = o;
+ *jsCallData->thisObject = engine->global();
+ value = function->call(jsCallData);
if (scope.engine->hasException) {
scope.engine->catchException();
return false;
}
- return QV4::Runtime::method_strictEqual(scope.result, result);
+ return QV4::Runtime::method_strictEqual(value, result);
}
static inline QV4::ReturnedValue evaluate(QV8Engine *engine, const QV4::Value &o,
@@ -2402,7 +2406,7 @@ static inline QV4::ReturnedValue evaluate(QV8Engine *engine, const QV4::Value &o
QV4::Scope scope(QV8Engine::getV4(engine));
- QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), functionSource);
+ QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), QV4::Compiler::EvalCode, functionSource);
program.inheritContext = true;
QV4::ScopedFunctionObject function(scope, program.run());
@@ -2412,15 +2416,15 @@ static inline QV4::ReturnedValue evaluate(QV8Engine *engine, const QV4::Value &o
}
if (!function)
return QV4::Encode::undefined();
- QV4::ScopedCallData d(scope, 1);
- d->args[0] = o;
- d->thisObject = engine->global();
- function->call(scope, d);
+ QV4::JSCallData jsCallData(scope, 1);
+ jsCallData->args[0] = o;
+ *jsCallData->thisObject = engine->global();
+ QV4::ScopedValue result(scope, function->call(jsCallData));
if (scope.engine->hasException) {
scope.engine->catchException();
return QV4::Encode::undefined();
}
- return scope.result.asReturnedValue();
+ return result->asReturnedValue();
}
#define EVALUATE_ERROR(source) evaluate_error(engine, object, source)
@@ -8373,6 +8377,24 @@ void tst_qqmlecmascript::qtbug_60547()
QCOMPARE(object->property("counter"), QVariant(int(1)));
}
+void tst_qqmlecmascript::delayLoadingArgs()
+{
+ QJSEngine engine;
+ QJSValue ret = engine.evaluate("(function(x){return x + (x+=2)})(20)");
+ QCOMPARE(ret.toInt(), 42); // esp. not 44.
+}
+
+void tst_qqmlecmascript::manyArguments()
+{
+ const char *testCase =
+ "function x() { var sum; for (var i = 0; i < arguments.length; ++i) sum += arguments[i][0]; }"
+ "x([0],[1],[2],[3],[4],[5],[6],[7],[8],[9], [0],[1],[2],[3],[4],[5],[6],[7],[8],[9], [0],[1],[2],[3],[4],[5],[6],[7],[8],[9])";
+
+ QJSEngine engine;
+ engine.evaluate(testCase);
+}
+
+
QTEST_MAIN(tst_qqmlecmascript)
#include "tst_qqmlecmascript.moc"
diff --git a/tests/auto/quick/qquickflickable/BLACKLIST b/tests/auto/quick/qquickflickable/BLACKLIST
index f35397f119..0e29c1049f 100644
--- a/tests/auto/quick/qquickflickable/BLACKLIST
+++ b/tests/auto/quick/qquickflickable/BLACKLIST
@@ -1,7 +1,7 @@
# QTBUG-36804
osx-10.10
[rebound]
-osx-10.10
+osx
[movingAndFlicking:vertical]
osx-10.10
[movingAndFlicking:both]
diff --git a/tests/manual/v4/fact.2.js b/tests/manual/v4/fact.2.js
index d8f750b5a1..1696e8b80d 100644
--- a/tests/manual/v4/fact.2.js
+++ b/tests/manual/v4/fact.2.js
@@ -3,6 +3,6 @@ function fact(n) {
return n > 1 ? n * fact(n - 1) : 1
}
-for (var i = 0; i < 1000000; i = i + 1)
+for (var i = 0; i < 100000; i = i + 1)
fact(12)