summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-17 16:39:59 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-19 05:56:55 +0200
commit604619fc386c852fef1158d6cd2b0ccfc94eef71 (patch)
treeaacbc8f6e2368037dbd6e6088916cd2167896503 /tests/auto
parentcd7623c19f708b0e37897dae7320478d13ddbc78 (diff)
Prefer QSKIP to QTEST_NOOP_MAIN.
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that this test won't be testing anything until it gets fixed for Qt5. Change-Id: I4fa73883f58d8d4a533a7c21ecd4dd5b3c55b174 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index fb273a0166..b60adfcdfd 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -44,30 +44,37 @@
#include <QPainter>
#include <QPalette>
#include <QWindowsStyle>
-
-#if QT_VERSION < 0x050000 // Fixme Qt 5
-
-#include <private/qwindowsurface_p.h>
#include <QDesktopWidget>
#include <QX11Info>
-
-
#include "../../shared/util.h"
+#if QT_VERSION < 0x050000
+#include <private/qwindowsurface_p.h>
+#endif
+
class tst_QWindowSurface : public QObject
{
Q_OBJECT
-public:
- tst_QWindowSurface() {}
- ~tst_QWindowSurface() {}
-
+#if QT_VERSION >= 0x050000
+public slots:
+ void initTestCase();
+#else
private slots:
void getSetWindowSurface();
void flushOutsidePaintEvent();
void grabWidget();
+#endif
};
+#if QT_VERSION >= 0x050000
+void tst_QWindowSurface::initTestCase()
+{
+ QSKIP("This test is temporarily skipped until it is fixed for Qt5", SkipAll);
+}
+
+#else
+
class MyWindowSurface : public QWindowSurface
{
public:
@@ -281,13 +288,7 @@ void tst_QWindowSurface::grabWidget()
QVERIFY(QColor(childInvalidSubImage.pixel(0, 0)) == QColor(Qt::white));
}
-QTEST_MAIN(tst_QWindowSurface)
-
-#else
-
-// Temporarily skip the entire test until it is fixed for Qt5
-QTEST_NOOP_MAIN
-
#endif
+QTEST_MAIN(tst_QWindowSurface)
#include "tst_qwindowsurface.moc"