/[escript]/trunk/esysUtils/test/EsysExceptionTest.cpp
ViewVC logotype

Contents of /trunk/esysUtils/test/EsysExceptionTest.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3597 - (show annotations)
Thu Sep 15 06:03:17 2011 UTC (7 years, 7 months ago) by caltinay
File size: 1261 byte(s)
Switching to external cppunit:
-removed tools/CppUnitTest
-updated scons script and files
-updated tests to changed API
-updated readme

Bumped scons options file version to 201. Additions:
-cppunit*
-boomeramg*
-vsl_random


1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 #include "EsysExceptionTestCase.h"
16 #include <cppunit/CompilerOutputter.h>
17 #include <cppunit/TestResult.h>
18 #include <cppunit/TestResultCollector.h>
19 #include <cppunit/TestRunner.h>
20
21 using namespace CppUnit;
22
23 extern "C"{
24 #include "esysUtils/Esys_MPI.h"
25 }
26
27 int main(int argc, char **argv)
28 {
29 #ifdef ESYS_MPI
30 int status = MPI_Init(&argc, &argv);
31 if (status != MPI_SUCCESS) {
32 std::cerr << argv[0] << ": MPI_Init failed, exiting." << std::endl;
33 return status;
34 }
35 #endif
36 TestResult controller;
37 TestResultCollector result;
38 controller.addListener(&result);
39 TestRunner runner;
40 runner.addTest(EsysExceptionTestCase::suite());
41 runner.run(controller);
42 CompilerOutputter outputter( &result, std::cerr );
43 outputter.write();
44 #ifdef ESYS_MPI
45 MPI_Finalize();
46 #endif
47 return result.wasSuccessful() ? 0 : 1;
48
49 }
50

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26