Changeset 50 for trunk/IPs/systemC/processor/Morpheo/Common/include
- Timestamp:
- Aug 17, 2007, 6:00:56 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h
r44 r50 26 26 }; 27 27 28 void test_ko (char * file, uint32_t line) 29 { 30 string msg = ("<"+toString(num_test)+"> : Test KO\n" + 31 " * Localisation\n" + 32 " - File : "+file+"\n" + 33 " - Line : "+toString(line)+"\n"); 34 35 throw (ErrorMorpheo (msg)); 36 }; 37 28 38 void test_ok () 29 39 { … … 42 52 }; 43 53 44 #define TEST(type,exp1,exp2) do { test<type> (exp1,exp2,__FILE__,__LINE__);} while(0) 45 #define TEST_STR(type,exp1,exp2,str...) do { fprintf(stdout,str); test<type> (exp1,exp2,__FILE__,__LINE__);} while(0) 54 #define TEST(type,exp1,exp2) do {test<type> (exp1,exp2,__FILE__,__LINE__);} while(0) 55 #define TEST_STR(type,exp1,exp2,str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); test<type> (exp1,exp2,__FILE__,__LINE__);} while(0) 56 #define TEST_OK(str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); test_ok();} while(0) 57 #define TEST_KO(str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); test_ko(__FILE__,__LINE__);} while(0) 58 46 59 47 60 #endif
Note: See TracChangeset
for help on using the changeset viewer.