summaryrefslogtreecommitdiffstats
path: root/tests/auto/macgui
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-08-06 11:04:23 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-08-06 13:39:12 +1000
commit56b349951a70f3ab95e334e41e37f017e91cf481 (patch)
tree76c37ddbf800b6a5186bda53aa7e00ebd768322c /tests/auto/macgui
parent90480b9a25568858d1383e0aab6f5708a7dabd4f (diff)
Cleaned up test naming and platform-specific tests.
When an autotest fails to compile, there's no way to determine which testcase(s) have been prevented from running. Our results parsing tools have been guessing, under the assumption that a directory called `qdogwalker' always contains a testcase named `tst_qdogwalker'. That wasn't true for all our tests, so let's make it true. Also changed the platform-specific tests so that qmake will simply skip those tests on unsupported platforms, instead of wasting time compiling a useless QTEST_NOOP_MAIN test.
Diffstat (limited to 'tests/auto/macgui')
-rw-r--r--tests/auto/macgui/macgui.pro10
-rw-r--r--tests/auto/macgui/tst_macgui.cpp (renamed from tests/auto/macgui/tst_gui.cpp)19
2 files changed, 13 insertions, 16 deletions
diff --git a/tests/auto/macgui/macgui.pro b/tests/auto/macgui/macgui.pro
index dc646278ab..0ed2350a48 100644
--- a/tests/auto/macgui/macgui.pro
+++ b/tests/auto/macgui/macgui.pro
@@ -4,12 +4,8 @@ DEPENDPATH += .
INCLUDEPATH += .
# Input
-SOURCES += tst_gui.cpp
-
-mac {
- SOURCES += guitest.cpp
- HEADERS += guitest.h
-}
-
+SOURCES += tst_macgui.cpp guitest.cpp
+HEADERS += guitest.h
+requires(mac)
diff --git a/tests/auto/macgui/tst_gui.cpp b/tests/auto/macgui/tst_macgui.cpp
index 635023a3be..627dc82d56 100644
--- a/tests/auto/macgui/tst_gui.cpp
+++ b/tests/auto/macgui/tst_macgui.cpp
@@ -52,7 +52,7 @@
#ifdef Q_OS_MAC
-class tst_gui : public GuiTester
+class tst_MacGui : public GuiTester
{
Q_OBJECT
private slots:
@@ -76,7 +76,7 @@ QPixmap grabWindowContents(QWidget * widget)
Test that vertical and horizontal mac-style scrollbars paint their
entire area.
*/
-void tst_gui::scrollbarPainting()
+void tst_MacGui::scrollbarPainting()
{
ColorWidget colorWidget;
colorWidget.resize(400, 400);
@@ -108,7 +108,7 @@ void tst_gui::scrollbarPainting()
// When running the auto-tests on scruffy, the first enter-the-event-loop-and-wait-for-a-click
// test that runs always times out, so we have this dummy test.
-void tst_gui::dummy()
+void tst_MacGui::dummy()
{
QPixmap pix(100, 100);
QSplashScreen splash(pix);
@@ -133,7 +133,7 @@ void tst_gui::dummy()
/*
Test that a message box pops up in front of a QSplashScreen.
*/
-void tst_gui::splashScreenModality()
+void tst_MacGui::splashScreenModality()
{
QPixmap pix(300, 300);
QSplashScreen splash(pix);
@@ -162,7 +162,7 @@ void tst_gui::splashScreenModality()
Test that a non-modal dialog created as a child of a modal dialog is
shown in front.
*/
-void tst_gui::dialogModality()
+void tst_MacGui::dialogModality()
{
QDialog d;
d.setModal(true);
@@ -222,7 +222,7 @@ void PrimaryWindowDialog::test()
of the dialog even if the dialog becomes modal after the child window
is created.
*/
-void tst_gui::nonModalOrder()
+void tst_MacGui::nonModalOrder()
{
clearSequence();
PrimaryWindowDialog primary;
@@ -235,7 +235,7 @@ void tst_gui::nonModalOrder()
/*
Test that the QSpinBox buttons are correctly positioned with the Mac style.
*/
-void tst_gui::spinBoxArrowButtons()
+void tst_MacGui::spinBoxArrowButtons()
{
ColorWidget colorWidget;
colorWidget.resize(200, 200);
@@ -266,7 +266,7 @@ void tst_gui::spinBoxArrowButtons()
QVERIFY(noFocus.copy(compareRect) == focus.copy(compareRect));
}
-QTEST_MAIN(tst_gui)
+QTEST_MAIN(tst_MacGui)
#else
@@ -274,4 +274,5 @@ QTEST_NOOP_MAIN
#endif
-#include "tst_gui.moc"
+#include "tst_macgui.moc"
+