CRCapture.h File Reference

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

#include <wxGuiTest/Common.h>
#include <wxGuiTest/WxGuiTestApp.h>
#include <wxGuiTest/CRLogInterface.h>
#include <wxGuiTest/CREventCaptureManager.h>
#include <wxGuiTest/CRCppEmitter.h>
#include <wxGuiTest/CRCaptureControl.h>

Include dependency graph for CRCapture.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::CRCapture
 Provides a way of capturing GUI interaction for future test cases. More...

Defines

#define CAPTURE
 Macro allowing bootstrap of capture & replay.


Detailed Description

Providing easy to use macro for bootstrap capturing.

Doxygen documentation only needed for define CAPTURE.

Definition in file CRCapture.h.


Define Documentation

#define 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::CRCapture *capture = new wxTst::CRCapture ();                  \
        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 59 of file CRCapture.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