wxtest.cpp

来自「c++单元测试框架」· C++ 代码 · 共 27 行

CPP
27
字号
// wxTest.cpp

#include <wx/wxprec.h>

#ifdef __BORLANDC__
#  pragma hdrstop
#endif

#ifndef WX_PRECOMP
#  include <wx/wx.h>
#endif

#include <cppunit/ui/wx/WxTestRunner.h>
#include <cppunit/extensions/TestFactoryRegistry.h>

void RunTests(void)
{
/* FIXME: 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 wxWindows implementation of
 * the test runner.
 */
    static CPPUNIT_NS::WxTestRunner runner;
    runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
    runner.run(false);
}

⌨️ 快捷键说明

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