int 
main( int argc, char* argv[] )
{
  ProjetUnivers::Kernel::Parameters::load("physic.config") ;
  ProjetUnivers::Kernel::Log::init() ;
  
  // if command line contains "-selftest" then this is the post build check
  // => the output must be in the compiler error format.
  bool selfTest = (argc > 1)  &&  
                  (std::string("-selftest") == argv[1]);

  CppUnit::TextUi::TestRunner runner;
  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
  
  runner.addTest( registry.makeTest() );

  // Define the file that will store the XML output.
  std::ofstream outputFile("tests_physic.xml");

  CppUnit::MultiOutputter* outputter = new CppUnit::MultiOutputter() ;
  outputter->add(new CppUnit::CompilerOutputter(&runner.result(),std::cerr)) ;
  outputter->add(new ProjetUnivers::Kernel::XmlOutputter(&runner,outputFile)) ;
  runner.setOutputter(outputter);

  // Run the test.
  bool wasSucessful = runner.run( "" );

  ProjetUnivers::Kernel::Log::close() ;


  // Return error code 1 if the one of test failed.
  return wasSucessful ? 0 : 1;
}
예제 #2
0
파일: main.cpp 프로젝트: kornelik/anpr
int main() {
    CppUnit::TextUi::TestRunner runner;
    CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
    runner.addTest(registry.makeTest());
    runner.run();
    return 0;
}
int main(int argc, char *argv[])
{
    CppUnit::TextUi::TestRunner runner;
    CppUnit::TestSuite *suite = new CppUnit::TestSuite();

    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test1", &Trapping_Rain_WaterTest::test1));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test2", &Trapping_Rain_WaterTest::test2));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test3", &Trapping_Rain_WaterTest::test3));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test4", &Trapping_Rain_WaterTest::test4));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test5", &Trapping_Rain_WaterTest::test5));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test6", &Trapping_Rain_WaterTest::test6));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test7", &Trapping_Rain_WaterTest::test7));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test8", &Trapping_Rain_WaterTest::test8));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test9", &Trapping_Rain_WaterTest::test9));
    suite->addTest(new CppUnit::TestCaller<Trapping_Rain_WaterTest>(
                "test10", &Trapping_Rain_WaterTest::test10));
    runner.addTest(suite);
    runner.run("", true);

    return 0;
}
예제 #4
0
int main(int ac,char **av)
{
    enable_logging = 1;

   // 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 );

  
   CppUnit::TextUi::TestRunner runner;
   // Add the top runner.to the test runner
    runner.addTest( CCalendarProcs_TS1::suite() );
//     runner.addTest(new CppUnit::TestCaller<ValidCTodoConstructorTestCase>(
//  			   "test_validCTodoConstructor",
//  			   &ValidCTodoConstructorTestCase::test_validCTodoConstructor));
   runner.run( controller );
 
   // Print test in a compiler compatible format.
   std::ofstream file("dbprocs.xml");
   CPPUNIT_NS::XmlOutputter xml( &result, file );
   xml.setStyleSheet( "report.xsl" );
   xml.write();
   file.close();
   return result.wasSuccessful() ? 0 : 1;
                               
}
int 
main( int argc, char* argv[] )
{
  ProjetUnivers::Kernel::Parameters::load("sound.config") ;
  ProjetUnivers::Kernel::Log::init() ;
  
  // if command line contains "-selftest" then this is the post build check
  // => the output must be in the compiler error format.
  bool selfTest = (argc > 1)  &&  
                  (std::string("-selftest") == argv[1]);

  CppUnit::TextUi::TestRunner runner;
  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
  
  runner.addTest( registry.makeTest() );

  if ( selfTest )
  { // Change the default outputter to a compiler error format outputter
    // The test runner owns the new outputter.
    runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter( 
                                                        &runner.result(),
                                                        std::cerr ) );
  }

  // Run the test.
  bool wasSucessful = runner.run( "" );

  ProjetUnivers::Kernel::Log::close() ;


  // Return error code 1 if the one of test failed.
  return wasSucessful ? 0 : 1;
}
예제 #6
0
int main(int, char *[])
{
  CppUnit::TextUi::TestRunner runner;
  runner.addTest(DllModule_tests::suite());
  
	return !runner.run();
}
예제 #7
0
int main(int argc, char* argv[])
{
    InitModuleObjects();
    // These are the internal unit tests covered by other modules and libraries
    Array objects;
    objects.append(*(new LoadedObject ("jhtree")));
    objects.append(*(new LoadedObject ("roxiemem")));
    objects.append(*(new LoadedObject ("thorhelper")));

    queryStderrLogMsgHandler()->setMessageFields(MSGFIELD_time);
    CppUnit::TextUi::TestRunner runner;
    if (argc==1)
    {
        CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
        runner.addTest( registry.makeTest() );
    }
    else 
    {
        for (int name = 1; name < argc; name++)
        {
            CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry(argv[name]);
            runner.addTest( registry.makeTest() );
        }
    }
    bool wasSucessful = runner.run( "", false );
    ExitModuleObjects();
    releaseAtoms();
    return wasSucessful;
}
예제 #8
0
int main( int argc, char ** argv ) {
	CppUnit::TextUi::TestRunner runner;
	CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
	runner.addTest( registry.makeTest() );

	ofstream out;
	if ( argc == 2 ) {
		out.open( argv[ 1 ] );
	}
	
	runner.setOutputter( 
		new CppUnit::XmlOutputter( 
			&runner.result(), 
			( out.is_open() ? out : std::cerr )
		) 
	);
		
	// Run the tests.
  	bool wasSucessful = runner.run();

	if ( out.is_open() ) {
		out.close();
	}
	
  	// Return error code 1 if the one of test failed.
  	return wasSucessful ? 0 : 1;
}
예제 #9
0
int main( int /*argc*/, char** /*argv*/)
 {

   /// Get the top level suite from the registry
   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();

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

   // Change the default outputter to a compiler error format outputter 
   // uncomment the following line if you need a compiler outputter.
   runner.setOutputter(new CppUnit::CompilerOutputter( &runner.result(),
                                                            std::cout ) );

   // Change the default outputter to a xml error format outputter 
   // uncomment the following line if you need a xml outputter.
   //runner.setOutputter( new CppUnit::XmlOutputter( &runner.result(),
   //                                                    std::cerr ) );

   /// Run the tests.
   //  bool wasSuccessful = runner.run();
   // If you want to avoid the CppUnit typical output change the line above 
   // by the following one: 
   bool wasSuccessful = runner.run("",false,true,false);

   // Return error code 1 if the one of test failed.
   // Uncomment the next line if you want to integrate CppUnit with Oval
   if(!wasSuccessful) std::cerr <<"Error: CppUnit Failures"<<std::endl;
   std::cout <<"[OVAL] Cppunit-result ="<<!wasSuccessful<<std::endl;

   return wasSuccessful ? 0 : 1;
 }
예제 #10
0
파일: main.cpp 프로젝트: Emmavw/wxExtension
bool wxExTestApp::OnInit()
{
  SetAppName("wxex-test-gui-report");

  if (!wxExApp::OnInit())
  {
    return false;
  }

  wxExFrameWithHistory *frame = new 
    wxExFrameWithHistory(NULL, wxID_ANY, wxTheApp->GetAppDisplayName());
    
  frame->Show(true);

  wxLog::SetActiveTarget(new wxLogStderr());
    
  CppUnit::TextUi::TestRunner runner;

  wxExTestSuite* suite = new wxExTestSuite;

  runner.addTest(suite);
  runner.run();

  // Return false, so test ends here.
  return false;
}
int main()
{
	CppUnit::TextUi::TestRunner runner;
	runner.addTest( ObjectPoolTest::suite() );
	runner.run();
	return 0;
}
예제 #12
0
파일: main.cpp 프로젝트: neugenn/SMPPSim
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;
}
예제 #13
0
int main( int argc, char ** argv )
{
    // figure out where our sources are and where we can write
    srcdir = getenv( "srcdir" );
    if( srcdir.isEmpty() ) srcdir = ".";
    builddir = getenv( "top_builddir" );
    if( builddir.isEmpty() ) builddir = ".";

    if( lt_templates_initialize() == -1 ) {
        fprintf( stderr, "Unable to initialize Lintouch Templates Library\n" );
        return -1;
    }
    atexit( lt_templates_terminate );

    QApplication a( argc, argv, false );

    CppUnit::TextUi::TestRunner runner;
    CppUnit::TestFactoryRegistry &registry = 
        CppUnit::TestFactoryRegistry::getRegistry();
    runner.addTest( registry.makeTest() );

    bool wasThereError = runner.run( "", false );

    // shell expects 0 if successfull
    return !wasThereError;
}
예제 #14
0
파일: utest_main.cpp 프로젝트: Elgu/rpgml
int main( int argc, char **argv)
{
  // Create the event manager and test controller
  CppUnit::TestResult controller;

  // Add a listener that colllects test result
  CppUnit::TestResultCollector result;
  controller.addListener( &result );

  // Add a listener that print dots as test run.
  CppUnit::BriefTestProgressListener progress;
  controller.addListener( &progress );

  CppUnit::TextUi::TestRunner runner;
  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
  runner.addTest( registry.makeTest() );
  runner.run( controller, "" );

  // Resultate im Compiler-Format ausgeben
  CppUnit::CompilerOutputter compileroutputter( &result, std::cerr );
  compileroutputter.write();

  // Rueckmeldung, ob Tests erfolgreich waren
  return ( result.wasSuccessful() ? 0 : -1 );
}
예제 #15
0
int main( int argc, char **argv)
{
  CppUnit::TextUi::TestRunner runner;
  runner.addTest( MumukiTest::suite() );
  runner.run();
  return 0;
}
int main(int argc, char *argv[])
{
    CppUnit::TextUi::TestRunner runner;
    CppUnit::TestSuite *suite = new CppUnit::TestSuite();

    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test1", &Search_in_Rotated_Sorted_ArrayTest::test1));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test2", &Search_in_Rotated_Sorted_ArrayTest::test2));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test3", &Search_in_Rotated_Sorted_ArrayTest::test3));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test4", &Search_in_Rotated_Sorted_ArrayTest::test4));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test5", &Search_in_Rotated_Sorted_ArrayTest::test5));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test6", &Search_in_Rotated_Sorted_ArrayTest::test6));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test7", &Search_in_Rotated_Sorted_ArrayTest::test7));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test8", &Search_in_Rotated_Sorted_ArrayTest::test8));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test9", &Search_in_Rotated_Sorted_ArrayTest::test9));
    suite->addTest(new CppUnit::TestCaller<Search_in_Rotated_Sorted_ArrayTest>(
                "test10", &Search_in_Rotated_Sorted_ArrayTest::test10));
    runner.addTest(suite);
    runner.run("", true);

    return 0;
}
예제 #17
0
파일: runTest.cpp 프로젝트: Mega28/Feedback
int main (int argc, char* argv[]) {
  CppUnit::TextUi::TestRunner runner;
  CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
  runner.addTest( registry.makeTest() );
  bool failed = runner.run("", false);
  return !failed;
}
예제 #18
0
int main(int ac,char **av)
{
   // 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 );

  
   CppUnit::TextUi::TestRunner runner;
   // Add the top runner.to the test runner
   runner.addTest( CTimezone_TS1::suite() );
   runner.run( controller );
 
   // Print test in a compiler compatible format.
   std::ofstream file("ctimezone.xml");
   CPPUNIT_NS::XmlOutputter xml( &result, file );
   xml.setStyleSheet( "report.xsl" );
   xml.write();
   file.close();

   return result.wasSuccessful() ? 0 : 1;
                               
}
예제 #19
0
int main( int argc, char **argv) {
  CppUnit::TextUi::TestRunner runner;
  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
  runner.addTest( registry.makeTest() );
  bool wasSuccessful = runner.run( );
  return wasSuccessful ? 0 : 1;
}
예제 #20
0
int
main(int argc, char *argv[])
{
    CppUnit::TextUi::TestRunner runner;
    runner.addTest(ParseTest::suite());
    runner.run();
}
int main(int argc, char *argv[])
{
    CppUnit::TextUi::TestRunner runner;
    CppUnit::TestSuite *suite = new CppUnit::TestSuite();

    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test1", &Substring_with_Concatenation_of_All_WordsTest::test1));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test2", &Substring_with_Concatenation_of_All_WordsTest::test2));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test3", &Substring_with_Concatenation_of_All_WordsTest::test3));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test4", &Substring_with_Concatenation_of_All_WordsTest::test4));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test5", &Substring_with_Concatenation_of_All_WordsTest::test5));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test6", &Substring_with_Concatenation_of_All_WordsTest::test6));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test7", &Substring_with_Concatenation_of_All_WordsTest::test7));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test8", &Substring_with_Concatenation_of_All_WordsTest::test8));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test9", &Substring_with_Concatenation_of_All_WordsTest::test9));
    suite->addTest(new CppUnit::TestCaller<Substring_with_Concatenation_of_All_WordsTest>(
                "test10", &Substring_with_Concatenation_of_All_WordsTest::test10));
    runner.addTest(suite);
    runner.run("", true);

    return 0;
}
예제 #22
0
파일: UnitTest.cpp 프로젝트: khzaw/xcalibur
int main(int argc, char* argv[])
{
// Get the top level suite from the registry
//CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest();
CppUnit::TestSuite *unitSuite = new CppUnit::TestSuite( "All unit test" );
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("VarTableTest").makeTest());	
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("ProcTableTest").makeTest());
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("ModifiesTest").makeTest());
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("UsesTest").makeTest());	
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("ParentTest").makeTest());	
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("FollowsTest").makeTest());	
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("ConstantTest").makeTest());	
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("StatementTest").makeTest());	
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("CallsTest").makeTest());
//unitSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("QueryParserTest").makeTest());

CppUnit::TestFactoryRegistry::getRegistry().addTestToSuite(unitSuite);
CppUnit::TextUi::TestRunner runner;


runner.addTest(unitSuite);
bool wasSucessful = runner.run();

//cin.get();
getchar();

return wasSucessful ? 0 : 1;
}
예제 #23
0
파일: main.cpp 프로젝트: lzbotha/hpc
int main() {
    CppUnit::TextUi::TestRunner runner;
    CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
    runner.addTest( registry.makeTest() );
    bool wasSuccessful = runner.run();
    return !wasSuccessful;
}
예제 #24
0
////////////////////////////////////////////////////////////////////////
///
/// @fn bool BancTests::executer()
///
/// Cette fonction exécute l'ensemble des tests unitaires définis.
/// La sortie de l'exécution des tests se fait dans la console standard
/// d'erreurs 'cerr'. Cette fonction ajuste également le format de
/// sortie pour correspondre à celui de Visual Studio afin d'intégrer
/// l'exécution des tests au processus de compilation ("Post Build Event").
///
/// @return true si l'exécution de tous les tests a réussi, sinon false.
///
////////////////////////////////////////////////////////////////////////
bool BancTests::executer()
{
	// Obtenir la suite de tests à haut niveau
	CppUnit::Test *suite{ CppUnit::TestFactoryRegistry::getRegistry().makeTest() };

	// Obtient un environnement d'exécution de tests qui imprime les résultats
	// dans une console (cout, cerr, fichier, etc.) et ajoute la suite de tests
	// de base à l'environnement.
	// (Notez qu'il est aussi possible d'obtenir un environnement qui affiche
	// les résultats des tests au sein d'une interface graphique QT ou MFC.
	// Consultez la documentation cppunit pour plus d'informations)
	CppUnit::TextUi::TestRunner runner;
	runner.addTest(suite);

	// Indique que nous souhaitons formatter la sortie selon un format qui
	// s'apparente à la sortie d'un compilateur (MSVC++), et que nous
	// souhaitons que la sortie soit réalisée dans le canal standard cerr.
	// Cela permettra à Visual Studio d'interpréter la sortie de cppunit,
	// d'indiquer les erreurs trouvées par les tests et leur numéro de ligne
	// en tant qu'erreurs survenant au niveau du processus de compilation.
	runner.setOutputter(new CppUnit::CompilerOutputter{ &runner.result(),
		std::cerr });
	// Exécuter les tests
	return runner.run();
}
예제 #25
0
int main(int argc, char **argv)
{
#ifdef GRINS_HAVE_CPPUNIT

  // Initialize the library.  This is necessary because the library
  // may depend on a number of other libraries (i.e. MPI  and Petsc)
  // that require initialization before use.
  libMesh::LibMeshInit init(argc, argv);
  TestCommWorld = &init.comm();

  GRINS::SimulationInitializer initializer;

  CppUnit::TextUi::TestRunner runner;
  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
  runner.addTest( registry.makeTest() );

  // If the tests all succeed, report success
  if (runner.run())
    return 0;

  // If any test fails report failure
  return 1;

#else
  // If we don't have CPPUnit, report we skipped
  // 77 return code tells Automake we skipped this.
  return 77;
#endif // GRINS_HAVE_CPPUNIT
}
int	main(int /* argc */, char * /* argv */[]) {
	CppUnit::TextUi::TestRunner	runner;
	CppUnit::TestFactoryRegistry	&registry = CppUnit::TestFactoryRegistry::getRegistry();
	runner.addTest(registry.makeTest());
	bool	wasSuccessful = runner.run("", false);
	return (wasSuccessful) ? 0 : 1;
}
예제 #27
0
int main(int argc, char const* argv[]) {
    CppUnit::TextUi::TestRunner runner;
    runner.addTest(LoggingUnitTest::suite());
    runner.run();

    return 0;
}
예제 #28
0
int main(int, char *[])
{
  CppUnit::TextUi::TestRunner runner;
  runner.addTest(MetatagExpressionLexer_tests::suite());
  
	return !runner.run();
}
예제 #29
0
int main (int ac, char **av)
{
   // Do this here to get init text out of the way
   vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) << "Starting test\n" << vprDEBUG_FLUSH;

   CppUnit::TextUi::TestRunner runner;

   //------------------------------------
   //  noninteractive
   //------------------------------------
   // create non-interactive test suite
   CppUnit::TestSuite* noninteractive_suite = new CppUnit::TestSuite("noninteractive");

   // add tests to the suite

#ifdef VJ_API_PERFORMER
   noninteractive_suite->addTest(vrjTest::PfUtilTest::suite());
#endif

   // Add the test suite to the runner
   runner.addTest(noninteractive_suite);

   // run all test suites
   runner.run();

   return 0;
}
예제 #30
0
int main()
{
#ifdef ANTIOCH_HAVE_GSL
#ifdef ANTIOCH_HAVE_CPPUNIT
  CppUnit::TextUi::TestRunner runner;
  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
  runner.addTest( registry.makeTest() );

  // If the tests all succeed, report success
  if (runner.run())
    return 0;

  // If any test fails report failure
  return 1;
#else // ANTIOCH_HAVE_CPPUNIT
  // If we don't have CPPUnit, report we skipped
  // 77 return code tells Automake we skipped this.
  return 77;
#endif // ANTIOCH_HAVE_CPPUNIT

#else // ANTIOCH_HAVE_GSL
  // If we don't have Eigen, report we skipped
  // 77 return code tells Automake we skipped this.
  return 77;
#endif // ANTIOCH_HAVE_GSL
}