summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptengine
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-30 15:26:49 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-30 15:26:49 (GMT)
commit06f033bc8446d6b82bf68a2a0766b75836e005db (patch)
tree1d9b3a1c1636558c1c555725fa0d8148f352f046 /tests/auto/qscriptengine
parent34e6fb628673cfa7b56cad95b765ef3a0fc24f66 (diff)
downloadQt-06f033bc8446d6b82bf68a2a0766b75836e005db.zip
Qt-06f033bc8446d6b82bf68a2a0766b75836e005db.tar.gz
Qt-06f033bc8446d6b82bf68a2a0766b75836e005db.tar.bz2
update test to match JSC __defineSetter__() behavior
Diffstat (limited to 'tests/auto/qscriptengine')
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 9067005..1f7a857 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -3232,18 +3232,16 @@ void tst_QScriptEngine::getterSetterThisObject()
// read
eng.evaluate("act.__defineGetter__('x', function() { return this; })");
QVERIFY(eng.evaluate("x === act").toBoolean());
- QEXPECT_FAIL("", "", Continue);
- QVERIFY(eng.evaluate("with (act) x").equals(eng.evaluate("act")));
+ QEXPECT_FAIL("", "Exotic overload (don't care for now)", Continue);
+ QVERIFY(eng.evaluate("with (act) x").equals("foo"));
QVERIFY(eng.evaluate("(function() { with (act) return x; })() === act").toBoolean());
eng.evaluate("q = {}; with (act) with (q) x").equals(eng.evaluate("act"));
eng.evaluate("with (q) with (act) x").equals(eng.evaluate("act"));
// write
eng.evaluate("act.__defineSetter__('x', function() { return this; });");
- QVERIFY(eng.evaluate("(x = 'foo') === act").toBoolean());
- QEXPECT_FAIL("", "", Continue);
- QVERIFY(eng.evaluate("with (act) x = 'foo'").equals(eng.evaluate("act")));
- QEXPECT_FAIL("", "", Continue);
- QVERIFY(eng.evaluate("with (act) with (q) x = 'foo'").equals(eng.evaluate("act")));
+ QVERIFY(eng.evaluate("(x = 'foo') === 'foo'").toBoolean());
+ QVERIFY(eng.evaluate("with (act) x = 'foo'").equals("foo"));
+ QVERIFY(eng.evaluate("with (act) with (q) x = 'foo'").equals("foo"));
eng.popContext();
}
}