summaryrefslogtreecommitdiff
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
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-05-18 11:02:59 +1000
commit49e993f59b7850de0f4e04c5cf858bd50d5d8ba9 (patch)
tree52531db80718905dc46e43c522a78a85b81ac532 /tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
parente8bb0b083ae3329c6c7f638c0ad269576b301bf1 (diff)
downloadqtscript-49e993f59b7850de0f4e04c5cf858bd50d5d8ba9.tar.gz
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 (cherry picked from commit 20512cdab97b530ee8ec767254e553d80164b3c6)
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 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));