diff options
author | Jyri Tahtela <jyri.tahtela@nokia.com> | 2011-05-18 07:41:09 (GMT) |
---|---|---|
committer | Jyri Tahtela <jyri.tahtela@nokia.com> | 2011-05-18 07:41:09 (GMT) |
commit | 9cacde74f7de702689725882633073e60c0a2baa (patch) | |
tree | 330d22dadbd28b14a7d8896823d1c33597e9993e /tests/auto/qxmlstream/tst_qxmlstream.cpp | |
parent | 006c8e22075112eff6230d8168d716e44a9e29d5 (diff) | |
parent | 2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff) | |
download | Qt-9cacde74f7de702689725882633073e60c0a2baa.zip Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.gz Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.bz2 |
Merge remote-tracking branch 'qt/4.8'
Conflicts:
doc/src/examples/wheel.qdoc
src/gui/util/qflickgesture.cpp
src/gui/util/qflickgesture_p.h
src/gui/util/qscroller.cpp
src/gui/util/qscroller.h
src/gui/util/qscroller_p.h
src/gui/util/qscrollerproperties.cpp
src/gui/util/qscrollerproperties.h
tests/auto/qscroller/tst_qscroller.cpp
Diffstat (limited to 'tests/auto/qxmlstream/tst_qxmlstream.cpp')
-rw-r--r-- | tests/auto/qxmlstream/tst_qxmlstream.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/auto/qxmlstream/tst_qxmlstream.cpp b/tests/auto/qxmlstream/tst_qxmlstream.cpp index 426f050..0ddbe99 100644 --- a/tests/auto/qxmlstream/tst_qxmlstream.cpp +++ b/tests/auto/qxmlstream/tst_qxmlstream.cpp @@ -221,8 +221,7 @@ static QString documentElement(const QByteArray &document) reader.readNext(); } - Q_ASSERT_X(false, Q_FUNC_INFO, - qPrintable(QString::fromLatin1("The input %1 didn't contain an element.").arg(QString::fromUtf8(document.constData())))); + qFatal("The input %s didn't contain an element", document.constData()); return QString(); } @@ -265,7 +264,8 @@ public: expected(aExpected), output(aOutput) { - Q_ASSERT(!aId.isEmpty()); + if (aId.isEmpty()) + qFatal("%s: aId must not be an empty string", Q_FUNC_INFO); } QString id; @@ -289,7 +289,8 @@ public: TestSuiteHandler(const QUrl &baseURI) : runCount(0), skipCount(0) { - Q_ASSERT(baseURI.isValid()); + if (!baseURI.isValid()) + qFatal("%s: baseURI must be valid", Q_FUNC_INFO); m_baseURI.push(baseURI); } @@ -461,7 +462,7 @@ public: } else { - Q_ASSERT_X(false, Q_FUNC_INFO, "The input catalog is invalid."); + qFatal("The input catalog is invalid."); return false; } } @@ -481,9 +482,12 @@ public: static bool isWellformed(QIODevice *const inputFile, const ParseMode mode) { - Q_ASSERT(inputFile); - Q_ASSERT_X(inputFile->isOpen(), Q_FUNC_INFO, "The caller is responsible for opening the device."); - Q_ASSERT(mode == ParseIncrementally || mode == ParseSinglePass); + if (!inputFile) + qFatal("%s: inputFile must be a valid QIODevice pointer", Q_FUNC_INFO); + if (!inputFile->isOpen()) + qFatal("%s: inputFile must be opened by the caller", Q_FUNC_INFO); + if (mode != ParseIncrementally && mode != ParseSinglePass) + qFatal("%s: mode must be either ParseIncrementally or ParseSinglePass", Q_FUNC_INFO); if(mode == ParseIncrementally) { |