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

    r1aa81a r44becc  
    1717#include "tesselation.hpp"
    1818#include "tesselation_insideoutsideunittest.hpp"
     19
     20#ifdef HAVE_TESTRUNNER
     21#include "UnitTestMain.hpp"
     22#endif /*HAVE_TESTRUNNER*/
    1923
    2024#define SPHERERADIUS 2.
     
    161165      }
    162166};
    163 
    164 /********************************************** Main routine **************************************/
    165 
    166 int main(int argc, char **argv)
    167 {
    168   // Get the top level suite from the registry
    169   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    170 
    171   // Adds the test to the list of test to run
    172   CppUnit::TextUi::TestRunner runner;
    173   runner.addTest( suite );
    174 
    175   // Change the default outputter to a compiler error format outputter
    176   runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
    177                                                        std::cerr ) );
    178   // Run the tests.
    179   bool wasSucessful = runner.run();
    180 
    181   // Return error code 1 if the one of test failed.
    182   return wasSucessful ? 0 : 1;
    183 };
Note: See TracChangeset for help on using the changeset viewer.