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

Diff of /temp/escript/test/FunctionSpaceTestCase.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/esys2/escript/test/FunctionSpace/FunctionSpaceTestCase.cpp revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC branches/ROBW_XPLATFORM/escript/test/FunctionSpace/FunctionSpaceTestCase.cpp revision 622 by robwdcock, Wed Mar 22 14:00:08 2006 UTC
# Line 11  Line 11 
11   *                                                                           *   *                                                                           *
12   *****************************************************************************   *****************************************************************************
13  */  */
14  #include "escript/Data/FunctionSpace.h"  
15  #include "escript/Data/NullDomain.h"  #include "FunctionSpace.h"
16    #include "NullDomain.h"
17    
18  #include "FunctionSpaceTestCase.h"  #include "FunctionSpaceTestCase.h"
19    
# Line 44  void FunctionSpaceTestCase::testAll() { Line 45  void FunctionSpaceTestCase::testAll() {
45    
46    cout << endl;    cout << endl;
47    
48      cout << "\tTest default FunctionSpace constructor." << endl;
49    
50    // Test Default constructor    // Test Default constructor
51      FunctionSpace testFunctionSpace0;
52    FunctionSpace testFunctionSpace1;    FunctionSpace testFunctionSpace1;
53    
54      assert(testFunctionSpace0==testFunctionSpace1);
55    
56      cout << "\tTest FunctionSpace constructor." << endl;
57    
58    // Test constructor    // Test constructor
59    NullDomain nullDomain;    NullDomain nullDomain;
60    int testfunctionSpaceType = nullDomain.getFunctionCode();    int testfunctionSpaceType = nullDomain.getFunctionCode();
61    
62    FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);    FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);
63        
64    // Test getTypeCode    assert(testFunctionSpace1.getTypeCode()==testfunctionSpaceType);
   cout << "Test getTypeCode" << endl;  
   assert(testFunctionSpace1.getTypeCode()==1);  
   
   // Test getDomain  
   cout << "Test getDomain" << endl;  
65    assert(testFunctionSpace2.getDomain()==nullDomain);    assert(testFunctionSpace2.getDomain()==nullDomain);
   
   // Test getDim  
   cout << "Test getDim" << endl;  
66    assert(testFunctionSpace1.getDim()==1);    assert(testFunctionSpace1.getDim()==1);
   
   // Test == operator  
   cout << "Test == operator" << endl;  
67    assert(testFunctionSpace1==testFunctionSpace1);    assert(testFunctionSpace1==testFunctionSpace1);
68    assert(!(testFunctionSpace1!=testFunctionSpace1));    assert(!(testFunctionSpace1!=testFunctionSpace1));
69    
   // Test = operator  
   cout << "Test = operator" << endl;  
70    testFunctionSpace1=testFunctionSpace2;    testFunctionSpace1=testFunctionSpace2;
71    assert(testFunctionSpace1==testFunctionSpace2);    assert(testFunctionSpace1==testFunctionSpace2);
72    
# Line 86  TestSuite* FunctionSpaceTestCase::suite Line 81  TestSuite* FunctionSpaceTestCase::suite
81    testSuite->addTest (new TestCaller< FunctionSpaceTestCase>("testAll",&FunctionSpaceTestCase::testAll));    testSuite->addTest (new TestCaller< FunctionSpaceTestCase>("testAll",&FunctionSpaceTestCase::testAll));
82    return testSuite;    return testSuite;
83  }  }
   

Legend:
Removed from v.82  
changed lines
  Added in v.622

  ViewVC Help
Powered by ViewVC 1.1.26