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

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

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

revision 118 by jgs, Fri Apr 1 05:48:57 2005 UTC revision 119 by jgs, Tue Apr 12 04:45:05 2005 UTC
# Line 77  void DataExpandedTestCase::testAll() { Line 77  void DataExpandedTestCase::testAll() {
77    assert(testData.validSampleNo(testData.getNumSamples()-1));    assert(testData.validSampleNo(testData.getNumSamples()-1));
78    
79    //    //
80      // Test alternative constructor
81      cout << "\tTest DataExpanded alternative constructor." << endl;
82      data[0]=0.0;
83      data[1]=1.0;
84      data[2]=2.0;
85      DataExpanded testData1(FunctionSpace(),shape,data);
86    
87      cout << "\tTest getLength." << endl;
88      assert(testData1.getLength()==pointData.noValues());
89    
90      cout << "\tTest getPointDataView." << endl;
91      for (int i=0;i<testData1.getPointDataView().getShape()[0];i++) {
92          assert(testData1.getPointDataView()(i)==pointData(i));
93      }
94    
95      cout << "\tVerify data point attributes." << endl;
96      dataView=testData1.getPointDataView();
97      assert(dataView.getRank()==shape.size());
98      assert(dataView.noValues()==shape[0]*1);
99      assert(dataView.getShape()[0]==shape[0]);
100      assert(testData.getNumDPPSample()==1);
101      assert(testData.getNumSamples()==1);
102      assert(testData.validSamplePointNo(testData.getNumDPPSample()-1));
103      assert(testData.validSampleNo(testData.getNumSamples()-1));
104    
105      //
106    // Test copy constructor    // Test copy constructor
107    cout << "\tTest DataExpanded copy constructor." << endl;    cout << "\tTest DataExpanded copy constructor." << endl;
108    DataExpanded testData2(testData);    DataExpanded testData2(testData);

Legend:
Removed from v.118  
changed lines
  Added in v.119

  ViewVC Help
Powered by ViewVC 1.1.26