Mark these test module with warning.
[bertos.git] / bertos / mware / sprintf_test.c
index 1bcedfd35175f289618f6494422d83f27d0019b4..3534953afe8f07ca2303637b0fd1262e45260abe 100644 (file)
  * \author Bernardo Innocenti <bernie@develer.com>
  */
 
-#include "sprintf.c"
-#include "formatwr.c"
-#include "hex.c"
+
 #include <cfg/compiler.h>
+#include <cfg/test.h>
+#include <cfg/debug.h>
+
 #include <mware/pgm.h>
+
 #include <stdio.h>
 
-#include <assert.h> /* assert() */
 #include <string.h> /* strcmp() */
 
+#warning FIXME:Review and refactor this test..
 
-int main(UNUSED_ARG(int, argc), UNUSED_ARG(char **,argv))
+#ifdef _TEST
+#include "sprintf.c"
+#include "formatwr.c"
+#include "hex.c"
+
+int main(void)
 {
        char buf[256];
        static const char test_string[] = "Hello, world!\n";
@@ -80,7 +87,6 @@ int main(UNUSED_ARG(int, argc), UNUSED_ARG(char **,argv))
        TEST("%-8.2f", -123.456,    "-123.46 ");
        TEST("%8.0f",  -123.456,    "    -123");
 
-#undef TEST
 
        /*
         * Stress tests.
@@ -94,3 +100,5 @@ int main(UNUSED_ARG(int, argc), UNUSED_ARG(char **,argv))
        return 0;
 }
 
+#endif /* _TEST */
+