/[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 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 1872 by jfenwick, Mon Oct 13 00:18:55 2008 UTC
# Line 56  void FunctionSpaceTestCase::testAll() { Line 56  void FunctionSpaceTestCase::testAll() {
56    cout << "\tTest FunctionSpace constructor." << endl;    cout << "\tTest FunctionSpace constructor." << endl;
57    
58    // Test constructor    // Test constructor
59    NullDomain nullDomain;    NullDomain* nullDomain=new NullDomain();  // the shared ptr will deal with it
60    int testfunctionSpaceType = nullDomain.getFunctionCode();    int testfunctionSpaceType = nullDomain->getFunctionCode();
61      Domain_ptr nulldom(nullDomain);
62    
63    FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);    FunctionSpace testFunctionSpace2(nulldom, testfunctionSpaceType);
64        
65    assert(testFunctionSpace1.getTypeCode()==testfunctionSpaceType);    assert(testFunctionSpace1.getTypeCode()==testfunctionSpaceType);
66    assert(testFunctionSpace2.getDomain()==nullDomain);    assert(*(testFunctionSpace2.getDomain())==*nullDomain);
67    assert(testFunctionSpace1.getDim()==1);    assert(testFunctionSpace1.getDim()==1);
68    assert(testFunctionSpace1==testFunctionSpace1);    assert(testFunctionSpace1==testFunctionSpace1);
69    assert(!(testFunctionSpace1!=testFunctionSpace1));    assert(!(testFunctionSpace1!=testFunctionSpace1));
70    
71    testFunctionSpace1=testFunctionSpace2;    FunctionSpace testFunctionSpace3=testFunctionSpace2;  // test copy constructor
72    assert(testFunctionSpace1==testFunctionSpace2);  cout << "Testing equality\n";
73      assert(testFunctionSpace3==testFunctionSpace2);
74    
75  }  }
76    

Legend:
Removed from v.1811  
changed lines
  Added in v.1872

  ViewVC Help
Powered by ViewVC 1.1.26