wxtestrunner.h

来自「c++单元测试框架」· C头文件 代码 · 共 72 行

H
72
字号
// WxTestRunner.h#ifndef CPPUNIT_UI_WX_WXTESTRUNNER_H#define CPPUNIT_UI_WX_WXTESTRUNNER_H#ifndef CPPUNIT_PORTABILITY_H#include <cppunit/Portability.h>#endif#ifndef CPPUNIT_PORTABILITY_CPPUNITVECTOR_H#include <cppunit/portability/CppUnitVector.h>#endifCPPUNIT_NS_BEGINclass Test;class TestSuite;/*! * \brief wxWidgets test runner. * \ingroup ExecutingTest * * Here is an example of usage: * \code * #include <cppunit/ui/wx/WxTestRunner.h> * #include <cppunit/extensions/TestFactoryRegistry.h> * * [...] * * void RunTests(void) * { *     static CPPUNIT_NS::WxTestRunner runner; *     runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() ); *     runner.run(); * } * \endcode * * Note: the test runner must be a static instance because the main "dialog" * is implemented as a non-modal wxFrame, and run() returns before the * window is closed.  This is specific to the wxWidgets implementation of * the test runner. */class CPPUNIT_API WxTestRunner{    typedef CppUnitVector<Test *> Tests;private:    Tests *m_tests;    CPPUNIT_NS::TestSuite *m_suite;public:    WxTestRunner();    virtual ~WxTestRunner();private:    // not implemented    WxTestRunner( const WxTestRunner &copy );    void operator =( const WxTestRunner &copy );public:    void addTest( Test *test );    void addTests( const Tests &tests );    void run( bool autoRun = false );protected:    Test *getRootTest();};CPPUNIT_NS_END#endif // CPPUNIT_UI_WX_WXTESTRUNNER_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?