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

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

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

revision 120 by jgs, Mon Feb 28 07:06:33 2005 UTC revision 121 by jgs, Fri May 6 04:26:16 2005 UTC
# Line 190  void DataTestCase::testMore() { Line 190  void DataTestCase::testMore() {
190    
191    cout << "\tCreate a Data object from a DataArrayView" << endl;    cout << "\tCreate a Data object from a DataArrayView" << endl;
192    
   DataArrayView::ValueType viewData;  
193    DataArrayView::ShapeType viewShape;    DataArrayView::ShapeType viewShape;
194    viewShape.push_back(3);    viewShape.push_back(3);
195      DataArrayView::ValueType viewData(3);
196    for (int i=0;i<viewShape[0];++i) {    for (int i=0;i<viewShape[0];++i) {
197      viewData.push_back(i);      viewData[i]=i;
198    }    }
199    DataArrayView myView(viewData,viewShape);    DataArrayView myView(viewData,viewShape);
200    
# Line 235  void DataTestCase::testAll() { Line 235  void DataTestCase::testAll() {
235    
236    cout << "\tCreate a Data object from a DataArrayView" << endl;    cout << "\tCreate a Data object from a DataArrayView" << endl;
237    
   DataArrayView::ValueType viewData;  
238    DataArrayView::ShapeType viewShape;    DataArrayView::ShapeType viewShape;
239    viewShape.push_back(3);    viewShape.push_back(3);
240      DataArrayView::ValueType viewData(3);
241    for (int i=0;i<viewShape[0];++i) {    for (int i=0;i<viewShape[0];++i) {
242      viewData.push_back(i);      viewData[i]=i;
243    }    }
244    DataArrayView myView(viewData,viewShape);    DataArrayView myView(viewData,viewShape);
245    
# Line 264  void DataTestCase::testDataConstant() { Line 264  void DataTestCase::testDataConstant() {
264    
265    cout << "\tCreate a DataConstant object from a DataArrayView" << endl;    cout << "\tCreate a DataConstant object from a DataArrayView" << endl;
266    
   DataArrayView::ValueType viewData;  
267    DataArrayView::ShapeType viewShape;    DataArrayView::ShapeType viewShape;
268    viewShape.push_back(2);    viewShape.push_back(2);
269    viewShape.push_back(3);    viewShape.push_back(3);
270    viewShape.push_back(4);    viewShape.push_back(4);
271      DataArrayView::ValueType viewData(2*3*4);
272    for (int i=0;i<DataArrayView::noValues(viewShape);++i) {    for (int i=0;i<DataArrayView::noValues(viewShape);++i) {
273      viewData.push_back(i);      viewData[i]=i;
274    }    }
275    DataArrayView myView(viewData,viewShape);    DataArrayView myView(viewData,viewShape);
276    
# Line 333  void DataTestCase::testDataTagged() { Line 333  void DataTestCase::testDataTagged() {
333    
334    DataTagged::TagListType keys;    DataTagged::TagListType keys;
335    DataTagged::ValueListType values;    DataTagged::ValueListType values;
   DataArrayView::ValueType viewData;  
336    DataArrayView::ShapeType viewShape;    DataArrayView::ShapeType viewShape;
337    viewShape.push_back(3);    viewShape.push_back(3);
338      DataArrayView::ValueType viewData(3);
339    for (int i=0;i<viewShape[0];++i) {    for (int i=0;i<viewShape[0];++i) {
340      viewData.push_back(i);      viewData[i]=i;
341    }    }
342    DataArrayView myView(viewData,viewShape);    DataArrayView myView(viewData,viewShape);
343    
# Line 503  void DataTestCase::testRefValue() { Line 503  void DataTestCase::testRefValue() {
503    cout << "\tTest Data object RefValue methods." << endl;    cout << "\tTest Data object RefValue methods." << endl;
504    
505    // Create three Data object - DataExpanded, DataConstant and DataEmpty    // Create three Data object - DataExpanded, DataConstant and DataEmpty
   DataArrayView::ValueType viewData;  
506    DataArrayView::ShapeType viewShape;    DataArrayView::ShapeType viewShape;
507    viewShape.push_back(3);    viewShape.push_back(3);
508      DataArrayView::ValueType viewData(3);
509    for (int i=0;i<viewShape[0];++i) {    for (int i=0;i<viewShape[0];++i) {
510      viewData.push_back(i);      viewData[i]=i;
511    }    }
512    DataArrayView myView(viewData,viewShape);    DataArrayView myView(viewData,viewShape);
513    

Legend:
Removed from v.120  
changed lines
  Added in v.121

  ViewVC Help
Powered by ViewVC 1.1.26