本文整理汇总了C++中outputter函数的典型用法代码示例。如果您正苦于以下问题:C++ outputter函数的具体用法?C++ outputter怎么用?C++ outputter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了outputter函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
TestOption& option = TestOption::Instance();
//命令行解析测试
if(!option.init(argc,argv))
{
return -1;
}
//设置过滤器
TestFilter filter;
filter.setCondition(option.getFilterString());
TestRegistry::setTestFilter(&filter);
//设置输出方式
TestResult tr;
TextOutputter outputter(&tr);
outputter.setShowMode(option.isShowAll());
tr.addListener(&outputter);
//设置全局环境
AddGlobalTestEnvironment(new TestEnv);
//设置重复执行的次数
TestRegistry::runAllTests(tr, option.getRepeatTimes());
// //ini文件解析测试
// FileParse::parse("StackTest.ut");
// FileParse::close();
//
// //Executor测试
// TestCmdExecutor::execute("groupname_testname1",STEP_PRETEST,FileParse::getTestCmdArray());
return 0;
}
开发者ID:dalinhuang,项目名称:cppunitlite,代码行数:34,代码来源:utmain.cpp
示例2: main
int main(int argc, char* argv[])
{
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// Add a listener that colllects test result
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// Add a listener that print dots as test run.
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener( &progress );
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry("All Tests").makeTest() );
runner.run( controller );
// Print test in a text format.
CPPUNIT_NS::TextOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
outputter.write();
// This for XML output
std::ofstream file( "TestResult.xml" );
CPPUNIT_NS::XmlOutputter xml( &result, file );
xml.setStyleSheet( "report.xsl" );
xml.write();
file.close();
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:VicoandMe,项目名称:HW,代码行数:31,代码来源:main.cpp
示例3: main
int
main( int, char ** )
{
// create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// add a listner that collects test results
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// add a listener that prints dots as test run.
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener( &progress );
//CPPUNIT_NS::TextTestProgressListener textprog;
//controller.addListener( &textprog );
// add the top suite to the test runner.
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
runner.run( controller );
// output results in a compiler compatible format
CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
//CPPUNIT_NS::TextOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
//CPPUNIT_NS::XmlOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
outputter.write();
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:AaronCLH,项目名称:IEEE-SB-SETUP,代码行数:30,代码来源:test_convex_hull.cpp
示例4: main
int main( int argc, char **argv )
{
argc = 0;
std::cout << "Running " << argv[argc] << std::endl;
// イベントマネージャを作成する
CPPUNIT_NS::TestResult controller;
// テスト結果を収集するオブジェクトを作成する
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// テスト実行時に進行状況を表示するオブジェクトを作成する
//CPPUNIT_NS::BriefTestProgressListener progress;
//controller.addListener( &progress );
// テストランナーにテストを設定する
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry( ).makeTest( ) );
runner.run( controller );
// テスト結果を出力する
CPPUNIT_NS::TextOutputter outputter( &result, std::cout );
outputter.write( );
// テストに成功した場合に 0 を返し,失敗したら 1 を返す
return( result.wasSuccessful( ) ? 0 : 1 );
}
开发者ID:ChenglongWang,项目名称:MIST,代码行数:28,代码来源:main.cpp
示例5: main
int main(int argc, char** argv)
{
try
{
CPPUNIT_NS::TestResult controller;
CPPUNIT_NS::TestResultCollector result;
controller.addListener(&result);
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener(&progress);
CPPUNIT_NS::TestRunner runner;
runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
runner.run(controller);
CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut());
outputter.write();
return result.wasSuccessful() ? 0 : -1;
}
catch(const std::exception& exc)
{
std::cout << exc.what() << std::endl;
}
catch(...)
{
std::cout << "Unknown exception." << std::endl;
}
return -1;
}
开发者ID:AlexejStukov,项目名称:freeopcua,代码行数:26,代码来源:main.cpp
示例6: main
int
main( int argc, char* argv[] )
{
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// Add a listener that colllects test result
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// Add a listener that print dots as test run.
//CPPUNIT_NS::BriefTestProgressListener progress;
//controller.addListener( &progress );
//controller.push
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
runner.run( controller );
// Print test in a compiler compatible format.
CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr );
outputter.write();
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:ohwerd,项目名称:research-assignment-swen90006,代码行数:27,代码来源:main.cpp
示例7: main
int main( int ac, char **av )
{
// イベント・マネージャとテスト・コントローラを生成する
CPPUNIT_NS::TestResult controller;
// テスト結果収集リスナをコントローラにアタッチする
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// 「.」で進行状況を出力するリスナをアタッチする
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener( &progress );
// テスト・ランナーにテスト群を与え、テストする
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
runner.run( controller );
// テスト結果を標準出力に吐き出す
CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
outputter.write();
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:nyanp,项目名称:STF,代码行数:25,代码来源:main.cpp
示例8: main
int main(int argc, char *argv[])
{
Logging::Logger::setGlobalLogger(new Logging::GenericLogger("testLogger"));
// initialize the AlarmSystemInterfaceFactory
ACSAlarmSystemInterfaceFactory::init(NULL);
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// Add a listener that colllects test result
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// Add a listener that print dots as test run.
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener( &progress );
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
runner.run( controller );
// Print test in a compiler compatible format.
std::cout.flush();
CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr );
outputter.write();
// close the AlarmSystemInterfaceFactory
ACSAlarmSystemInterfaceFactory::done();
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:ACS-Community,项目名称:ACS,代码行数:33,代码来源:testXML.cpp
示例9: DoOutObjectName
extern void DoOutObjectName( cg_sym_handle sym,
void (*outputter)( char *, void * ),
void *data,
import_type kind ) {
/*******************************************************************/
char *dst;
char buffer[TS_MAX_OBJNAME + TRUNC_SYMBOL_HASH_LEN];
unsigned pref_len;
dst = buffer;
switch( kind ) {
case SPECIAL:
pref_len = (sizeof( SPEC_PREFIX )-1);
dst = CopyStr( SPEC_PREFIX, dst );
break;
case DLLIMPORT:
pref_len = (sizeof( DLLIMPORT_PREFIX )-1);
dst = CopyStr( DLLIMPORT_PREFIX, dst );
break;
case PIC_RW:
pref_len = (sizeof( PIC_RW_PREFIX )-1);
dst = CopyStr( PIC_RW_PREFIX, dst );
break;
default:
pref_len = 0;
}
GetExtName( sym, dst, TS_MAX_OBJNAME - 1 - pref_len );
outputter( buffer, data );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:30,代码来源:objname.c
示例10: main
int main(int argc, char** argv) {
TestTreeBuilder treeBuilder;
setlocale(LC_ALL, ""); /* Use system locale instead of default "C" */
if (argc != 2) {
fprintf(stderr, "Usage: %s regex string\n", argv[0]);
return 1;
}
FILE *f = fopen(argv[1], "r");
fseek(f, 0L, SEEK_END);
size_t length = ftell(f);
fseek(f, 0L, SEEK_SET);
char *buffer = new char[length + 1];
buffer[length] = 0;
fread(buffer, length, 1, f);
fclose(f);
length = RemoveCRs(buffer, length);
{
HTMLParser treeParser;
treeParser.Parse(treeBuilder, buffer,length);
}
HTMLOutputterString outputter(cout);
treeBuilder.AsHTML(outputter);
cout << endl;
return 0;
}
开发者ID:danlyke,项目名称:FlutterbyNetCPP,代码行数:33,代码来源:test_microformats.cpp
示例11: main
int
main( int argc, char* argv[] )
{
util::CLoggerMgr::Config(util::Log4Cxx);
// Create the event manager and test controller
CPPUNIT_NS::TextTestResult controller;
// Add a listener that colllects test result
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// Add a listener that print dots as test run.
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener( &progress );
// Add the top suite to the test runner
//CPPUNIT_NS::TextTestRunner runner;
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
runner.run( controller);
// Print test in a compiler compatible format.
CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
outputter.write();
util::CLoggerMgr::CleanLoggers();
system("pause");
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:cashlalala,项目名称:NetService,代码行数:31,代码来源:Main.cpp
示例12: main
int main(int argc, char *argv[])
{
/* input pins to LUT KEY
1 = 0 100000
2 = 1 010000
4 = 2 001000
8 = 3 000100
16 = 4 000010
32 = 5 000001
Lookup table 0-127 (128 symbols) outputs LSB Q and !Q (via assert)
*/
// just for setup:
//outputter();
// debug ^^
Lut lut6;
const unsigned char MAXLUTIN = 252; // 000000** - 111111** inclusive.
const unsigned char MAXLUTOUT = 2; // ******00 - ******10 (so 01 and 10)
unsigned char i = 0;
for (i=0;i<=(MAXLUTIN+MAXLUTOUT);i++) {
if (get_bit_from_char(i, 0) != get_bit_from_char(i,1)) {
lut6.lut=i;
printf("%d\tQ=%d\tQ_PRIME=%d\t",lut6.lut,getQ(lut6.lut),!getQ(lut6.lut));
printf("BINARY: ");
outputter(i);
}
}
return 0;
}
开发者ID:genewitch,项目名称:bitter-truth,代码行数:32,代码来源:6lut.c
示例13: main
int main()
{
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// Add a listener that colllects test result
CPPUNIT_NS::TestResultCollector result;
controller.addListener(&result);
// Add a listener that print dots as test run.
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener(&progress);
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
runner.run(controller);
// output
CPPUNIT_NS::CompilerOutputter outputter(&result, std::cerr);
outputter.write();
// return status code
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:LibreOffice,项目名称:libetonyek,代码行数:25,代码来源:test.cpp
示例14: main
int main(int argc, char* argv[])
{
std::string testPath = (argc > 1) ? std::string(argv[1]) : std::string("");
CPPUNIT_NS::TestResult controller;
CPPUNIT_NS::TestResultCollector result;
controller.addListener(&result);
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener(&progress);
CppUnit::TextUi::TestRunner runner;
CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
runner.addTest(registry.makeTest());
try
{
CPPUNIT_NS::stdCOut() << "Running " << testPath;
runner.run(controller, testPath);
CPPUNIT_NS::stdCOut() << "\n";
CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut());
outputter.write();
}
catch( std::invalid_argument& e)
{
CPPUNIT_NS::stdCOut() << "\n" << "ERROR: " << e.what() << "\n";
}
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:neugenn,项目名称:SMPPSim,代码行数:32,代码来源:main.cpp
示例15: run_multi_cdn_strategy_test_case
int run_multi_cdn_strategy_test_case()
{
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// Add a listener that colllects test result
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// Add a listener that print dots as test run.
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener( &progress );
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
runner.run( controller );
// Print test in a compiler compatible format.
std::ofstream ofs("c:\\MultiCdnTestResult.txt");
CPPUNIT_NS::CompilerOutputter outputter( &result, ofs );
outputter.write();
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:niuwei,项目名称:CdnTest,代码行数:25,代码来源:MultiCdnStrategyTestCase.cpp
示例16: main
int main(int argc, char* argv[])
{
// Retrieve test path from command line first argument. Default to "" which resolve
// to the top level suite.
std::string testPath = (argc > 1) ? std::string(argv[1]) : std::string("");
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// Add a listener that collects test result
CPPUNIT_NS::TestResultCollector result;
controller.addListener(&result);
// Add a listener that print dots as test run.
CPPUNIT_NS::BriefTestProgressListener progress;
controller.addListener(&progress);
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
runner.run(controller);
// Print test in a compiler compatible format.
CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut());
outputter.write();
// Uncomment this for XML output
std::ofstream file("cppunit-report.xml");
CPPUNIT_NS::XmlOutputter xml(&result, file);
xml.write();
file.close();
return result.wasSuccessful() ? 0 : 1;
}
开发者ID:Fortress-Combat,项目名称:GriffinShowManager-core,代码行数:35,代码来源:main.cpp
示例17: lzbench_zling_decompress
int64_t lzbench_zling_decompress(char *inbuf, size_t insize, char *outbuf, size_t outsize, size_t, size_t, char*)
{
baidu::zling::MemInputter inputter((uint8_t*)inbuf, insize);
baidu::zling::MemOutputter outputter((uint8_t*)outbuf, outsize);
baidu::zling::Decode(&inputter, &outputter);
return outputter.GetOutputSize();
}
开发者ID:TurtleSimos,项目名称:lzbench,代码行数:8,代码来源:compressors.cpp
示例18: test_unary_algorithm
void test_unary_algorithm(std::string const& name)
{
Outputter outputter(name);
outputter.header(name);
outputter.table_header();
boost::mpl::for_each<Types>(unary_test<Dispatcher, Outputter>(outputter));
outputter.table_footer();
}
开发者ID:AlexMioMio,项目名称:boost,代码行数:10,代码来源:support_status.cpp
示例19: test_binary_algorithm
void test_binary_algorithm(std::string const& name)
{
Outputter outputter(name);
outputter.header(name);
outputter.template table_header<Types2>();
boost::mpl::for_each<Types1>(binary_test<Dispatcher, Types2, Outputter>(outputter));
outputter.table_footer();
}
开发者ID:AlexMioMio,项目名称:boost,代码行数:10,代码来源:support_status.cpp
示例20: main
int main ( int argc, char *argv[] )
{
CPPUNIT_NS::TextTestRunner runner;
CPPUNIT_NS::CompilerOutputter outputter(&runner.result(), std::cerr);
runner.setOutputter(&outputter);
runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
runner.run("", true);
return 0;
}
开发者ID:ehelms,项目名称:sunray,代码行数:10,代码来源:main.cpp
注:本文中的outputter函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论