diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-17 11:37:48 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-17 11:37:48 (GMT) |
commit | 55e4d1453f6ddbca69599047f5638ca2cd63bd0c (patch) | |
tree | 5692542a26cc184ce40a33cf235f1d236474c133 /tests/auto/qscriptvalue | |
parent | 525251ecded0a57e6b456cc787094a5703d7ff13 (diff) | |
download | Qt-55e4d1453f6ddbca69599047f5638ca2cd63bd0c.zip Qt-55e4d1453f6ddbca69599047f5638ca2cd63bd0c.tar.gz Qt-55e4d1453f6ddbca69599047f5638ca2cd63bd0c.tar.bz2 |
make QScriptValue::toString() et al work when there's an exception
JSC refuses to call functions when there's an exception that hasn't
been dealt with, so save the exception and restore it afterwards.
Diffstat (limited to 'tests/auto/qscriptvalue')
-rw-r--r-- | tests/auto/qscriptvalue/tst_qscriptvalue.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index f29fa82..2dd3d10 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -2153,11 +2153,10 @@ void tst_QScriptValue::getSetPrototype() { QScriptValue ret = eng.evaluate("o = { }; p = { }; o.__proto__ = p; p.__proto__ = o"); - QEXPECT_FAIL("", "Cyclic prototype detection not implemented", Abort); QCOMPARE(eng.hasUncaughtException(), true); QVERIFY(ret.strictlyEquals(eng.uncaughtException())); QCOMPARE(ret.isError(), true); - QCOMPARE(ret.toString(), QLatin1String("Error: cycle in prototype chain")); + QCOMPARE(ret.toString(), QLatin1String("Error: cyclic __proto__ value")); } { QScriptValue ret = eng.evaluate("p.__proto__ = { }"); |