Ignore:
Timestamp:
Jan 31, 2008, 6:46:41 PM (16 years ago)
Author:
rosiere
Message:

Update all component (except front_end) to :

  • new statistics model
  • no namespace std
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h

    r71 r75  
    99#include "Common/include/ToString.h"
    1010
     11namespace morpheo {
     12
    1113//-----[ Routine de test ]---------------------------------------
    1214
     
    1517inline void test_ko_error (void)
    1618{
    17   string msg = "Test ko : error in test \""+morpheo::toString(num_test)+"\"";
     19  std::string msg = "Test ko : error in test \""+morpheo::toString(num_test)+"\"";
    1820  throw (morpheo::ErrorMorpheo (msg));
    1921}
     
    2224inline void test_ko (char * file, uint32_t line, T exp1, T exp2)
    2325{
    24   cerr << "[" << num_test << "] : Test KO"
    25        << "\tline " << line                           << endl
    26        << " * Localisation"                           << endl
    27        << "   - File : " << file                      << endl
    28        << "   - Line : " << line                      << endl
    29        << " * Expression is different"                << endl
    30        << "   - exp1 : "+morpheo::toString(exp1)               << endl
    31        << "   - exp2 : "+morpheo::toString(exp2)               << endl;
     26  std::cerr << "[" << num_test << "] : Test KO"
     27       << "\tline " << line                           << std::endl
     28       << " * Localisation"                           << std::endl
     29       << "   - File : " << file                      << std::endl
     30       << "   - Line : " << line                      << std::endl
     31       << " * Expression is different"                << std::endl
     32       << "   - exp1 : "+morpheo::toString(exp1)               << std::endl
     33       << "   - exp2 : "+morpheo::toString(exp2)               << std::endl;
    3234
    3335  test_ko_error ();
     
    3638inline void test_ko (char * file, uint32_t line)
    3739{
    38   cerr << "[" << num_test << "] : Test KO"
    39        << "\tline " << line                           << endl
    40        << " * Localisation"                           << endl
    41        << "   - File : " << file                      << endl
    42        << "   - Line : " << line                      << endl;
     40  std::cerr << "[" << num_test << "] : Test KO"
     41       << "\tline " << line                           << std::endl
     42       << " * Localisation"                           << std::endl
     43       << "   - File : " << file                      << std::endl
     44       << "   - Line : " << line                      << std::endl;
    4345 
    4446  test_ko_error ();
     
    7981};
    8082
    81 #define TEST(type,exp1,exp2)            do {test<type> (__FILE__,__LINE__,exp1,exp2);} while(0)
    82 #define TEST_STR(type,exp1,exp2,str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); test<type> (__FILE__,__LINE__,exp1,exp2);} while(0)
    83 #define TEST_OK(str...)                 do {fprintf(stdout,str); fprintf(stdout,"\n"); test_ok(__FILE__,__LINE__);} while(0)
    84 #define TEST_KO(str...)                 do {fprintf(stdout,str); fprintf(stdout,"\n"); test_ko(__FILE__,__LINE__);} while(0)
     83#define TEST(type,exp1,exp2)            do {morpheo::test<type> (__FILE__,__LINE__,exp1,exp2);} while(0)
     84#define TEST_STR(type,exp1,exp2,str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); morpheo::test<type> (__FILE__,__LINE__,exp1,exp2);} while(0)
     85#define TEST_OK(str...)                 do {fprintf(stdout,str); fprintf(stdout,"\n"); morpheo::test_ok(__FILE__,__LINE__);} while(0)
     86#define TEST_KO(str...)                 do {fprintf(stdout,str); fprintf(stdout,"\n"); morpheo::test_ko(__FILE__,__LINE__);} while(0)
    8587
    8688
     89};
    8790#endif
Note: See TracChangeset for help on using the changeset viewer.