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>
This commit is contained in:
Stephen Kelly 2012-10-09 16:24:52 +02:00 committed by The Qt Project
parent f696205b37
commit f7241e8cb9
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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