From e33713f03acf45372aaa5f5c9169b11a919beaa4 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 11 Oct 2011 16:17:19 +1000 Subject: [PATCH] Only build Mac-specific tests on Mac. All but one of these tests was already excluded from the build on non-Mac platforms, but still had #ifdef's to make the test empty if compiled on a non-Mac platform. Change-Id: I1a3677c1cdb7bd467cf4317ed4cfbac89e934e76 Reviewed-by: Rohan McGovern --- tests/auto/gui.pro | 7 ++++++- tests/auto/macgui/tst_macgui.cpp | 9 --------- tests/auto/macnativeevents/tst_macnativeevents.cpp | 11 +---------- tests/auto/qmacstyle/tst_qmacstyle.cpp | 9 --------- 4 files changed, 7 insertions(+), 29 deletions(-) diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro index 607ea68..6559540 100644 --- a/tests/auto/gui.pro +++ b/tests/auto/gui.pro @@ -136,7 +136,12 @@ SUBDIRS=\ qx11info \ # This test cannot be run on Mac OS -mac*:SUBDIRS -= qwindowsurface +mac*:SUBDIRS -= \ + qwindowsurface \ + +# This test can only be run on Mac OS +!mac:SUBDIRS -= \ + qmacstyle \ # This test takes too long to run on IRIX, so skip it on that platform irix-*:SUBDIRS -= qitemview diff --git a/tests/auto/macgui/tst_macgui.cpp b/tests/auto/macgui/tst_macgui.cpp index 0fce2aa..1552db2 100644 --- a/tests/auto/macgui/tst_macgui.cpp +++ b/tests/auto/macgui/tst_macgui.cpp @@ -50,8 +50,6 @@ #include -#ifdef Q_OS_MAC - class tst_MacGui : public GuiTester { Q_OBJECT @@ -240,12 +238,5 @@ void tst_MacGui::spinBoxArrowButtons() } QTEST_MAIN(tst_MacGui) - -#else - -QTEST_NOOP_MAIN - -#endif - #include "tst_macgui.moc" diff --git a/tests/auto/macnativeevents/tst_macnativeevents.cpp b/tests/auto/macnativeevents/tst_macnativeevents.cpp index 0c0934e..ea30b0b 100644 --- a/tests/auto/macnativeevents/tst_macnativeevents.cpp +++ b/tests/auto/macnativeevents/tst_macnativeevents.cpp @@ -50,8 +50,6 @@ #include "expectedeventlist.h" #include -#ifdef Q_OS_MAC - QT_USE_NAMESPACE class tst_MacNativeEvents : public QObject @@ -520,12 +518,5 @@ void tst_MacNativeEvents::testModifierCtrlWithDontSwapCtrlAndMeta() QCoreApplication::setAttribute(Qt::AA_MacDontSwapCtrlAndMeta, false); } -#include "tst_macnativeevents.moc" - QTEST_MAIN(tst_MacNativeEvents) - -#else - -QTEST_NOOP_MAIN - -#endif +#include "tst_macnativeevents.moc" diff --git a/tests/auto/qmacstyle/tst_qmacstyle.cpp b/tests/auto/qmacstyle/tst_qmacstyle.cpp index 3c2f711..a262712 100644 --- a/tests/auto/qmacstyle/tst_qmacstyle.cpp +++ b/tests/auto/qmacstyle/tst_qmacstyle.cpp @@ -45,8 +45,6 @@ #include -#ifdef Q_WS_MAC - const int N = 1; //TESTED_CLASS= @@ -411,12 +409,5 @@ void tst_QMacStyle::smallMiniNormalExclusivity() } QTEST_MAIN(tst_QMacStyle) - -#else - -QTEST_NOOP_MAIN - -#endif - #include "tst_qmacstyle.moc" -- 2.7.4