diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-10 13:30:56 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-05-18 11:04:38 +1000 |
commit | 8e5afca78e74af708469ca6a7520193376ecf0d8 (patch) | |
tree | 1272079cb7d36dbffb6cf10c7b054453d2e36b51 /tests | |
parent | 3e38dce73e7fd3534af0ffa19e92754e84b6cc53 (diff) | |
download | qtxmlpatterns-8e5afca78e74af708469ca6a7520193376ecf0d8.tar.gz |
Remove Q_ASSERT's from qabstractxmlnodemodel test
Report fatal errors rather than ignoring the errors in non-debug builds.
Change-Id: I5d2f20113cbca11e272cf8fc2591e38b94d6853b
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 6f5751c45868a6dde51647462a331d49f848f2f0)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qabstractxmlnodemodel/LoadingModel.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp b/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp index 052c781..bb8538c 100644 --- a/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp +++ b/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp @@ -84,13 +84,14 @@ QXmlNodeModelIndex LoadingModel::createIndex(const Node *const internal) const QUrl LoadingModel::documentUri(const QXmlNodeModelIndex &) const { - Q_ASSERT(false); + qFatal("%s: This method should not be called during the test", Q_FUNC_INFO); return QUrl(); } QXmlNodeModelIndex::NodeKind LoadingModel::kind(const QXmlNodeModelIndex &ni) const { - Q_ASSERT(!ni.isNull()); + if (ni.isNull()) + qFatal("%s: node model index should not be null", Q_FUNC_INFO); return toInternal(ni)->kind; } @@ -332,13 +333,11 @@ void Loader::load() break; } case QXmlStreamReader::DTD: - /* Fallthrough. */ + qFatal("%s: QXmlStreamReader::DTD token is not supported", Q_FUNC_INFO); + break; case QXmlStreamReader::EntityReference: - { - Q_ASSERT_X(false, Q_FUNC_INFO, - "We don't support this."); - /* Fallthrough. */ - } + qFatal("%s: QXmlStreamReader::EntityReference token is not supported", Q_FUNC_INFO); + break; case QXmlStreamReader::NoToken: /* Fallthrough. */ case QXmlStreamReader::Invalid: |