Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/CacheableTest.cpp

    r9b6b2f r2ba827  
    1515
    1616#include "Patterns/Cacheable.hpp"
    17 
    18 #ifdef HAVE_TESTRUNNER
    19 #include "UnitTestMain.hpp"
    20 #endif /*HAVE_TESTRUNNER*/
    21 
    22 /********************************************** Test classes **************************************/
    2317
    2418// Registers the fixture into the 'registry'
     
    8377  CPPUNIT_ASSERT_EQUAL( true, numbers->hasRecalced);
    8478}
     79
     80
     81
     82/********************************************** Main routine **************************************/
     83
     84int main(int argc, char **argv)
     85{
     86  // Get the top level suite from the registry
     87  CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
     88
     89  // Adds the test to the list of test to run
     90  CppUnit::TextUi::TestRunner runner;
     91  runner.addTest( suite );
     92
     93  // Change the default outputter to a compiler error format outputter
     94  runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
     95                                                       std::cerr ) );
     96  // Run the tests.
     97  bool wasSucessful = runner.run();
     98
     99  // Return error code 1 if the one of test failed.
     100  return wasSucessful ? 0 : 1;
     101};
     102
Note: See TracChangeset for help on using the changeset viewer.