summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-09-01 16:24:24 +0200
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-09-01 16:53:01 +0200
commit2a521d8d26577bfe0487a48c0d723e14e67ee0b5 (patch)
treee2aab5ff9a54103c76fb5dc7d2c9ce4de4484f4d /tests
parent31e4c350981e10076ce4f2f1ecc7076983b9cefa (diff)
Create exceptionCatch events
Call to JSC::Debugger::exceptionCatch when exception is catched were added for JIT enabled. Few XFAIL were moved. Reviewed-by: Kent Hansen
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
index 68f06201ed..1f9476f7c7 100644
--- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
+++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
@@ -1593,8 +1593,6 @@ void tst_QScriptEngineAgent::exceptionThrowAndCatch()
{
spy->clear();
eng.evaluate("try { throw new Error('ciao'); } catch (e) { }");
- if (qt_script_isJITEnabled())
- QEXPECT_FAIL("", "Some events are missing when JIT is enabled", Abort);
QCOMPARE(spy->count(), 2);
QCOMPARE(spy->at(0).type, ScriptEngineEvent::ExceptionThrow);
@@ -1606,6 +1604,8 @@ void tst_QScriptEngineAgent::exceptionThrowAndCatch()
QCOMPARE(spy->at(1).type, ScriptEngineEvent::ExceptionCatch);
QCOMPARE(spy->at(1).scriptId, spy->at(0).scriptId);
+ if (qt_script_isJITEnabled())
+ QEXPECT_FAIL("", "Exception value is not passed in exceptionCatch event when JIT is enabled", Continue);
QVERIFY(spy->at(1).value.strictlyEquals(spy->at(0).value));
}
}
@@ -1728,8 +1728,6 @@ void tst_QScriptEngineAgent::eventOrder_throwAndCatch()
{
spy->clear();
eng.evaluate("try { throw new Error('ciao') } catch (e) { void(e); }");
- if (qt_script_isJITEnabled())
- QEXPECT_FAIL("", "One event is missing when JIT is enabled", Abort);
QCOMPARE(spy->count(), 12);
// load
QCOMPARE(spy->at(0).type, ScriptEngineEvent::ScriptLoad);
@@ -1751,6 +1749,8 @@ void tst_QScriptEngineAgent::eventOrder_throwAndCatch()
QVERIFY(spy->at(7).hasExceptionHandler);
// catch
QCOMPARE(spy->at(8).type, ScriptEngineEvent::ExceptionCatch);
+ if (qt_script_isJITEnabled())
+ QEXPECT_FAIL("", "Exception value is not passed in exceptionCatch event when JIT is enabled", Continue);
QVERIFY(spy->at(8).value.isError());
// void(e)
QCOMPARE(spy->at(9).type, ScriptEngineEvent::PositionChange);
@@ -1914,8 +1914,6 @@ void tst_QScriptEngineAgent::eventOrder_throwCatchFinally()
{
spy->clear();
eng.evaluate("try { throw 1; } catch(e) { i = e; } finally { i = 2; }");
- if (qt_script_isJITEnabled())
- QEXPECT_FAIL("", "One event is missing when JIT is enabled", Abort);
QCOMPARE(spy->count(), 9);
// load