/[escript]/branches/arrayview_from_1695_trunk/escript/test/escript_UnitTest.cpp
ViewVC logotype

Contents of /branches/arrayview_from_1695_trunk/escript/test/escript_UnitTest.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1734 - (show annotations)
Thu Aug 28 06:11:56 2008 UTC (11 years, 3 months ago) by jfenwick
File size: 2486 byte(s)
Added operations to Datatypes:
checkOffset
copySlice
copySliceFrom

Fixed some error reporting using EsysAssert.

Added two new c++ test suites:
DataTypesTest
DataMathsTest

Note that the test suite does not compile with dodebug=yes. There is an issue with linking one of the exception functions. I'm going to leave this 
until I have finished the rest of the work, perhaps Ken's scons changes will fix it.


1
2 /* $Id$ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 #include <iostream>
17
18 #include "DataEmptyTestCase.h"
19 #include "DataConstantTestCase.h"
20 #include "DataTaggedTestCase.h"
21 #include "DataExpandedTestCase.h"
22 #include "DataFactoryTestCase.h"
23 #include "DataArrayViewTestCase.h"
24 #include "DataBlocks2DTestCase.h"
25 #include "DataVectorTestCase.h"
26 #include "TaipanTestCase.h"
27 #include "DataCTestCase.h"
28 #include "DataAlgorithmAdapterTestCase.h"
29 #include "FunctionSpaceTestCase.h"
30 #include "DataTestCase.h"
31 #include "DataMathsTestCase.h"
32 #include "DataTypesTestCase.h"
33
34 #include "tools/CppUnitTest/TestRunner.h"
35
36 using namespace CppUnitTest;
37
38 extern "C"{
39 #include "paso/Paso_MPI.h"
40 }
41
42 int main(int argc, char* argv[])
43 {
44 #ifdef PASO_MPI
45 int status = MPI_Init(&argc, &argv);
46 if (status != MPI_SUCCESS) {
47 std::cerr << argv[0] << ": MPI_Init failed, exiting." << std::endl;
48 return status;
49 }
50 #endif
51 //
52 // object which runs all of the tests
53 TestRunner runner;
54 //
55 // add the RangeTestCase suite of tests to the runner
56 runner.addTest ("DataTypes", DataTypesTestCase::suite());
57 runner.addTest ("DataMaths", DataMathsTestCase::suite());
58 runner.addTest ("DataEmpty", DataEmptyTestCase::suite());
59 runner.addTest ("DataConstant", DataConstantTestCase::suite());
60 runner.addTest ("DataTagged", DataTaggedTestCase::suite());
61 runner.addTest ("DataExpanded", DataExpandedTestCase::suite());
62 runner.addTest ("DataFactory", DataFactoryTestCase::suite());
63 runner.addTest ("DataArrayView", DataArrayViewTestCase::suite());
64 runner.addTest ("DataBlocks2D", DataBlocks2DTestCase::suite());
65 runner.addTest ("DataVector", DataVectorTestCase::suite());
66 runner.addTest ("Taipan", TaipanTestCase::suite());
67 runner.addTest ("DataC", DataCTestCase::suite());
68 runner.addTest ("DataAlgorithmAdapter", DataAlgorithmAdapterTestCase::suite());
69 runner.addTest ("FunctionSpace", FunctionSpaceTestCase::suite());
70 runner.addTest ("Data", DataTestCase::suite());
71
72 // actually run the unit tests.
73 runner.run (argc, argv);
74
75 #ifdef PASO_MPI
76 MPI_Finalize();
77 #endif
78
79 return 0;
80 }
81
82

  ViewVC Help
Powered by ViewVC 1.1.26