Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/infounittest.cpp

    r8725ed re6fdbe  
    1717#include "info.hpp"
    1818#include "infounittest.hpp"
     19#include "log.hpp"
     20
     21#ifdef HAVE_TESTRUNNER
     22#include "UnitTestMain.hpp"
     23#endif /*HAVE_TESTRUNNER*/
    1924
    2025/********************************************** Test classes **************************************/
     
    3136void InfoTest::tearDown()
    3237{
     38  logger::purgeInstance();
    3339};
    3440
     
    4349  CPPUNIT_ASSERT_EQUAL( 1, test.verbosity );
    4450};
    45 
    46 
    47 /********************************************** Main routine **************************************/
    48 
    49 int main(int argc, char **argv)
    50 {
    51   // Get the top level suite from the registry
    52   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    53 
    54   // Adds the test to the list of test to run
    55   CppUnit::TextUi::TestRunner runner;
    56   runner.addTest( suite );
    57 
    58   // Change the default outputter to a compiler error format outputter
    59   runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
    60                                                        std::cerr ) );
    61   // Run the tests.
    62   bool wasSucessful = runner.run();
    63 
    64   // Return error code 1 if the one of test failed.
    65   return wasSucessful ? 0 : 1;
    66 };
Note: See TracChangeset for help on using the changeset viewer.