/[escript]/trunk/escript/test/DataAlgorithmAdapter/DataAlgorithmAdapterTestCase.cpp
ViewVC logotype

Diff of /trunk/escript/test/DataAlgorithmAdapter/DataAlgorithmAdapterTestCase.cpp

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

revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC revision 100 by jgs, Wed Dec 15 03:48:48 2004 UTC
# Line 1  Line 1 
 // $Id$  
1  /*  /*
2   *****************************************************************************   *****************************************************************************
3   *                                                                           *   *                                                                           *
# Line 37  void DataAlgorithmAdapterTestCase::tearD Line 36  void DataAlgorithmAdapterTestCase::tearD
36  }  }
37    
38  void DataAlgorithmAdapterTestCase::testAll() {  void DataAlgorithmAdapterTestCase::testAll() {
   
39    cout << endl;    cout << endl;
   
   cout << "\tTesting FMax." << endl;  
40    DataAlgorithmAdapter<FMax> myMax(numeric_limits<double>::min());    DataAlgorithmAdapter<FMax> myMax(numeric_limits<double>::min());
41    myMax(1);    myMax(1);
42    myMax(2);    myMax(2);
   myMax(14);  
43    myMax(3);    myMax(3);
44    assert(myMax.getResult()==14);    assert(myMax.getResult()==3);
45      DataAlgorithmAdapter<AbsMax> Lsup(numeric_limits<double>::min());
   cout << "\tTesting AbsMax." << endl;  
   DataAlgorithmAdapter<AbsMax> Lsup(0);  
46    Lsup(-2);    Lsup(-2);
47    Lsup(2);    Lsup(2);
48    Lsup(5);    Lsup(5);
49    Lsup(-10);    Lsup(-1000);
50    assert(Lsup.getResult()==10);    assert(Lsup.getResult()==1000);
   
   cout << "\tTesting FMin." << endl;  
51    DataAlgorithmAdapter<FMin> inf(numeric_limits<double>::max());    DataAlgorithmAdapter<FMin> inf(numeric_limits<double>::max());
52    inf(1);    inf(1);
   inf(12);  
53    inf(2);    inf(2);
54    inf(99);    assert(inf.getResult() == 1);
55    assert(inf.getResult()==1);    cout << "Size: " << sizeof(DataAlgorithmAdapter<FMin>) << endl;
   
   cout << "\tSize: " << sizeof(DataAlgorithmAdapter<FMin>) << endl;  
   
56  }  }
57    
58  TestSuite* DataAlgorithmAdapterTestCase::suite ()  TestSuite* DataAlgorithmAdapterTestCase::suite ()

Legend:
Removed from v.97  
changed lines
  Added in v.100

  ViewVC Help
Powered by ViewVC 1.1.26