diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-06-15 15:52:10 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-06-15 15:53:17 (GMT) |
commit | 9134604eb34b7757b071bae725d57a880a8b62d6 (patch) | |
tree | e49ab3214695bfd51e7cb916772d4df95c0ca019 | |
parent | a7362cdfa071e2987e403245f0c58936485d1fba (diff) | |
download | Qt-9134604eb34b7757b071bae725d57a880a8b62d6.zip Qt-9134604eb34b7757b071bae725d57a880a8b62d6.tar.gz Qt-9134604eb34b7757b071bae725d57a880a8b62d6.tar.bz2 |
add test for task 256184
-rw-r--r-- | tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp index aa5da04..41e14ce 100644 --- a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp +++ b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp @@ -118,8 +118,22 @@ void tst_QScriptEngineDebugger::attachAndDetach() { QScriptEngineDebugger debugger; QScriptEngine engine; + QScriptValue oldPrint = engine.globalObject().property("print"); + QVERIFY(oldPrint.isFunction()); + QVERIFY(!engine.globalObject().property("__FILE__").isValid()); + QVERIFY(!engine.globalObject().property("__LINE__").isValid()); + debugger.attachTo(&engine); + QVERIFY(engine.globalObject().property("__FILE__").isUndefined()); + QVERIFY(engine.globalObject().property("__LINE__").isNumber()); + QVERIFY(!engine.globalObject().property("print").strictlyEquals(oldPrint)); + debugger.detach(); + QEXPECT_FAIL("", "Task 256184", Continue); + QVERIFY(!engine.globalObject().property("print").isValid()); + QEXPECT_FAIL("", "Task 256184", Continue); + QVERIFY(!engine.globalObject().property("__FILE__").isValid()); +// QVERIFY(!engine.globalObject().property("__LINE__").isValid()); } { QScriptEngineDebugger debugger; |