Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h	(revision 113)
@@ -16,5 +16,5 @@
 #include "Common/include/ErrorMorpheo.h"
 #include "Common/include/ToString.h"
-
+#include "Common/include/Systemc.h"
 namespace morpheo {
 
@@ -26,5 +26,5 @@
 inline void test_ko_error (void)
 {
-  std::string msg = "Test ko : error in test \""+morpheo::toString(num_test)+"\"";
+  std::string msg = morpheo::toString(_("Test ko : error in test \"%d\""),num_test);
   throw (morpheo::ErrorMorpheo (msg));
 }
@@ -33,15 +33,11 @@
 inline void test_ko (char * file, uint32_t line, T exp1, T exp2)
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  std::cerr << "[" << num_test << "] : " << STR_KO
-       << "\tline " << line                      << std::endl
-       << " * Localisation"                      << std::endl
-       << "   - File : " << file                 << std::endl
-       << "   - Line : " << line                 << std::endl
-       << " * Expression is different"           << std::endl
-       << "   - exp1 : "+morpheo::toString(exp1) << std::endl
-       << "   - exp2 : "+morpheo::toString(exp2) << std::endl;
+  msgError(_("[%d] : %s\n"),num_test,STR_KO);
+  msgError(_(" * Localisation\n"));
+  msgError(_("   - File  : %s\n"),file);
+  msgError(_("   - Line  : %d\n"),line);
+  msgError(_(" * Expression is different\n"));
+  msgError(_("   - exp1  : %s\n"),morpheo::toString(exp1).c_str());
+  msgError(_("   - exp2  : %s\n"),morpheo::toString(exp2).c_str());
 
   test_ko_error ();
@@ -50,12 +46,8 @@
 inline void test_ko (char * file, uint32_t line)
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  std::cerr << "[" << num_test << "] : " << STR_KO
-       << "\tline " << line                           << std::endl
-       << " * Localisation"                           << std::endl
-       << "   - File : " << file                      << std::endl
-       << "   - Line : " << line                      << std::endl;
+  msgError(_("[%d] : %s\n"),num_test,STR_KO);
+  msgError(_(" * Localisation\n"));
+  msgError(_("   - File  : %s\n"),file);
+  msgError(_("   - Line  : %d\n"),line);
   
   test_ko_error ();
@@ -64,8 +56,5 @@
 inline void test_ok ()
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  msg (_("[%d] : %s\n"), num_test,STR_OK);
+  msgInformation (_("[%d] : %s\n"), num_test,STR_OK);
 
   num_test ++;
@@ -74,9 +63,6 @@
 inline void test_ok (char * file, uint32_t line)
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  msg (_("[%d] : %s\n"), num_test,STR_OK);
-  msg (_("\tline %d\n"), line);
+  msgInformation (_("[%d] : %s (line %d)\n"), num_test,STR_OK,line);
+  msgInformation (_("   - Line  : %d\n"), line);
 
   num_test ++;
@@ -86,10 +72,7 @@
 inline void test_ok (char * file, uint32_t line, T exp)
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  msg (_("[%d] : %s\n"), num_test, STR_OK);
-  msg (_("\tline %d\n"), line);
-  msg (_("\tvalue %s\n"), (morpheo::toString(exp)).c_str());
+  msgInformation (_("[%d] : %s\n"), num_test, STR_OK);
+  msgInformation (_("   - Line  : %d\n"), line);
+  msgInformation (_("   - Value : %s\n"), (morpheo::toString(exp)).c_str());
 
   num_test ++;
@@ -112,8 +95,7 @@
 #define LABEL(str...)							\
   {									\
-    msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));	\
-    msg (str);								\
-    msg (_("\n"));							\
-    fflush (stdout);                                                    \
+    msgInformation (_("{%.0f} "),simulation_cycle());                \
+    msg            (str);                                               \
+    msg            (_("\n"));                                           \
   } while(0)
 
@@ -122,13 +104,13 @@
 #endif
 
-#define SC_START(cycle_offset)						\
+#define SC_CYCLE(cycle_offset)						\
   do									\
     {									\
-      /*cout << "SC_START (begin)" << endl;*/				\
+      /*cout << "SC_CYCLE (begin)" << endl;*/				\
       									\
-      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
+      double cycle_current = simulation_cycle();                        \
       if (cycle_offset != 0)						\
 	{								\
-	  cout << "##########[ cycle "<< cycle_current+cycle_offset << " ] (" << __LINE__ << ")" << endl; \
+	  msgInformation(_("##########[ cycle %.0f ] (%d)\n"),cycle_current+cycle_offset,__LINE__); \
 	}								\
       									\
@@ -138,10 +120,13 @@
 	}								\
       									\
-      sc_start(cycle_offset);						\
+      simulation_run(cycle_offset);                                     \
       									\
-      /*cout << "SC_START (end  )" << endl;*/				\
+      /*cout << "SC_CYCLE (end  )" << endl;*/				\
     } while(0)
 
-
+// old support
+#ifndef MTI_SYSTEMC
+# define SC_START(x) SC_CYCLE(x)
+#endif
 
 };
