本文整理汇总了C++中cppunit_ns::textui::TestRunner::eventManager方法的典型用法代码示例。如果您正苦于以下问题:C++ TestRunner::eventManager方法的具体用法?C++ TestRunner::eventManager怎么用?C++ TestRunner::eventManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cppunit_ns::textui::TestRunner
的用法示例。
在下文中一共展示了TestRunner::eventManager方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main() {
CPPUNIT_NS::TextUi::TestRunner runner;
CppUnit::BriefTestProgressListener listener;
runner.eventManager().addListener(&listener);
runner.setOutputter(new CPPUNIT_NS::CompilerOutputter(&runner.result(),
CPPUNIT_NS::stdCOut()));
bool wasSucessful = runner.run();
return wasSucessful ? 0 : 1;
}
示例2:
int
main(int argc, char** argv)
{
wxApp::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, "program");
wxInitializer initializer;
if ( !initializer )
{
fprintf(stderr, "Failed to initialize the wxWidgets library, aborting.");
return -1;
}
// We are using .png files for some extra bitmaps.
wxImageHandler * pnghandler = new wxPNGHandler;
wxImage::AddHandler(pnghandler);
wxImage::AddHandler(new wxGIFHandler);
mutaborGUI::initMutIconShapes();
mutaborGUI::InitGUIRouteFactories();
#ifdef _GLIBCXX_DEBUG
std::clog << "In case of segmentation faults assure that cppunit is compiled using -D_GLIBCXX_DEBUG" << std::endl;
#endif
CPPUNIT_NS::TextUi::TestRunner runner;
CppUnit::BriefTestProgressListener listener;
runner.eventManager().addListener(&listener);
runner.addTest( MkIDlist::suite() );
bool wasSuccessful = runner.run();
return wasSuccessful ? 0 : 1;
}