summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-09 20:43:14 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-09 20:43:14 +0200
commit587f4325850615392e99881e060121bd5ea85360 (patch)
treec563522a355de79e857287a71a00115213262b81 /tests/auto
parent690e54dda08496d80526ae64dcb1fb88f533542b (diff)
parent385f2c8a34a52443e78dfa272a1a483b9d6d29fc (diff)
downloadqt4-tools-587f4325850615392e99881e060121bd5ea85360.tar.gz
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Enable preserved swap behavior when surface is created due to resize. Generate triggered signal even the action launches menu in Symbian. Symbian emulator: unload file server so apps can be recompiled. Clear QFontCache TLS content before nullifying TLS pointer. Fixed focus and window activation events on Symbian when opening menu. QTBUG-4887 and other exception safety fixes
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
index 4433c7a648..91d1a443f6 100644
--- a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
+++ b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
@@ -43,6 +43,7 @@
#include <QtTest/QtTest>
#include <stddef.h>
+#include <exception>
QT_USE_NAMESPACE
@@ -285,8 +286,26 @@ void tst_ExceptionSafetyObjects::safeMessageHandler(QtMsgType type, const char *
allocFailer.reactivateAt(currentIndex);
}
+typedef void (*PVF)();
+PVF defaultTerminate;
+void debugTerminate()
+{
+ // you can detect uncaught exceptions with a breakpoint in here
+ (*defaultTerminate)();
+}
+
+PVF defaultUnexpected;
+void debugUnexpected()
+{
+ // you can detect unexpected exceptions with a breakpoint in here
+ (*defaultUnexpected)();
+}
+
void tst_ExceptionSafetyObjects::initTestCase()
{
+ // set handlers for bad exception cases, you might want to step in and breakpoint the default handlers too
+ defaultTerminate = std::set_terminate(&debugTerminate);
+ defaultUnexpected = std::set_unexpected(&debugUnexpected);
testMessageHandler = qInstallMsgHandler(safeMessageHandler);
QVERIFY(AllocFailer::initialize());