Пример #1
0
int main (int argc, char* argv[]) {
    TextUi::TestRunner runner;
    TestFactoryRegistry &registry = TestFactoryRegistry::getRegistry();
    runner.addTest( registry.makeTest() );
    bool failed = runner.run();
    google::protobuf::ShutdownProtobufLibrary();
    return !failed;

}
int main(int argc, char* argv[]) {
  Test *suite = TestFactoryRegistry::getRegistry().makeTest();

  TextUi::TestRunner runner;
  runner.addTest( suite );

  runner.setOutputter( new CompilerOutputter(&runner.result(),cerr));

  bool wasSucessful = runner.run();
  return wasSucessful ? 0 : 1;
}
Пример #3
0
int main (int argc, char* argv[]) {
  TextUi::TestRunner runner;
  TestFactoryRegistry& registry = TestFactoryRegistry::getRegistry();

  // run all tests if none specified on command line
  Test* test_to_run = registry.makeTest();
  if (argc>1)
        test_to_run = test_to_run->findTest(argv[1]);

  runner.addTest( test_to_run );
  bool failed = runner.run("", false);
  return !failed;
}
Пример #4
0
int main(int argc, char* argv[])
{
    // Get the top level suite from the registry
    Test *suite = TestFactoryRegistry::getRegistry().makeTest();

    // Adds the test to the list of test to run
    TextUi::TestRunner runner;
    runner.addTest( suite );

    // Change the default outputter to a compiler error format outputter
    runner.setOutputter( new CompilerOutputter( &runner.result(), cerr ) );
    // Run the tests.
    bool wasSucessful = runner.run();

    // Return error code 1 if the one of test failed.
    return wasSucessful ? 0 : 1;
}
Пример #5
0
/**
 * Runs the unit tests, producing the results in a xml file and printing to the screen.
 * @param  outputFile Xml file to place output.
 * @return            0.
 */
int runXml(string outputFile)
{
  TestResult controller;
  TestResultCollector result;
  controller.addListener(&result);

  // BriefTestProgressListener progress;
  // controller.addListener( &progress );

  TextUi::TestRunner runner;
  runner.addTest( TestFactoryRegistry::getRegistry().makeTest() );
  runner.run( controller );

  ofstream xmlFileOut(outputFile.c_str());
  XmlOutputter xmlOut(&result, xmlFileOut);
  xmlOut.write();

  return 0;
}
Пример #6
0
int main( int argc, char* argv[] )
{
	try
	{
		//PropertyConfigurator::configure("log4cpp.properties");
		TextUi::TestRunner runner;
		TestFactoryRegistry &registry = TestFactoryRegistry::getRegistry();
		runner.addTest( registry.makeTest() );
		runner.run();
	}
	catch(exception &e )
	{
        cout<<e.what()<<endl;
	}
	catch(...)
	{
		cout<<"unknow exception "<<endl;
	}
    return 0;
}
Пример #7
0
int main(int argc, char** argv)
{
	new rl::Logger(
		"./logs/rastullah.log",
		"./logs/ogre.log");
	rl::Logger::getSingleton().setLogDetail(Ogre::LL_LOW); // Tests sollen dokumentieren, nicht die Logs

	TextUi::TestRunner runner;
	TestFactoryRegistry& registry = TestFactoryRegistry::getRegistry();
	runner.addTest(registry.makeTest());
	try
	{
		runner.run();
	}
	catch (rl::Exception& ex)
	{
		std::string message = ex.toString();
		printf("%s", message.c_str());
	}
	return 0;
}
Пример #8
0
int main()
{
    TextUi::TestRunner runner;
    runner.addTest( TestFactoryRegistry::getRegistry().makeTest() );
    return runner.run( "", false ) ? 0 : 1;
}