From 9c0544f8848e3552c7c5ce79d8908d08d51a0f28 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Thu, 18 Oct 2012 10:24:28 +0200 Subject: Test: remove QSKIP in tst_QEventLoop::throwInExec() Instead omit the whole test when appropriate. Change-Id: I60c34b020f6e25e865bbe0182395d4fc6419f65e Reviewed-by: Sergio Ahumada Reviewed-by: Rohan McGovern Reviewed-by: Friedemann Kleint --- .../corelib/kernel/qeventloop/tst_qeventloop.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp index 956a3e67aa..24649bf587 100644 --- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp +++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp @@ -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() { -- cgit v1.2.3