Test: remove QSKIP in tst_QEventLoop::throwInExec()
authorCaroline Chao <caroline.chao@digia.com>
Thu, 18 Oct 2012 08:24:28 +0000 (10:24 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 29 Oct 2012 12:57:09 +0000 (13:57 +0100)
Instead omit the whole test when appropriate.

Change-Id: I60c34b020f6e25e865bbe0182395d4fc6419f65e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp

index 956a3e6..24649bf 100644 (file)
@@ -183,7 +183,9 @@ private slots:
     // This test *must* run first. See the definition for why.
     void processEvents();
     void exec();
+#if !defined(QT_NO_EXCEPTIONS) && !defined(Q_OS_WINCE_WM)
     void throwInExec();
+#endif
     void reexec();
     void execAfterExit();
     void wakeUp();
@@ -320,17 +322,15 @@ void tst_QEventLoop::exec()
     }
 }
 
+#if !defined(QT_NO_EXCEPTIONS) && !defined(Q_OS_WINCE_WM)
+// Exceptions need to be enabled for this test
+// Q_OS_WINCE_WM case: this platform doesn't support propagating exceptions through the event loop
+// Windows Mobile cannot handle cross library exceptions
+// qobject.cpp will try to rethrow the exception after handling
+// which causes gwes.exe to crash
 void tst_QEventLoop::throwInExec()
 {
-#if defined(QT_NO_EXCEPTIONS) || defined(NO_EVENTLOOP_EXCEPTIONS)
-    QSKIP("Exceptions are disabled");
-#elif defined(Q_OS_WINCE_WM)
-    // Windows Mobile cannot handle cross library exceptions
-    // qobject.cpp will try to rethrow the exception after handling
-    // which causes gwes.exe to crash
-    QSKIP("This platform doesn't support propagating exceptions through the event loop");
-#else
-    // exceptions compiled in, runtime tests follow.
+// exceptions compiled in, runtime tests follow.
 #if defined(Q_OS_LINUX)
     // C++ exceptions can't be passed through glib callbacks.  Skip the test if
     // we're using the glib event loop.
@@ -366,8 +366,8 @@ void tst_QEventLoop::throwInExec()
         }
         QCOMPARE(caughtExceptions, 2);
     }
-#endif
 }
+#endif
 
 void tst_QEventLoop::reexec()
 {