/[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 150 by jgs, Thu Sep 15 03:44:45 2005 UTC revision 151 by jgs, Thu Sep 22 01:55:00 2005 UTC
# Line 600  void DataTestCase::testRefValue() { Line 600  void DataTestCase::testRefValue() {
600    
601  }  }
602    
603    void DataTestCase::testMemAlloc() {
604    
605      //
606      // Simple little sanity check for the memory allocator
607    
608      cout << endl;
609    
610      Data *testData;
611      for (int i=0; i<1000; i++) {
612        testData = new Data(0.0, DataArrayView::ShapeType(), FunctionSpace(), true);
613        delete testData;
614      }
615    
616      DataArrayView::ShapeType viewShape;
617      viewShape.push_back(10);
618      viewShape.push_back(10);
619      viewShape.push_back(10);
620    
621      Data *testData2;
622      Data *testData3 = new Data(0.0, viewShape, FunctionSpace(), true);
623      for (int i=0; i<1000; i++) {
624        testData2 = new Data(0.0, viewShape, FunctionSpace(), true);
625        delete testData2;
626      }
627      delete testData3;
628    
629    }
630    
631  TestSuite* DataTestCase::suite ()  TestSuite* DataTestCase::suite ()
632  {  {
633    //    //
# Line 615  TestSuite* DataTestCase::suite () Line 643  TestSuite* DataTestCase::suite ()
643    testSuite->addTest (new TestCaller< DataTestCase>("testSlicing",&DataTestCase::testSlicing));    testSuite->addTest (new TestCaller< DataTestCase>("testSlicing",&DataTestCase::testSlicing));
644    testSuite->addTest (new TestCaller< DataTestCase>("testOperations",&DataTestCase::testOperations));    testSuite->addTest (new TestCaller< DataTestCase>("testOperations",&DataTestCase::testOperations));
645    //testSuite->addTest (new TestCaller< DataTestCase>("testRefValue",&DataTestCase::testRefValue));    //testSuite->addTest (new TestCaller< DataTestCase>("testRefValue",&DataTestCase::testRefValue));
646      testSuite->addTest (new TestCaller< DataTestCase>("testMemAlloc",&DataTestCase::testMemAlloc));
647    
648    return testSuite;    return testSuite;
649  }  }

Legend:
Removed from v.150  
changed lines
  Added in v.151

  ViewVC Help
Powered by ViewVC 1.1.26