Show
Ignore:
Timestamp:
08/05/09 14:40:03 (15 years ago)
Author:
mido
Message:

panove, vite, jak jsem peclivej na upravu kodu.. snad se vam bude libit:) konfigurace je v souboru /system/astylerc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/loggers_test.cpp

    r470 r477  
    1010using namespace bdm; 
    1111 
    12 TEST(test_dirfilelog) 
    13 { 
    14     RV th = RV("{alog blog }"); 
    15     RV r = RV("{r }", "2"); 
     12TEST ( test_dirfilelog ) { 
     13        RV th = RV ( "{alog blog }" ); 
     14        RV r = RV ( "{r }", "2" ); 
    1615 
    17     string ls("exp"); 
    18     remove_all(ls.c_str()); 
    19     makedir(ls, false); 
    20     remove_all("exp/dirfile"); 
     16        string ls ( "exp" ); 
     17        remove_all ( ls.c_str() ); 
     18        makedir ( ls, false ); 
     19        remove_all ( "exp/dirfile" ); 
    2120 
    22     dirfilelog L("exp/dirfile", 10); 
     21        dirfilelog L ( "exp/dirfile", 10 ); 
    2322 
    24     int rid; 
    25     int thid; 
     23        int rid; 
     24        int thid; 
    2625 
    27     rid = L.add(r, ""); 
    28     thid = L.add(th, "th"); 
     26        rid = L.add ( r, "" ); 
     27        thid = L.add ( th, "th" ); 
    2928 
    30     L.init(); 
     29        L.init(); 
    3130 
    32     for (int i = 0; i < 150; i++) { 
    33             L.logit(rid, vec_2((double)i, (double)(i + 1))); 
    34             L.logit(thid, vec_2((double)(100 - i), (double)(i - 50))); 
    35             L.step(); 
    36     } 
     31        for ( int i = 0; i < 150; i++ ) { 
     32                L.logit ( rid, vec_2 ( ( double ) i, ( double ) ( i + 1 ) ) ); 
     33                L.logit ( thid, vec_2 ( ( double ) ( 100 - i ), ( double ) ( i - 50 ) ) ); 
     34                L.step(); 
     35        } 
    3736 
    38     L.finalize(); 
     37        L.finalize(); 
    3938 
    40     std::string expected(load_test_file("dirfile-format.matrix")); 
    41     std::string actual(load_test_file("exp/dirfile/format")); 
    42     CHECK_EQUAL(expected, actual); 
     39        std::string expected ( load_test_file ( "dirfile-format.matrix" ) ); 
     40        std::string actual ( load_test_file ( "exp/dirfile/format" ) ); 
     41        CHECK_EQUAL ( expected, actual ); 
    4342}