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

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

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

revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC revision 117 by jgs, Fri Apr 1 05:48:57 2005 UTC
# Line 11  Line 11 
11   *                                                                           *   *                                                                           *
12   *****************************************************************************   *****************************************************************************
13  */  */
14    
15  #include "escript/Data/FunctionSpace.h"  #include "escript/Data/FunctionSpace.h"
16  #include "escript/Data/NullDomain.h"  #include "escript/Data/NullDomain.h"
17    
# 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 testFunctionSpace1;    FunctionSpace testFunctionSpace1;
52    
53      cout << "\tTest FunctionSpace constructor." << endl;
54    
55    // Test constructor    // Test constructor
56    NullDomain nullDomain;    NullDomain nullDomain;
57    int testfunctionSpaceType = nullDomain.getFunctionCode();    int testfunctionSpaceType = nullDomain.getFunctionCode();
58    
59    FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);    FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);
60        
61    // Test getTypeCode    assert(testFunctionSpace1.getTypeCode()==testfunctionSpaceType);
   cout << "Test getTypeCode" << endl;  
   assert(testFunctionSpace1.getTypeCode()==1);  
   
   // Test getDomain  
   cout << "Test getDomain" << endl;  
62    assert(testFunctionSpace2.getDomain()==nullDomain);    assert(testFunctionSpace2.getDomain()==nullDomain);
   
   // Test getDim  
   cout << "Test getDim" << endl;  
63    assert(testFunctionSpace1.getDim()==1);    assert(testFunctionSpace1.getDim()==1);
   
   // Test == operator  
   cout << "Test == operator" << endl;  
64    assert(testFunctionSpace1==testFunctionSpace1);    assert(testFunctionSpace1==testFunctionSpace1);
65    assert(!(testFunctionSpace1!=testFunctionSpace1));    assert(!(testFunctionSpace1!=testFunctionSpace1));
66    
   // Test = operator  
   cout << "Test = operator" << endl;  
67    testFunctionSpace1=testFunctionSpace2;    testFunctionSpace1=testFunctionSpace2;
68    assert(testFunctionSpace1==testFunctionSpace2);    assert(testFunctionSpace1==testFunctionSpace2);
69    
# Line 86  TestSuite* FunctionSpaceTestCase::suite Line 78  TestSuite* FunctionSpaceTestCase::suite
78    testSuite->addTest (new TestCaller< FunctionSpaceTestCase>("testAll",&FunctionSpaceTestCase::testAll));    testSuite->addTest (new TestCaller< FunctionSpaceTestCase>("testAll",&FunctionSpaceTestCase::testAll));
79    return testSuite;    return testSuite;
80  }  }
   

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

  ViewVC Help
Powered by ViewVC 1.1.26