Ignore:
Timestamp:
Feb 25, 2010, 2:17:15 PM (15 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/gslmatrixunittest.cpp

    r1aa81a r44becc  
    1313
    1414#include "gslmatrixunittest.hpp"
     15
     16#ifdef HAVE_TESTRUNNER
     17#include "UnitTestMain.hpp"
     18#endif /*HAVE_TESTRUNNER*/
    1519
    1620/********************************************** Test classes **************************************/
     
    248252  CPPUNIT_ASSERT_EQUAL( false, m->IsPositiveDefinite() );
    249253};
    250 
    251 /********************************************** Main routine **************************************/
    252 
    253 int main(int argc, char **argv)
    254 {
    255   // Get the top level suite from the registry
    256   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    257 
    258   // Adds the test to the list of test to run
    259   CppUnit::TextUi::TestRunner runner;
    260   runner.addTest( suite );
    261 
    262   // Change the default outputter to a compiler error format outputter
    263   runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
    264                                                        std::cerr ) );
    265   // Run the tests.
    266   bool wasSucessful = runner.run();
    267 
    268   // Return error code 1 if the one of test failed.
    269   return wasSucessful ? 0 : 1;
    270 };
Note: See TracChangeset for help on using the changeset viewer.