From 6aca191e108bb518f0b9debf78707577664bf71c Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 3 May 2011 15:32:28 +1000 Subject: [PATCH] Remove Q_ASSERT's from QTextEdit autotest Convert Q_ASSERT to QCOMPARE and remove mention of Q_ASSERT in comments to make it easier to check for unwanted Q_ASSERT's in the future. Change-Id: I7ae250428d4d5682806e724a7207523e65cd9851 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 3290dd0d3563310f6bdbabf74105367bd8c611d3) --- tests/auto/qtextedit/tst_qtextedit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp index 992d2f2..6b9a541 100644 --- a/tests/auto/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/qtextedit/tst_qtextedit.cpp @@ -317,7 +317,7 @@ void tst_QTextEdit::getSetCheck() // void QTextEdit::setFontPointSize(qreal) obj1.setFontPointSize(qreal(1.1)); QCOMPARE(qreal(1.1), obj1.fontPointSize()); - // we currently Q_ASSERT_X in QFont::setPointSizeF for that + // we currently assert in QFont::setPointSizeF for that //obj1.setFontPointSize(0.0); //QCOMPARE(1.1, obj1.fontPointSize()); // Should not accept 0.0 => keep old @@ -327,7 +327,7 @@ void tst_QTextEdit::getSetCheck() QCOMPARE(1, obj1.fontWeight()); // Range<1, 99> obj1.setFontWeight(99); QCOMPARE(99, obj1.fontWeight()); // Range<1, 99> - /* Q_ASSERT_X in qfont.cpp + /* assertion in qfont.cpp obj1.setFontWeight(INT_MIN); QCOMPARE(1, obj1.fontWeight()); // Range<1, 99> obj1.setFontWeight(INT_MAX); @@ -2064,7 +2064,7 @@ void tst_QTextEdit::compareWidgetAndImage(QTextEdit &widget, const QString &imag QCOMPARE(original.isNull(), false); QCOMPARE(original.size(), image.size()); - Q_ASSERT(image.depth() == 32); + QCOMPARE(image.depth(), 32); QCOMPARE(original.depth(), image.depth()); const int bytesPerLine = image.bytesPerLine(); -- 2.7.4