/[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 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC revision 1872 by jfenwick, Mon Oct 13 00:18:55 2008 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #include "escript/FunctionSpace.h"  #include "escript/FunctionSpace.h"
16  #include "escript/NullDomain.h"  #include "escript/NullDomain.h"
# Line 57  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.1312  
changed lines
  Added in v.1872

  ViewVC Help
Powered by ViewVC 1.1.26