aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsengine/tst_qjsengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qjsengine/tst_qjsengine.cpp')
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index f4eb17f1ca..ec6245aa1c 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -139,6 +139,7 @@ private slots:
void arrayPop_QTBUG_35979();
void array_unshift_QTBUG_52065();
+ void array_join_QTBUG_53672();
void regexpLastMatch();
void indexedAccesses();
@@ -190,6 +191,7 @@ private slots:
void v4FunctionWithoutQML();
void withNoContext();
+ void holeInPropertyData();
signals:
void testSignal();
@@ -3186,6 +3188,14 @@ void tst_QJSEngine::array_unshift_QTBUG_52065()
QCOMPARE(result.property(i).toInt(), i);
}
+void tst_QJSEngine::array_join_QTBUG_53672()
+{
+ QJSEngine eng;
+ QJSValue result = eng.evaluate("Array.prototype.join.call(0)");
+ QVERIFY(result.isString());
+ QCOMPARE(result.toString(), QString(""));
+}
+
void tst_QJSEngine::regexpLastMatch()
{
QJSEngine eng;
@@ -4019,6 +4029,19 @@ void tst_QJSEngine::withNoContext()
engine.evaluate("with (noContext) true");
}
+void tst_QJSEngine::holeInPropertyData()
+{
+ QJSEngine engine;
+ QJSValue ok = engine.evaluate(
+ "var o = {};\n"
+ "o.bar = 0xcccccccc;\n"
+ "o.foo = 0x55555555;\n"
+ "Object.defineProperty(o, 'bar', { get: function() { return 0xffffffff }});\n"
+ "o.bar === 0xffffffff && o.foo === 0x55555555;");
+ QVERIFY(ok.isBool());
+ QVERIFY(ok.toBool());
+}
+
QTEST_MAIN(tst_QJSEngine)
#include "tst_qjsengine.moc"