summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-09 15:02:54 +1000
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-09 18:40:47 +1000
commit20512cdab97b530ee8ec767254e553d80164b3c6 (patch)
tree0a6fbbe67c5322d071d0fb01e3e0d35bcd2189c6 /tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
parent3b7f3757efb038fe523a00d474d1b92920f9abe8 (diff)
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/tst_qscriptv8testsuite.cpp')
-rw-r--r--tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
index 7328e1b761..75c9acbce6 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));