diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-10 03:30:56 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-10 06:01:56 (GMT) |
commit | 6f5751c45868a6dde51647462a331d49f848f2f0 (patch) | |
tree | a497ba13e3cf1bb756b6b6d1d000d89812ed2440 /tests/auto | |
parent | 1c85fc559ee456a165527d23cb1b7dc237f5504b (diff) | |
download | Qt-6f5751c45868a6dde51647462a331d49f848f2f0.zip Qt-6f5751c45868a6dde51647462a331d49f848f2f0.tar.gz Qt-6f5751c45868a6dde51647462a331d49f848f2f0.tar.bz2 |
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
Diffstat (limited to 'tests/auto')
-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: |