CRVtkCapture.h File Reference

Providing easy to use macro for bootstrap capturing. More...

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

Include dependency graph for CRVtkCapture.h:

This graph shows which files directly or indirectly include this file:

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.


Detailed Description

Providing easy to use macro for bootstrap capturing.

Doxygen documentation only needed for define VTK_CAPTURE.

Definition in file CRVtkCapture.h.


Define Documentation

#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 ());                                   \
        }                                                                     \
    }
Macro allowing bootstrap of capture & replay.

Using "{...}" notation several capturings can be used in one single method.

Definition at line 54 of file CRVtkCapture.h.


wxWidgets Logo Get wxGuiTesting at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on Tue Mar 17 17:29:30 2009 for wxGuiTesting by doxygen 1.5.5