/[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 122 by jgs, Fri May 6 04:26:16 2005 UTC revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC
# Line 151  void DataTestCase::testSlicing() { Line 151  void DataTestCase::testSlicing() {
151      DataArrayView::ShapeType viewShape;      DataArrayView::ShapeType viewShape;
152      Data source(10.0,viewShape,FunctionSpace(),true);      Data source(10.0,viewShape,FunctionSpace(),true);
153      //      //
154      // weak tests for setting a slice of DataConstant      // weak tests for setting a slice of DataExpanded
155      viewShape.push_back(2);      viewShape.push_back(2);
156      viewShape.push_back(3);      viewShape.push_back(3);
157      Data target(1.3,viewShape,FunctionSpace(),true);      Data target(1.3,viewShape,FunctionSpace(),true);
# Line 221  void DataTestCase::testMore() { Line 221  void DataTestCase::testMore() {
221    
222    cout << "\tExercise wherePositive method" << endl;    cout << "\tExercise wherePositive method" << endl;
223    assert(!exData.wherePositive().isEmpty());    assert(!exData.wherePositive().isEmpty());
   //assert(exData.wherePositive()==exData.wherePositive());  
224    
225    cout << "\tExercise copyWithMask method" << endl;    cout << "\tExercise copyWithMask method" << endl;
226    exData.copyWithMask(result, exData.wherePositive());    exData.copyWithMask(result, exData.wherePositive());
# Line 248  void DataTestCase::testAll() { Line 247  void DataTestCase::testAll() {
247    Data exData(myView,FunctionSpace(),expanded);    Data exData(myView,FunctionSpace(),expanded);
248    Data cData(myView);    Data cData(myView);
249    Data result;    Data result;
250    
251    assert(exData.isExpanded());    assert(exData.isExpanded());
252    assert(cData.isConstant());    assert(cData.isConstant());
253    assert(result.isEmpty());    assert(result.isEmpty());
# Line 302  void DataTestCase::testDataTaggedExcepti Line 302  void DataTestCase::testDataTaggedExcepti
302    cout << endl;    cout << endl;
303    
304    cout << "\tTest DataTagged operations exceptions." << endl;    cout << "\tTest DataTagged operations exceptions." << endl;
305    
306    Data myData;    Data myData;
307    DataArrayView myView;    DataArrayView myView;
308    
309    try {    try {
310        myData.getSampleDataByTag(0);;        myData.getSampleDataByTag(0);;
311        assert(false);        assert(false);
# Line 312  void DataTestCase::testDataTaggedExcepti Line 314  void DataTestCase::testDataTaggedExcepti
314        //cout << e.what() << endl;        //cout << e.what() << endl;
315        assert(true);        assert(true);
316    }    }
317    
318    /*    /*
319    try {    try {
320        myData.setTaggedValue(0,myView);;        myData.setTaggedValue(0,myView);;
# Line 369  void DataTestCase::testConstructors() { Line 372  void DataTestCase::testConstructors() {
372      viewShape.push_back(2);      viewShape.push_back(2);
373      viewShape.push_back(3);      viewShape.push_back(3);
374      Data temp(1.3,viewShape,FunctionSpace(),false);      Data temp(1.3,viewShape,FunctionSpace(),false);
     cout << "\tDump it toString:" << endl;  
     cout << temp.toString() << endl;  
375    }    }
376  }  }
377    

Legend:
Removed from v.122  
changed lines
  Added in v.123

  ViewVC Help
Powered by ViewVC 1.1.26