TesterApp Class Reference

Inherits QCoreApplication.

Inheritance diagram for TesterApp:

Inheritance graph
[legend]
Collaboration diagram for TesterApp:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 68 of file main.cpp.

Static Private Member Functions

static int exec ()
 Executes the application main loop and rethrows CppUnit exceptions.

Private Attributes

std::exception cppUnitException


Member Function Documentation

static int TesterApp::exec  )  [inline, static, private]
 

Executes the application main loop and rethrows CppUnit exceptions.

QCoreApplication::exec() is not supposed to be interrupted by unhandled exceptions, however, we will throw a CppUnit exceptions from within QCoreApplication::processEvents() is a test that needs the event loop fails.

We solve the problem by reimplementing notify() to catch all CppUnit exceptions, store them and exit(1) the event loop. Our new implementation of exec() checks the stored exception and rethrows it so that CppUnit can report the failed test.

Definition at line 82 of file main.cpp.


Member Data Documentation

std::exception TesterApp::cppUnitException [private]
 

Definition at line 94 of file main.cpp.


The documentation for this class was generated from the following file: