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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1387 - (hide annotations)
Fri Jan 11 07:45:26 2008 UTC (11 years, 7 months ago) by trankine
Original Path: temp/escript/test/FunctionSpaceTestCase.cpp
File size: 2218 byte(s)
Restore the trunk that existed before the windows changes were committed to the (now moved to branches) old trunk.
1 jgs 117
2 ksteube 1312 /* $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 robwdcock 670 #include "escript/FunctionSpace.h"
17     #include "escript/NullDomain.h"
18 jgs 82
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 jgs 117 cout << "\tTest default FunctionSpace constructor." << endl;
50    
51 jgs 82 // Test Default constructor
52 jgs 121 FunctionSpace testFunctionSpace0;
53 jgs 82 FunctionSpace testFunctionSpace1;
54    
55 jgs 121 assert(testFunctionSpace0==testFunctionSpace1);
56    
57 jgs 117 cout << "\tTest FunctionSpace constructor." << endl;
58    
59 jgs 82 // Test constructor
60     NullDomain nullDomain;
61     int testfunctionSpaceType = nullDomain.getFunctionCode();
62    
63     FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);
64    
65 jgs 117 assert(testFunctionSpace1.getTypeCode()==testfunctionSpaceType);
66 jgs 82 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