diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-09 05:02:54 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-09 08:40:47 (GMT) |
commit | 20512cdab97b530ee8ec767254e553d80164b3c6 (patch) | |
tree | 0a6fbbe67c5322d071d0fb01e3e0d35bcd2189c6 /tests/auto/qscriptv8testsuite | |
parent | 3b7f3757efb038fe523a00d474d1b92920f9abe8 (diff) | |
download | Qt-20512cdab97b530ee8ec767254e553d80164b3c6.zip Qt-20512cdab97b530ee8ec767254e553d80164b3c6.tar.gz Qt-20512cdab97b530ee8ec767254e553d80164b3c6.tar.bz2 |
Remove Q_ASSERT's from V8 autotest
Report a fatal error when the realFail() function is missing or
misbehaving rather than silently ignoring the failure in non-debug
builds.
Change-Id: I8b27aeb1c9dab5752a5dbedafc4d420bb4121d2b
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qscriptv8testsuite')
-rw-r--r-- | tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp index 7328e1b..75c9acb 100644 --- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp +++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp @@ -95,9 +95,11 @@ protected: static QScriptValue qscript_fail(QScriptContext *ctx, QScriptEngine *eng) { QScriptValue realFail = ctx->callee().data(); - Q_ASSERT(realFail.isFunction()); + if (!realFail.isFunction()) + qFatal("%s: realFail must be a function", Q_FUNC_INFO); QScriptValue ret = realFail.call(ctx->thisObject(), ctx->argumentsObject()); - Q_ASSERT(eng->hasUncaughtException()); + if (!eng->hasUncaughtException()) + qFatal("%s: realFail function did not throw an exception", Q_FUNC_INFO); ret.setProperty("expected", ctx->argument(0)); ret.setProperty("actual", ctx->argument(1)); ret.setProperty("message", ctx->argument(2)); |