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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 117 - (hide annotations)
Fri Apr 1 05:48:57 2005 UTC (14 years, 4 months ago) by jgs
Original Path: trunk/esys2/escript/test/FunctionSpace/FunctionSpaceTestCase.cpp
File size: 2578 byte(s)
*** empty log message ***

1 jgs 82 /*
2     *****************************************************************************
3     * *
4     * COPYRIGHT ACcESS - All Rights Reserved *
5     * *
6     * This software is the property of ACcESS. No part of this code *
7     * may be copied in any form or by any means without the expressed written *
8     * consent of ACcESS. Copying, use or modification of this software *
9     * by any unauthorised person is illegal unless that person has a software *
10     * license agreement with ACcESS. *
11     * *
12     *****************************************************************************
13     */
14 jgs 117
15 jgs 82 #include "escript/Data/FunctionSpace.h"
16     #include "escript/Data/NullDomain.h"
17    
18     #include "FunctionSpaceTestCase.h"
19    
20     #include <iostream>
21     #include <sstream>
22    
23     using namespace CppUnitTest;
24     using namespace escript;
25     using namespace std;
26    
27     void FunctionSpaceTestCase::setUp() {
28     //
29     // This is called before each test is run
30    
31     }
32    
33     void FunctionSpaceTestCase::tearDown() {
34     //
35     // This is called after each test has been run
36    
37     }
38    
39     void FunctionSpaceTestCase::testAll() {
40     //
41     // The test code may be entered here
42     // There is nothing special about the function name, it may be renamed to
43     // something more suitable.
44     // As many test methods as desired may be added.
45    
46     cout << endl;
47    
48 jgs 117 cout << "\tTest default FunctionSpace constructor." << endl;
49    
50 jgs 82 // Test Default constructor
51     FunctionSpace testFunctionSpace1;
52    
53 jgs 117 cout << "\tTest FunctionSpace constructor." << endl;
54    
55 jgs 82 // Test constructor
56     NullDomain nullDomain;
57     int testfunctionSpaceType = nullDomain.getFunctionCode();
58    
59     FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);
60    
61 jgs 117 assert(testFunctionSpace1.getTypeCode()==testfunctionSpaceType);
62 jgs 82 assert(testFunctionSpace2.getDomain()==nullDomain);
63     assert(testFunctionSpace1.getDim()==1);
64     assert(testFunctionSpace1==testFunctionSpace1);
65     assert(!(testFunctionSpace1!=testFunctionSpace1));
66    
67     testFunctionSpace1=testFunctionSpace2;
68     assert(testFunctionSpace1==testFunctionSpace2);
69    
70     }
71    
72     TestSuite* FunctionSpaceTestCase::suite ()
73     {
74     //
75     // create the suite of tests to perform.
76     TestSuite *testSuite = new TestSuite ("FunctionSpaceTestCase");
77    
78     testSuite->addTest (new TestCaller< FunctionSpaceTestCase>("testAll",&FunctionSpaceTestCase::testAll));
79     return testSuite;
80     }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26