summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptenginedebugger
diff options
context:
space:
mode:
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 dd597fc..5d9f56f 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;