Add debugging output to randomly failing test.

The result at

 http://thread.gmane.org/gmane.comp.lib.qt.ci-reports/12118

shows an unusual value. The expected output is

 QDEBUG : tst_QColumnView::scrollTo() last= 0  ; HorizontalOffset=  -256
 QDEBUG : tst_QColumnView::scrollTo() last= -256  ; HorizontalOffset=  -512
 QDEBUG : tst_QColumnView::scrollTo() last= -512  ; HorizontalOffset=  -768
 QDEBUG : tst_QColumnView::scrollTo() last= -768  ; HorizontalOffset=  -1024

Change-Id: I8db091f4390cb1a41547d44ca966d172ac278e1a
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Stephen Kelly 2013-08-20 11:37:19 +02:00 committed by The Qt Project
parent 89bb6be1f9
commit 74a153e4b8

View File

@ -440,10 +440,8 @@ void tst_QColumnView::scrollTo()
if (level >= 2) {
if (!reverse) {
QTRY_VERIFY(view.HorizontalOffset() < 0);
if (last <= view.HorizontalOffset()) {
qDebug() << "Test failure. last=" << last
qDebug() << "last=" << last
<< " ; HorizontalOffset= " << view.HorizontalOffset();
}
QTRY_VERIFY(last > view.HorizontalOffset());
} else {
QTRY_VERIFY(view.HorizontalOffset() > 0);