From 9134604eb34b7757b071bae725d57a880a8b62d6 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 15 Jun 2009 17:52:10 +0200 Subject: add test for task 256184 --- .../qscriptenginedebugger/tst_qscriptenginedebugger.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; -- cgit v0.12