summaryrefslogtreecommitdiffstats
path: root/tests/auto/exceptionsafety
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/exceptionsafety')
-rw-r--r--tests/auto/exceptionsafety/tst_exceptionsafety.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/auto/exceptionsafety/tst_exceptionsafety.cpp b/tests/auto/exceptionsafety/tst_exceptionsafety.cpp
index ef6e96f00b..27db9ea7f7 100644
--- a/tests/auto/exceptionsafety/tst_exceptionsafety.cpp
+++ b/tests/auto/exceptionsafety/tst_exceptionsafety.cpp
@@ -44,13 +44,13 @@
QT_USE_NAMESPACE
-#if defined(QT_NO_EXCEPTIONS)
- QTEST_NOOP_MAIN
-#else
class tst_ExceptionSafety: public QObject
{
Q_OBJECT
private slots:
+#ifdef QT_NO_EXCEPTIONS
+ void initTestCase();
+#else
void exceptionInSlot();
void exceptionVector();
void exceptionHash();
@@ -59,8 +59,17 @@ private slots:
void exceptionLinkedList();
// void exceptionEventLoop();
// void exceptionSignalSlot();
+#endif
};
+#ifdef QT_NO_EXCEPTIONS
+void tst_ExceptionSafety::initTestCase()
+{
+ QSKIP("This test requires exception support", SkipAll);
+}
+
+#else
+
class Emitter : public QObject
{
Q_OBJECT
@@ -719,6 +728,7 @@ void tst_ExceptionSafety::exceptionSignalSlot()
}
#endif
+#endif
+
QTEST_MAIN(tst_ExceptionSafety)
#include "tst_exceptionsafety.moc"
-#endif // QT_NO_EXCEPTIONS