summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptenginedebugger
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-15 15:52:10 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-06-15 15:53:17 (GMT)
commit9134604eb34b7757b071bae725d57a880a8b62d6 (patch)
treee49ab3214695bfd51e7cb916772d4df95c0ca019 /tests/auto/qscriptenginedebugger
parenta7362cdfa071e2987e403245f0c58936485d1fba (diff)
downloadQt-9134604eb34b7757b071bae725d57a880a8b62d6.zip
Qt-9134604eb34b7757b071bae725d57a880a8b62d6.tar.gz
Qt-9134604eb34b7757b071bae725d57a880a8b62d6.tar.bz2
add test for task 256184
Diffstat (limited to 'tests/auto/qscriptenginedebugger')
-rw-r--r--tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp14
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;