/[escript]/trunk/escript/test/DataTagged/DataTaggedTestCase.cpp
ViewVC logotype

Diff of /trunk/escript/test/DataTagged/DataTaggedTestCase.cpp

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

revision 509 by jgs, Fri Feb 10 01:41:55 2006 UTC revision 510 by jgs, Fri Feb 10 04:00:50 2006 UTC
# Line 2350  void DataTaggedTestCase::testAll() { Line 2350  void DataTaggedTestCase::testAll() {
2350      for (int i=0; i<myData.getLength(); i++) {      for (int i=0; i<myData.getLength(); i++) {
2351        assert(sampleData[i]==i);        assert(sampleData[i]==i);
2352      }      }
2353        sampleData=myData.getSampleData(0);
2354        for (int i=0; i<myDataView.noValues(); i++) {
2355          assert(sampleData[i]==i);
2356        }
2357    
2358    }    }
2359    
# Line 2433  void DataTaggedTestCase::testAll() { Line 2437  void DataTaggedTestCase::testAll() {
2437      for (int i=0; i<myData.getLength(); i++) {      for (int i=0; i<myData.getLength(); i++) {
2438        assert(sampleData[i]==i);        assert(sampleData[i]==i);
2439      }      }
2440        sampleData=myData.getSampleDataByTag(0);
2441        for (int i=0; i<myDataView.noValues(); i++) {
2442          assert(sampleData[i]==i);
2443        }
2444    
2445    }    }
2446    
# Line 2511  void DataTaggedTestCase::testAll() { Line 2519  void DataTaggedTestCase::testAll() {
2519      assert(myDataView(2)==3);      assert(myDataView(2)==3);
2520    
2521      // Test non-existent tag returns the default value.      // Test non-existent tag returns the default value.
2522      myDataView = myData.getDataPointByTag(0);      myDataView = myData.getDataPointByTag(9);
2523      assert(myDataView==myView);      assert(myDataView==myView);
2524      assert(!myDataView.isEmpty());      assert(!myDataView.isEmpty());
2525      assert(myDataView.getOffset()==0);      assert(myDataView.getOffset()==0);
# Line 2543  void DataTaggedTestCase::testAll() { Line 2551  void DataTaggedTestCase::testAll() {
2551          assert(sampleData[i]==i-2);          assert(sampleData[i]==i-2);
2552        }        }
2553      }      }
2554        sampleData=myData.getSampleData(0);
2555        for (int i=0; i<myDataView.noValues(); i++) {
2556          assert(sampleData[i]==i+1);
2557        }
2558    
2559    }    }
2560    
# Line 2698  void DataTaggedTestCase::testAll() { Line 2710  void DataTaggedTestCase::testAll() {
2710          assert(sampleData[i]==i-6);          assert(sampleData[i]==i-6);
2711        }        }
2712      }      }
2713        sampleData=myData.getSampleData(0);
2714        for (int i=0; i<myDataView.noValues(); i++) {
2715          assert(sampleData[i]==i+1);
2716        }
2717    
2718    }    }
2719    

Legend:
Removed from v.509  
changed lines
  Added in v.510

  ViewVC Help
Powered by ViewVC 1.1.26