summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextboundaryfinder
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-04-12 14:53:36 +1000
committerJason McDonald <jason.mcdonald@nokia.com>2011-04-12 15:38:20 +1000
commit3475168550c1a804f04f2a4edfeb30c04cd36551 (patch)
treeec1587bdc87e6f554c31e09cb1a3a2e26f16b181 /tests/auto/qtextboundaryfinder
parent78722d6b6e9ba0f6de1a4eba232aad2f96a339f2 (diff)
Reduce usage of Q_ASSERT in autotests.
Using Q_ASSERT does nothing in release-mode builds, and in debug builds it causes tests to terminate prematurely. It is much better to use QVERIFY or QCOMPARE. Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qtextboundaryfinder')
-rw-r--r--tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index 6157004715..1da0bdeb6f 100644
--- a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -123,14 +123,14 @@ void tst_QTextBoundaryFinder::graphemeBoundaries()
if (test.at(pos).unicode() == 0xf7)
breakPositions.append(strPos);
else
- Q_ASSERT(test.at(pos).unicode() == 0xd7);
+ QVERIFY(test.at(pos).unicode() == 0xd7);
++pos;
if (pos < test.length()) {
- Q_ASSERT(pos < test.length() - 4);
+ QVERIFY(pos < test.length() - 4);
QString hex = test.mid(pos, 4);
bool ok = true;
testString.append(QChar(hex.toInt(&ok, 16)));
- Q_ASSERT(ok);
+ QVERIFY(ok);
pos += 4;
}
++strPos;
@@ -176,14 +176,14 @@ void tst_QTextBoundaryFinder::wordBoundaries()
if (test.at(pos).unicode() == 0xf7)
breakPositions.append(strPos);
else
- Q_ASSERT(test.at(pos).unicode() == 0xd7);
+ QVERIFY(test.at(pos).unicode() == 0xd7);
++pos;
if (pos < test.length()) {
- Q_ASSERT(pos < test.length() - 4);
+ QVERIFY(pos < test.length() - 4);
QString hex = test.mid(pos, 4);
bool ok = true;
testString.append(QChar(hex.toInt(&ok, 16)));
- Q_ASSERT(ok);
+ QVERIFY(ok);
pos += 4;
}
++strPos;
@@ -228,14 +228,14 @@ void tst_QTextBoundaryFinder::sentenceBoundaries()
if (test.at(pos).unicode() == 0xf7)
breakPositions.append(strPos);
else
- Q_ASSERT(test.at(pos).unicode() == 0xd7);
+ QVERIFY(test.at(pos).unicode() == 0xd7);
++pos;
if (pos < test.length()) {
- Q_ASSERT(pos < test.length() - 4);
+ QVERIFY(pos < test.length() - 4);
QString hex = test.mid(pos, 4);
bool ok = true;
testString.append(QChar(hex.toInt(&ok, 16)));
- Q_ASSERT(ok);
+ QVERIFY(ok);
pos += 4;
}
++strPos;