Changeset 3 for trunk/IPs/systemC/processor/Morpheo/Include
- Timestamp:
- Mar 6, 2007, 3:34:04 PM (18 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Include/Debug.h
r2 r3 43 43 fprintf(stdout,"In file %s, ",__FILE__); \ 44 44 fprintf(stdout,"at line %d, ",__LINE__); \ 45 fprintf(stdout,"in function \"%s\" : ",func); \45 fprintf(stdout,"in function \"%s\" : ",func); \ 46 46 fprintf(stdout,str); \ 47 47 fprintf(stdout,"\n"); \ -
trunk/IPs/systemC/processor/Morpheo/Include/ErrorMorpheo.h
r2 r3 29 29 }; 30 30 31 class TestMorpheo : public exception 32 { 33 // -----[ fields ]---------------------------------------------------- 34 private : string _msg; 35 36 // -----[ methods ]--------------------------------------------------- 37 public : TestMorpheo () throw() { _msg = "Test error ...";} 38 public : TestMorpheo (string msg) throw() { _msg = msg;} 39 public : ~TestMorpheo (void) throw() {} 40 public : const char* what () const throw() { return ( _msg.c_str() );} 41 }; 42 31 43 }; // end namespace morpheo 32 44 -
trunk/IPs/systemC/processor/Morpheo/Include/Test.h
r2 r3 5 5 #include <sstream> 6 6 #include <stdint.h> 7 #include "Include/ErrorMorpheo.h" 7 8 using namespace std; 8 9 … … 14 15 void test_ko (T exp1, T exp2, char * file, uint32_t line) 15 16 { 16 cout << "{" << num_test << "} : Test KO" << endl17 << " * Localisation" << endl 18 << " - File : " << file << endl 19 << " - Line : " << line << endl 20 << " * Expression is different " << endl 21 << " - exp1 : " << exp1 << endl 22 << " - exp2 : " << exp2 << endl;23 24 exit (line);17 string msg = ("{"+toString(num_test)+"} : Test KO\n" + 18 " * Localisation\n" + 19 " - File : "+file+"\n" + 20 " - Line : "+toString(line)+"\n" + 21 " * Expression is different\n" + 22 " - exp1 : "+toString(exp1)+"\n" + 23 " - exp2 : "+toString(exp2)+"\n"); 24 25 throw (ErrorMorpheo (msg)); 25 26 }; 26 27
Note: See TracChangeset
for help on using the changeset viewer.