From ceb4dd4b541cfec1ad4f213a4da27079619d8529 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 31 Oct 2011 17:44:11 +1000 Subject: Improve QWidget autotest There are two cases where a QCOMPARE may fail on some platforms. Rather than disabling the QCOMPAREs with "#if 0", use QEXPECT_FAIL so that we can look in the CI logs to see which platforms fail. Change-Id: Ife93c8032e01a04e8068bf213e2040778c12f711 Reviewed-by: Rohan McGovern --- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index c508c15a88..3cd656dc44 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -1932,10 +1932,10 @@ void tst_QWidget::showMaximized() QVERIFY(!(layouted.windowState() & Qt::WindowMaximized)); // ### fixme: embedded may choose a different size to fit on the screen. - // Check platforms (QTBUG-22326) -#if 0 + if (layouted.size() != layouted.sizeHint()) + QEXPECT_FAIL("", "QTBUG-22326", Continue); QCOMPARE(layouted.size(), layouted.sizeHint()); -#endif + layouted.showMaximized(); QVERIFY(layouted.isMaximized()); QVERIFY(layouted.isVisible()); @@ -2009,10 +2009,10 @@ void tst_QWidget::showFullScreen() layouted.showNormal(); QVERIFY(!(layouted.windowState() & Qt::WindowFullScreen)); - // ### fixme: embedded may choose a different size to fit on the screen. (QTBUG-22326) -#if 0 + // ### fixme: embedded may choose a different size to fit on the screen. + if (layouted.size() != layouted.sizeHint()) + QEXPECT_FAIL("", "QTBUG-22326", Continue); QCOMPARE(layouted.size(), layouted.sizeHint()); -#endif layouted.showFullScreen(); QVERIFY(layouted.isFullScreen()); -- cgit v1.2.3