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 --- .../gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/benchmarks/gui') diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 4ff6b15fae..02757888ee 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -144,8 +144,10 @@ private slots: void mapRectToScene(); void mapRectFromScene_data(); void mapRectFromScene(); +#ifndef Q_WS_WINCE_WM void chipTester_data(); void chipTester(); +#endif void deepNesting_data(); void deepNesting(); void imageRiver_data(); @@ -395,6 +397,8 @@ void tst_QGraphicsView::mapRectFromScene() } } +// This test does not make sense Windows Mobile without OpenGL +#ifndef Q_WS_WINCE_WM void tst_QGraphicsView::chipTester_data() { QTest::addColumn("antialias"); @@ -416,9 +420,6 @@ void tst_QGraphicsView::chipTester_data() void tst_QGraphicsView::chipTester() { -#ifdef Q_WS_WINCE_WM -QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL", SkipAll); -#endif QFETCH(bool, antialias); QFETCH(bool, opengl); QFETCH(int, operation); @@ -436,6 +437,7 @@ QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL", SkipAll); tester.runBenchmark(); } } +#endif static void addChildHelper(QGraphicsItem *parent, int n, bool rotate) { -- cgit v1.2.3