/[escript]/trunk/dudley/test/dudley_UnitTests.cpp
ViewVC logotype

Diff of /trunk/dudley/test/dudley_UnitTests.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3596 by jfenwick, Mon Oct 11 01:48:14 2010 UTC revision 3597 by caltinay, Thu Sep 15 06:03:17 2011 UTC
# Line 13  Line 13 
13    
14    
15  #include "MeshAdapterTestCase.h"  #include "MeshAdapterTestCase.h"
16    #include <cppunit/CompilerOutputter.h>
17    #include <cppunit/TestResult.h>
18    #include <cppunit/TestResultCollector.h>
19    #include <cppunit/TestRunner.h>
20    
 #include "tools/CppUnitTest/TestRunner.h"  
21    
22  using namespace CppUnitTest;  using namespace CppUnit;
23    
24  extern "C"{  extern "C"{
25  #include "esysUtils/Esys_MPI.h"  #include "esysUtils/Esys_MPI.h"
# Line 24  extern "C"{ Line 27  extern "C"{
27    
28  int main(int argc, char* argv[])  int main(int argc, char* argv[])
29  {  {
   
30  #ifdef ESYS_MPI  #ifdef ESYS_MPI
31          int status = MPI_Init(&argc, &argv);      int status = MPI_Init(&argc, &argv);
32          if (status != MPI_SUCCESS) {      if (status != MPI_SUCCESS) {
33            std::cerr << argv[0] << ": MPI_Init failed, exiting." << std::endl;          std::cerr << argv[0] << ": MPI_Init failed, exiting." << std::endl;
34            return status;          return status;
35          }      }
36  #endif  #endif
37        TestResult controller;
38          //      TestResultCollector result;
39          // object which runs all of the tests      controller.addListener(&result);
40          TestRunner runner;      TestRunner runner;
41          //      runner.addTest(MeshAdapterTestCase::suite());
42          // add the RangeTestCase suite of tests to the runner      runner.run(controller);
43          runner.addTest ("MeshAdapter", MeshAdapterTestCase::suite());      CompilerOutputter outputter( &result, std::cerr );
44        outputter.write();
         // actually run the unit tests.  
         runner.run (argc, argv);  
   
45  #ifdef ESYS_MPI  #ifdef ESYS_MPI
46          MPI_Finalize();      MPI_Finalize();
47  #endif  #endif
48        return result.wasSuccessful() ? 0 : 1;
         return 0;  
49  }  }
50    

Legend:
Removed from v.3596  
changed lines
  Added in v.3597

  ViewVC Help
Powered by ViewVC 1.1.26