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

fixed tests for new UI::get & UI::build

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/mpdf_harness.cpp

    r477 r480  
    1818        UIFile in ( config_file_name ); 
    1919        Array<mpdf_harness *> input; 
    20         UI::get ( input, in, "data" ); 
     20        UI::get ( input, in, "data", UI::compulsory ); 
    2121        int sz = input.size(); 
    2222        CHECK ( sz > 0 ); 
     
    3131        UI::get ( mean, set, "mean", UI::compulsory ); 
    3232 
    33  
    34         UI::get ( nsamples, set, "nsamples" ); 
    35         UI::get ( R, set, "R" ); 
    36         UI::get ( tolerance, set, "tolerance" ); 
     33        UI::get ( nsamples, set, "nsamples", UI::optional ); 
     34        UI::get ( R, set, "R", UI::optional ); 
     35        UI::get ( tolerance, set, "tolerance", UI::optional ); 
    3736} 
    3837 
     
    4544        mat er = ( smp * smp.T() ) / n - outer_product ( emu, emu ); 
    4645        CHECK_CLOSE_EX ( mean, emu, tolerance ); 
    47         CHECK_CLOSE_EX ( R, er, tolerance ); 
     46 
     47        if ( R.rows() > 0 ) { 
     48                CHECK_CLOSE_EX ( R, er, tolerance ); 
     49        } 
    4850} 
    4951