/[escript]/branches/arrexp_2137_win_merge/escript/test/SharedDataTestCase.cpp
ViewVC logotype

Diff of /branches/arrexp_2137_win_merge/escript/test/SharedDataTestCase.cpp

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

revision 2221 by jfenwick, Wed Jan 14 00:23:39 2009 UTC revision 2222 by jfenwick, Tue Jan 20 04:52:39 2009 UTC
# Line 120  void SharedDataTestCase::testGetSampleRW Line 120  void SharedDataTestCase::testGetSampleRW
120    Data d((double)42,DataTypes::scalarShape);    Data d((double)42,DataTypes::scalarShape);
121    Data L=d.delay();    Data L=d.delay();
122    // now change the data directly    // now change the data directly
123      try
124      {
125        *d.getSampleDataRW(0)=17;
126        assert(false);          // should have thrown
127      } catch (DataException e)
128      {
129      }
130      // Now try again properly
131      d.requireWrite();
132    *d.getSampleDataRW(0)=17;    *d.getSampleDataRW(0)=17;
133    L.resolve();    L.resolve();
134    assert(*L.getSampleDataRO(0)==42);    assert(*L.getSampleDataRO(0)==42);

Legend:
Removed from v.2221  
changed lines
  Added in v.2222

  ViewVC Help
Powered by ViewVC 1.1.26