/[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 temp/escript/test/FunctionSpaceTestCase.cpp revision 1387 by trankine, Fri Jan 11 07:45:26 2008 UTC
# Line 1  Line 1 
1  /*  
2   *****************************************************************************  /* $Id$ */
3   *                                                                           *  
4   *       COPYRIGHT  ACcESS  -  All Rights Reserved                           *  /*******************************************************
5   *                                                                           *   *
6   * This software is the property of ACcESS. No part of this code             *   *           Copyright 2003-2007 by ACceSS MNRF
7   * may be copied in any form or by any means without the expressed written   *   *       Copyright 2007 by University of Queensland
8   * consent of ACcESS.  Copying, use or modification of this software         *   *
9   * by any unauthorised person is illegal unless that person has a software   *   *                http://esscc.uq.edu.au
10   * license agreement with ACcESS.                                            *   *        Primary Business: Queensland, Australia
11   *                                                                           *   *  Licensed under the Open Software License version 3.0
12   *****************************************************************************   *     http://www.opensource.org/licenses/osl-3.0.php
13  */   *
14  #include "escript/Data/FunctionSpace.h"   *******************************************************/
15  #include "escript/Data/NullDomain.h"  
16    #include "escript/FunctionSpace.h"
17    #include "escript/NullDomain.h"
18    
19  #include "FunctionSpaceTestCase.h"  #include "FunctionSpaceTestCase.h"
20    
# Line 44  void FunctionSpaceTestCase::testAll() { Line 46  void FunctionSpaceTestCase::testAll() {
46    
47    cout << endl;    cout << endl;
48    
49      cout << "\tTest default FunctionSpace constructor." << endl;
50    
51    // Test Default constructor    // Test Default constructor
52      FunctionSpace testFunctionSpace0;
53    FunctionSpace testFunctionSpace1;    FunctionSpace testFunctionSpace1;
54    
55      assert(testFunctionSpace0==testFunctionSpace1);
56    
57      cout << "\tTest FunctionSpace constructor." << endl;
58    
59    // Test constructor    // Test constructor
60    NullDomain nullDomain;    NullDomain nullDomain;
61    int testfunctionSpaceType = nullDomain.getFunctionCode();    int testfunctionSpaceType = nullDomain.getFunctionCode();
62    
63    FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);    FunctionSpace testFunctionSpace2(nullDomain, testfunctionSpaceType);
64        
65    // Test getTypeCode    assert(testFunctionSpace1.getTypeCode()==testfunctionSpaceType);
   cout << "Test getTypeCode" << endl;  
   assert(testFunctionSpace1.getTypeCode()==1);  
   
   // Test getDomain  
   cout << "Test getDomain" << endl;  
66    assert(testFunctionSpace2.getDomain()==nullDomain);    assert(testFunctionSpace2.getDomain()==nullDomain);
   
   // Test getDim  
   cout << "Test getDim" << endl;  
67    assert(testFunctionSpace1.getDim()==1);    assert(testFunctionSpace1.getDim()==1);
   
   // Test == operator  
   cout << "Test == operator" << endl;  
68    assert(testFunctionSpace1==testFunctionSpace1);    assert(testFunctionSpace1==testFunctionSpace1);
69    assert(!(testFunctionSpace1!=testFunctionSpace1));    assert(!(testFunctionSpace1!=testFunctionSpace1));
70    
   // Test = operator  
   cout << "Test = operator" << endl;  
71    testFunctionSpace1=testFunctionSpace2;    testFunctionSpace1=testFunctionSpace2;
72    assert(testFunctionSpace1==testFunctionSpace2);    assert(testFunctionSpace1==testFunctionSpace2);
73    
# Line 86  TestSuite* FunctionSpaceTestCase::suite Line 82  TestSuite* FunctionSpaceTestCase::suite
82    testSuite->addTest (new TestCaller< FunctionSpaceTestCase>("testAll",&FunctionSpaceTestCase::testAll));    testSuite->addTest (new TestCaller< FunctionSpaceTestCase>("testAll",&FunctionSpaceTestCase::testAll));
83    return testSuite;    return testSuite;
84  }  }
   

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

  ViewVC Help
Powered by ViewVC 1.1.26