diff options
Diffstat (limited to 'tests/auto/qml/qjsengine/tst_qjsengine.cpp')
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 52379a29a4..479584af54 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -191,6 +191,7 @@ private slots: void v4FunctionWithoutQML(); void withNoContext(); + void holeInPropertyData(); signals: void testSignal(); @@ -4013,6 +4014,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" |