/[escript]/branches/arrayview_from_1695_trunk/escript/test/DataArrayViewTestCase.cpp
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/escript/test/DataArrayViewTestCase.cpp

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

revision 1698 by jfenwick, Tue Aug 12 01:13:16 2008 UTC revision 1714 by jfenwick, Thu Aug 21 00:01:55 2008 UTC
# Line 50  void DataArrayViewTestCase::testResultSl Line 50  void DataArrayViewTestCase::testResultSl
50    
51    region.push_back(DataTypes::RegionType::value_type(1,5));    region.push_back(DataTypes::RegionType::value_type(1,5));
52    resultShape.push_back(4);    resultShape.push_back(4);
53    assert(DataArrayView::getResultSliceShape(region)==resultShape);    assert(DataTypes::getResultSliceShape(region)==resultShape);
54    
55    region.push_back(DataTypes::RegionType::value_type(2,5));    region.push_back(DataTypes::RegionType::value_type(2,5));
56    resultShape.push_back(3);    resultShape.push_back(3);
57    assert(DataArrayView::getResultSliceShape(region)==resultShape);    assert(DataTypes::getResultSliceShape(region)==resultShape);
58    
59    region.push_back(DataTypes::RegionType::value_type(3,9));    region.push_back(DataTypes::RegionType::value_type(3,9));
60    resultShape.push_back(6);    resultShape.push_back(6);
61    assert(DataArrayView::getResultSliceShape(region)==resultShape);    assert(DataTypes::getResultSliceShape(region)==resultShape);
62    
63    region.push_back(DataTypes::RegionType::value_type(1,7));    region.push_back(DataTypes::RegionType::value_type(1,7));
64    resultShape.push_back(6);    resultShape.push_back(6);
65    assert(DataArrayView::getResultSliceShape(region)==resultShape);    assert(DataTypes::getResultSliceShape(region)==resultShape);
66    
67  }  }
68    
# Line 127  void DataArrayViewTestCase::testSlicing( Line 127  void DataArrayViewTestCase::testSlicing(
127      // Define shapes of views.      // Define shapes of views.
128      DataTypes::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
129      sourceShape.push_back(6);      sourceShape.push_back(6);
130      DataTypes::ShapeType targetShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType targetShape = DataTypes::getResultSliceShape(region);
131    
132      // Create source and target views.      // Create source and target views.
133      int len = DataTypes::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
# Line 196  void DataArrayViewTestCase::testSlicing( Line 196  void DataArrayViewTestCase::testSlicing(
196      region.push_back(DataTypes::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
197    
198      // Define shapes of views.      // Define shapes of views.
199      DataTypes::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType sourceShape = DataTypes::getResultSliceShape(region);
200      DataTypes::ShapeType targetShape;      DataTypes::ShapeType targetShape;
201      targetShape.push_back(6);      targetShape.push_back(6);
202    
# Line 268  void DataArrayViewTestCase::testSlicing( Line 268  void DataArrayViewTestCase::testSlicing(
268      DataTypes::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
269      sourceShape.push_back(6);      sourceShape.push_back(6);
270      sourceShape.push_back(3);      sourceShape.push_back(3);
271      DataTypes::ShapeType targetShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType targetShape = DataTypes::getResultSliceShape(region);
272    
273      // Create source and target views.      // Create source and target views.
274      int len = DataTypes::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
# Line 391  void DataArrayViewTestCase::testSlicing( Line 391  void DataArrayViewTestCase::testSlicing(
391      region.push_back(DataTypes::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
392    
393      // Define shapes of views.      // Define shapes of views.
394      DataTypes::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType sourceShape = DataTypes::getResultSliceShape(region);
395      DataTypes::ShapeType targetShape;      DataTypes::ShapeType targetShape;
396      targetShape.push_back(6);      targetShape.push_back(6);
397      targetShape.push_back(3);      targetShape.push_back(3);
# Line 475  void DataArrayViewTestCase::testSlicing( Line 475  void DataArrayViewTestCase::testSlicing(
475      sourceShape.push_back(6);      sourceShape.push_back(6);
476      sourceShape.push_back(3);      sourceShape.push_back(3);
477      sourceShape.push_back(13);      sourceShape.push_back(13);
478      DataTypes::ShapeType targetShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType targetShape = DataTypes::getResultSliceShape(region);
479    
480      // Create source and target views.      // Create source and target views.
481      int len = DataTypes::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
# Line 666  void DataArrayViewTestCase::testSlicing( Line 666  void DataArrayViewTestCase::testSlicing(
666      region.push_back(DataTypes::RegionType::value_type(6,7));      region.push_back(DataTypes::RegionType::value_type(6,7));
667    
668      // Define shapes of views.      // Define shapes of views.
669      DataTypes::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType sourceShape = DataTypes::getResultSliceShape(region);
670      DataTypes::ShapeType targetShape;      DataTypes::ShapeType targetShape;
671      targetShape.push_back(11);      targetShape.push_back(11);
672      targetShape.push_back(8);      targetShape.push_back(8);
# Line 761  void DataArrayViewTestCase::testSlicing( Line 761  void DataArrayViewTestCase::testSlicing(
761      sourceShape.push_back(3);      sourceShape.push_back(3);
762      sourceShape.push_back(13);      sourceShape.push_back(13);
763      sourceShape.push_back(9);      sourceShape.push_back(9);
764      DataTypes::ShapeType targetShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType targetShape = DataTypes::getResultSliceShape(region);
765    
766      // Create source and target views.      // Create source and target views.
767      int len = DataTypes::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
# Line 1032  void DataArrayViewTestCase::testSlicing( Line 1032  void DataArrayViewTestCase::testSlicing(
1032      region.push_back(DataTypes::RegionType::value_type(23,51));      region.push_back(DataTypes::RegionType::value_type(23,51));
1033    
1034      // Define shapes of views.      // Define shapes of views.
1035      DataTypes::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType sourceShape = DataTypes::getResultSliceShape(region);
1036      DataTypes::ShapeType targetShape;      DataTypes::ShapeType targetShape;
1037      targetShape.push_back(50);      targetShape.push_back(50);
1038      targetShape.push_back(65);      targetShape.push_back(65);

Legend:
Removed from v.1698  
changed lines
  Added in v.1714

  ViewVC Help
Powered by ViewVC 1.1.26