Show
Ignore:
Timestamp:
07/31/09 08:38:18 (15 years ago)
Author:
vbarta
Message:

custom test location for harness tests (extended UnitTest?++), configurable tolerance - all tests pass (most of the time)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/egiw_test.cpp

    r440 r456  
    1111const double epsilon = 0.00001; 
    1212 
    13 namespace UnitTest 
    14 { 
    15  
    16 inline void CheckClose(TestResults &results, const itpp::vec &expected, 
    17                        const itpp::vec &actual, double tolerance, 
    18                        TestDetails const &details) { 
    19     if (!AreClose(expected, actual, tolerance)) {  
    20         MemoryOutStream stream; 
    21         stream << "Expected " << expected << " +/- " << tolerance << " but was " << actual; 
    22  
    23         results.OnTestFailure(details, stream.GetText()); 
    24     } 
    25 } 
    26  
    27 } 
    28  
    2913using namespace bdm; 
    3014 
     
    3822 
    3923TEST(test_egiw) { 
    40     RV::clear_all(); 
    41     UIFile in("egiw.cfg"); 
    42     Array<epdf_harness *> input; 
    43     UI::get(input, in, "data"); 
    44     int sz = input.size(); 
    45     CHECK(sz > 0); 
    46     for (int i = 0; i < sz; ++i) { 
    47         input(i)->test(); 
    48     } 
     24    epdf_harness::test_config("egiw.cfg"); 
    4925} 
    5026