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/tesselationunittest.cpp

    r1aa81a r44becc  
    1818#include "tesselation.hpp"
    1919#include "tesselationunittest.hpp"
     20
     21#ifdef HAVE_TESTRUNNER
     22#include "UnitTestMain.hpp"
     23#endif /*HAVE_TESTRUNNER*/
    2024
    2125#define SPHERERADIUS 2.
     
    177181  }
    178182}
    179 
    180 /********************************************** Main routine **************************************/
    181 
    182 int main(int argc, char **argv)
    183 {
    184   // Get the top level suite from the registry
    185   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    186 
    187   // Adds the test to the list of test to run
    188   CppUnit::TextUi::TestRunner runner;
    189   runner.addTest( suite );
    190 
    191   // Change the default outputter to a compiler error format outputter
    192   runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
    193                                                        std::cerr ) );
    194   // Run the tests.
    195   bool wasSucessful = runner.run();
    196 
    197   // Return error code 1 if the one of test failed.
    198   return wasSucessful ? 0 : 1;
    199 };
Note: See TracChangeset for help on using the changeset viewer.