#include <InitWxGuiTestSetUp.h>
Public Member Functions | |
InitWxGuiTestSetUp (CPPUNIT_NS::Test *test) | |
Constructor. | |
virtual void | run (CPPUNIT_NS::TestResult *result) |
Do not call TestDecorator::run() directly as parent class TestSetUp. | |
virtual void | RunAsDecorator () |
Make up for not called TestDecorator::run(). | |
virtual | ~InitWxGuiTestSetUp () |
Destructor. | |
Protected Member Functions | |
virtual void | setUp () |
Initialise wxWidgets library GUI part by means of wxEntry(). | |
virtual void | tearDown () |
Try to destruct wxWidgets library initialisation and "test application". |
The GUI part of wxWidgets must only be initialised once due to wxWidgets heavy usage of static constructs. This is necessary as well, as CppUnit is text based and a wxWidgets "test application" is required to simulate the "single stepping" through the test case code. Thus, the code flow must be diverted so that the WxGuiTestApp object is in control of the code flow instead of the CppUnit test runner.
Definition at line 36 of file InitWxGuiTestSetUp.h.
wxTst::InitWxGuiTestSetUp::InitWxGuiTestSetUp | ( | CPPUNIT_NS::Test * | test | ) |
Constructor.
test | test to decorate |
Definition at line 28 of file InitWxGuiTestSetUp.cpp.
wxTst::InitWxGuiTestSetUp::~InitWxGuiTestSetUp | ( | ) | [virtual] |
void wxTst::InitWxGuiTestSetUp::run | ( | CPPUNIT_NS::TestResult * | result | ) | [virtual] |
Do not call TestDecorator::run() directly as parent class TestSetUp.
Override TestSetUp::run() because the flow of control must be diverted due to integrating the CppUnit test runs into a proper wxWidgets application.
result | object to save test results |
Definition at line 41 of file InitWxGuiTestSetUp.cpp.
References setUp(), and tearDown().
void wxTst::InitWxGuiTestSetUp::RunAsDecorator | ( | ) | [virtual] |
Make up for not called TestDecorator::run().
Is called directly or indirectly from WxGuiTestApp::OnRun().
Definition at line 58 of file InitWxGuiTestSetUp.cpp.
void wxTst::InitWxGuiTestSetUp::setUp | ( | ) | [protected, virtual] |
Initialise wxWidgets library GUI part by means of wxEntry().
Definition at line 67 of file InitWxGuiTestSetUp.cpp.
References wxTst::WxGuiTestApp::SetTestRunnerProxy().
Referenced by run().
void wxTst::InitWxGuiTestSetUp::tearDown | ( | ) | [protected, virtual] |
Try to destruct wxWidgets library initialisation and "test application".
Definition at line 120 of file InitWxGuiTestSetUp.cpp.
Referenced by run().