summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-10-09 16:24:52 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-16 08:41:48 +0200
commitf7241e8cb949ecf2d86fae2a759a8e1fdb148a26 (patch)
treed613a88058cb6de23cb3aa41dc8b3a65e91fdaea /tests/auto
parentf696205b37bc8553796cd1973b7da109185ec22f (diff)
Exclude a QCOMPARE in tst_QListWidget instead of excluding the whole class.
The original bug was reported as a different test failing. Looking through the CI logs, that test now always passes, but fastScroll fails unstably. The fastScroll test is already excluded on Mac, but the patch and reason for that predates the public git history. This is a regression since marking the entire test as insignificant, and shows why insignification of tests should be as narrow as possible. Narrow this one now. Task-number: QTBUG-21098 Change-Id: I0d6c22e422af190c9e6331e123db38022af28e4b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro1
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro b/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro
index de077c1059..f1e2bbf402 100644
--- a/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro
+++ b/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro
@@ -4,5 +4,4 @@ QT += widgets widgets-private testlib
QT += core-private gui-private
SOURCES += tst_qlistwidget.cpp
-contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-21098, fails unstably
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
index 79014fcbbf..b882b56735 100644
--- a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
+++ b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
@@ -1534,8 +1534,12 @@ void tst_QListWidget::fastScroll()
sbar->setValue(sbar->value() + sbar->singleStep());
QApplication::processEvents();
+ const QSize actualItemSize = widget.painted.boundingRect().size();
+ if (actualItemSize != itemSize)
+ QEXPECT_FAIL("", "QTBUG-21098", Continue);
+
// only one item should be repainted, the rest should be scrolled in memory
- QCOMPARE(widget.painted.boundingRect().size(), itemSize);
+ QCOMPARE(actualItemSize, itemSize);
}
#endif // Q_OS_MAC