From 924d810dbdcd5b5b0fa860922b2487ea9062d002 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 6 Oct 2011 18:56:31 +1000 Subject: Avoid using QSKIP in lieu of compile-time checks QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I95feba3edbfa092c0ef4d85bb8c6877bd6be698e Reviewed-on: http://codereview.qt-project.org/6128 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern --- tests/auto/gui/painting/qcolor/tst_qcolor.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tests/auto/gui/painting/qcolor/tst_qcolor.cpp') diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp index 2b6896ae5d..72c736209b 100644 --- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp +++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp @@ -150,7 +150,7 @@ private slots: void achromaticHslHue(); -#ifdef Q_WS_X11 +#if defined(Q_WS_X11) && !defined(Q_OS_IRIX) void allowX11ColorNames(); void setallowX11ColorNames(); #endif @@ -1469,7 +1469,8 @@ void tst_QColor::achromaticHslHue() QCOMPARE(hsl.hslHue(), -1); } -#ifdef Q_WS_X11 +// This test fails on IRIX due to the gamma settings in the SGI X server. +#if defined(Q_WS_X11) && !defined(Q_OS_IRIX) void tst_QColor::allowX11ColorNames() { DEPENDS_ON(setallowX11ColorNames()); @@ -1477,9 +1478,6 @@ void tst_QColor::allowX11ColorNames() void tst_QColor::setallowX11ColorNames() { -#if defined(Q_OS_IRIX) - QSKIP("This fails due to the gamma settings in the SGI X server", SkipAll); -#else RGBData x11RgbTbl[] = { // a few standard X11 color names { "DodgerBlue1", qRgb(30, 144, 255) }, @@ -1530,9 +1528,8 @@ void tst_QColor::setallowX11ColorNames() color.setNamedColor(colorName); QVERIFY(!color.isValid()); } -#endif // Q_OS_IRIX } -#endif // Q_WS_X11 +#endif QTEST_MAIN(tst_QColor) #include "tst_qcolor.moc" -- cgit v1.2.3