* \brief sprintf() implementation based on _formatted_write()
*
* \version $Id$
- * \author Bernardo Innocenti <bernie@develer.com>
+ * \author Bernie Innocenti <bernie@codewiz.org>
*/
-#include "sprintf.c"
-#include "formatwr.c"
-#include "hex.c"
+
#include <cfg/compiler.h>
-#include <mware/pgm.h>
+#include <cfg/test.h>
+#include <cfg/debug.h>
+
+#include <cpu/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";
TEST("%-8.2f", -123.456, "-123.46 ");
TEST("%8.0f", -123.456, " -123");
-#undef TEST
/*
* Stress tests.
return 0;
}
+#endif /* _TEST */
+