summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-10 03:19:25 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-10 06:00:28 (GMT)
commit1c85fc559ee456a165527d23cb1b7dc237f5504b (patch)
tree44565820db1bb2cf6bb3fa70715b28f7d4378a2c /tests
parentcb84f3d1a1499485d4c5314b6e94745c6def6888 (diff)
downloadQt-1c85fc559ee456a165527d23cb1b7dc237f5504b.zip
Qt-1c85fc559ee456a165527d23cb1b7dc237f5504b.tar.gz
Qt-1c85fc559ee456a165527d23cb1b7dc237f5504b.tar.bz2
Remove Q_ASSERT from QXmlStream autotest
Report a meaningful fatal error if an unknown token type is encountered rather than ignoring the error in non-debug builds and reporting an uninformative message in debug builds. Change-Id: Id219f3c7cbd4ba3e9875cb81f833720d5d153132 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qxmlstream/qc14n.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qxmlstream/qc14n.h b/tests/auto/qxmlstream/qc14n.h
index c7d3a7d..661ddee 100644
--- a/tests/auto/qxmlstream/qc14n.h
+++ b/tests/auto/qxmlstream/qc14n.h
@@ -191,9 +191,9 @@ bool QC14N::isDifferent(const QXmlStreamReader &r1,
r2.processingInstructionData() == r2.processingInstructionData();
}
+ default:
+ qFatal("%s: Unknown tokenType: %d", Q_FUNC_INFO, static_cast<int>(r1.tokenType()));
+ return false;
}
-
- Q_ASSERT_X(false, Q_FUNC_INFO, "This line should never be reached");
- return false;
}