Ignore:
Timestamp:
Feb 25, 2010, 2:17:15 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
0de871, 36c5cf
Parents:
1aa81a
Message:

Tests now work with Eclipse ECUT's TestRunner.

  • new switch in configure.ac: --enable-ecut
  • all tests are compiled as single test as before
  • and a new TestRunner test suite that combines all test into a single executable which can be run as CppUnit program in Eclipse (and then gives JUnit like output).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/unittests/AnalysisPairCorrelationUnitTest.cpp

    r1aa81a r44becc  
    2424#include "periodentafel.hpp"
    2525#include "tesselation.hpp"
     26
     27#ifdef HAVE_TESTRUNNER
     28#include "UnitTestMain.hpp"
     29#endif /*HAVE_TESTRUNNER*/
    2630
    2731/********************************************** Test classes **************************************/
     
    132136  CPPUNIT_ASSERT_EQUAL( 6, tester->second );
    133137};
    134 
    135 /********************************************** Main routine **************************************/
    136 
    137 int main(int argc, char **argv)
    138 {
    139   // Get the top level suite from the registry
    140   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    141 
    142   // Adds the test to the list of test to run
    143   CppUnit::TextUi::TestRunner runner;
    144   runner.addTest( suite );
    145 
    146   // Change the default outputter to a compiler error format outputter
    147   runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
    148                                                        std::cerr ) );
    149   // Run the tests.
    150   bool wasSucessful = runner.run();
    151 
    152   // Return error code 1 if the one of test failed.
    153   return wasSucessful ? 0 : 1;
    154 };
Note: See TracChangeset for help on using the changeset viewer.