diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-17 15:18:52 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-17 15:18:52 (GMT) |
commit | a1ed3535882455cd30d46f338d9823452b53434e (patch) | |
tree | ef7dc6665e1f3e46753f54f8ce2cd058bbd7a7d1 /tests/auto | |
parent | 46a33725125f0b5408fd421ae8fd9f4c76a123ab (diff) | |
download | Qt-a1ed3535882455cd30d46f338d9823452b53434e.zip Qt-a1ed3535882455cd30d46f338d9823452b53434e.tar.gz Qt-a1ed3535882455cd30d46f338d9823452b53434e.tar.bz2 |
test default scope chain after a new context has been pushed
The scope chain should contain the activation object and the Global
Object.
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qscriptcontext/tst_qscriptcontext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index 17d57a3..c09ebdb 100644 --- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp +++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp @@ -485,6 +485,9 @@ void tst_QScriptContext::pushAndPopContext() QCOMPARE(ctx->activationObject().isObject(), true); QCOMPARE(ctx->callee().isValid(), false); QCOMPARE(ctx->thisObject().strictlyEquals(eng.globalObject()), true); + QCOMPARE(ctx->scopeChain().size(), 2); + QVERIFY(ctx->scopeChain().at(0).equals(ctx->activationObject())); + QVERIFY(ctx->scopeChain().at(1).equals(eng.globalObject())); QScriptContext *ctx2 = eng.pushContext(); QCOMPARE(ctx2->parentContext(), ctx); |