/[escript]/trunk/escript/test/FunctionSpaceTestCase.cpp
ViewVC logotype

Contents of /trunk/escript/test/FunctionSpaceTestCase.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1312 - (show annotations)
Mon Sep 24 06:18:44 2007 UTC (11 years, 11 months ago) by ksteube
File size: 2218 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

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 "escript/FunctionSpace.h"
17 #include "escript/NullDomain.h"
18
19 #include "FunctionSpaceTestCase.h"
20
21 #include <iostream>
22 #include <sstream>
23
24 using namespace CppUnitTest;
25 using namespace escript;
26 using namespace std;
27
28 void FunctionSpaceTestCase::setUp() {
29 //
30 // This is called before each test is run
31
32 }
33
34 void FunctionSpaceTestCase::tearDown() {
35 //
36 // This is called after each test has been run
37
38 }
39
40 void FunctionSpaceTestCase::testAll() {
41 //
42 // The test code may be entered here
43 // There is nothing special about the function name, it may be renamed to
44 // something more suitable.
45 // As many test methods as desired may be added.
46
47 cout << endl;
48
49 cout << "\tTest default FunctionSpace constructor." << endl;
50
51 // Test Default constructor
52 FunctionSpace testFunctionSpace0;
53 FunctionSpace testFunctionSpace1;
54
55 assert(testFunctionSpace0==testFunctionSpace1);
56
57 cout << "\tTest FunctionSpace constructor." << endl;
58
59 // Test constructor
60 NullDomain nullDomain;
61 int testfunctionSpaceType = nullDomain.getFunctionCode();
62
63 FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);
64
65 assert(testFunctionSpace1.getTypeCode()==testfunctionSpaceType);
66 assert(testFunctionSpace2.getDomain()==nullDomain);
67 assert(testFunctionSpace1.getDim()==1);
68 assert(testFunctionSpace1==testFunctionSpace1);
69 assert(!(testFunctionSpace1!=testFunctionSpace1));
70
71 testFunctionSpace1=testFunctionSpace2;
72 assert(testFunctionSpace1==testFunctionSpace2);
73
74 }
75
76 TestSuite* FunctionSpaceTestCase::suite ()
77 {
78 //
79 // create the suite of tests to perform.
80 TestSuite *testSuite = new TestSuite ("FunctionSpaceTestCase");
81
82 testSuite->addTest (new TestCaller< FunctionSpaceTestCase>("testAll",&FunctionSpaceTestCase::testAll));
83 return testSuite;
84 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26