#include <wxGuiTest/Common.h>
#include <wxGuiTest/WxGuiTestApp.h>
#include <wxGuiTest/CRCapture.h>


Go to the source code of this file.
Namespaces | |
| namespace | wxTst |
Classes | |
| class | wxTst::CRVtkCapture |
| Provides a way of capturing GUI interaction for future test cases. More... | |
Defines | |
| #define | VTK_CAPTURE |
| Macro allowing bootstrap of capture & replay. | |
Doxygen documentation only needed for define VTK_CAPTURE.
Definition in file CRVtkCapture.h.
| #define VTK_CAPTURE |
Value:
{ \
wxApp *app = wxTheApp; \
wxASSERT (app != NULL); \
wxTst::WxGuiTestApp *guiTestApp = dynamic_cast< wxTst::WxGuiTestApp * >(app); \
wxASSERT (guiTestApp != NULL); \
guiTestApp->SetEventFilter (wxTst::CREventCaptureManager::GetInstance ()); \
\
std::string excMsg; \
wxTst::CRVtkCapture *capture = new wxTst::CRVtkCapture (); \
try { \
capture->Capture (__FILE__, __LINE__); \
} catch (std::exception &e) { \
excMsg = e.what (); \
} catch (...) { \
excMsg = "Unexpected capturing exception"; \
} \
guiTestApp->SetEventFilter (NULL); \
delete capture; \
wxTst::CRCppEmitter::Destroy (); \
if (!excMsg.empty ()) { \
CPPUNIT_FAIL (excMsg.c_str ()); \
} \
}
Using "{...}" notation several capturings can be used in one single method.
Definition at line 54 of file CRVtkCapture.h.
1.5.5