diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-29 16:03:25 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-30 12:42:06 (GMT) |
commit | c73ff675063c9dd0266f0c66b821b85d44df3a90 (patch) | |
tree | 09309825827c3ac17a69a84f7395658cda152404 /tests/auto/qscriptengine | |
parent | 2d1020683ad9aa81ee78e1a5419a3b51d8b36270 (diff) | |
download | Qt-c73ff675063c9dd0266f0c66b821b85d44df3a90.zip Qt-c73ff675063c9dd0266f0c66b821b85d44df3a90.tar.gz Qt-c73ff675063c9dd0266f0c66b821b85d44df3a90.tar.bz2 |
Implement QScriptEngine::pushContext end popContext
Reviewed-by: Kent Hansen
Diffstat (limited to 'tests/auto/qscriptengine')
-rw-r--r-- | tests/auto/qscriptengine/tst_qscriptengine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index bae2c87..8ba0fd1 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -174,26 +174,30 @@ void tst_QScriptEngine::pushPopContext() QScriptContext *globalCtx = eng.currentContext(); QScriptContext *ctx = eng.pushContext(); QVERIFY(ctx != 0); - QEXPECT_FAIL("", "", Abort); QCOMPARE(ctx->parentContext(), globalCtx); QVERIFY(!ctx->isCalledAsConstructor()); QVERIFY(!ctx->callee().isValid()); QVERIFY(ctx->thisObject().strictlyEquals(eng.globalObject())); QCOMPARE(ctx->argumentCount(), 0); + QEXPECT_FAIL("", "Backtrace not implemented", Continue); QCOMPARE(ctx->backtrace().size(), 2); QCOMPARE(ctx->engine(), &eng); QCOMPARE(ctx->state(), QScriptContext::NormalState); + QEXPECT_FAIL("", "activationObject not implemented", Continue); QVERIFY(ctx->activationObject().isObject()); QVERIFY(ctx->argumentsObject().isObject()); QScriptContext *ctx2 = eng.pushContext(); QVERIFY(ctx2 != 0); QCOMPARE(ctx2->parentContext(), ctx); + QEXPECT_FAIL("", "activationObject not implemented", Continue); QVERIFY(!ctx2->activationObject().strictlyEquals(ctx->activationObject())); QVERIFY(!ctx2->argumentsObject().strictlyEquals(ctx->argumentsObject())); eng.popContext(); eng.popContext(); + QEXPECT_FAIL("", "cannot pop more context than it pushes", Abort); + QVERIFY(false); eng.popContext(); // ignored eng.popContext(); // ignored } |