summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-06 18:56:31 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-07 04:30:30 +0200
commit924d810dbdcd5b5b0fa860922b2487ea9062d002 (patch)
treeb14117ac5b9a2d8d02a502adbd00b94ba5eef424 /tests/auto/gui/painting/qcolor/tst_qcolor.cpp
parent13251dcaea443d2f228fc797e54318191048e588 (diff)
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 <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/gui/painting/qcolor/tst_qcolor.cpp')
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp11
1 files changed, 4 insertions, 7 deletions
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"