summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-10 11:33:37 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-05-18 10:46:47 +1000
commit65833e7d9e0e9cce17e18144dafd4ea54c26b768 (patch)
treeeb0fca9999f96fd34064ed0b24c8f15dcf310161 /tests
parentc04abc3fb4fe00220c2fe6d999598d4c0dd351d9 (diff)
Remove Q_ASSERT's from QXmlStream autotest
Report fatal errors rather than ignoring them in non-debug builds. Change-Id: Ieafc58f3603fa953f4a963394039e613dcd442fb Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 6e3fcd6ff50e6435fd90629ed695196d25312ffc)
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qxmlstream/qc14n.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/qxmlstream/qc14n.h b/tests/auto/qxmlstream/qc14n.h
index 99432f3b35..c7d3a7dd86 100644
--- a/tests/auto/qxmlstream/qc14n.h
+++ b/tests/auto/qxmlstream/qc14n.h
@@ -71,12 +71,14 @@ bool QC14N::isEqual(QIODevice *const firstDocument,
QString *const message)
{
qDebug() << Q_FUNC_INFO;
- Q_ASSERT_X(firstDocument, Q_FUNC_INFO,
- "A valid QIODevice pointer must be supplied");
- Q_ASSERT_X(secondDocument, Q_FUNC_INFO,
- "A valid QIODevice pointer must be supplied");
- Q_ASSERT_X(firstDocument->isReadable(), Q_FUNC_INFO, "The device must be readable.");
- Q_ASSERT_X(secondDocument->isReadable(), Q_FUNC_INFO, "The device must be readable.");
+ if (!firstDocument)
+ qFatal("%s: A valid firstDocument QIODevice pointer must be supplied", Q_FUNC_INFO);
+ if (!secondDocument)
+ qFatal("%s: A valid secondDocument QIODevice pointer must be supplied", Q_FUNC_INFO);
+ if (!firstDocument->isReadable())
+ qFatal("%s: The firstDocument device must be readable.", Q_FUNC_INFO);
+ if (!secondDocument->isReadable())
+ qFatal("%s: The secondDocument device must be readable.", Q_FUNC_INFO);
QXmlStreamReader r1(firstDocument);
QXmlStreamReader r2(secondDocument);