/[escript]/branches/clazy/finley/test/finley_UnitTests.cpp
ViewVC logotype

Contents of /branches/clazy/finley/test/finley_UnitTests.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5997 - (show annotations)
Mon Feb 29 07:24:47 2016 UTC (3 years, 1 month ago) by caltinay
Original Path: trunk/finley/test/finley_UnitTests.cpp
File size: 1433 byte(s)
moved esys MPI to escript.

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

  ViewVC Help
Powered by ViewVC 1.1.26