projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
timer_delayTicks(): Re-enable check for interrupts to be enabled wheen sleeping.
[bertos.git]
/
bertos
/
mware
/
sprintf_test.c
diff --git
a/bertos/mware/sprintf_test.c
b/bertos/mware/sprintf_test.c
index 1bcedfd35175f289618f6494422d83f27d0019b4..428c779ad385a71b97f9546b60432d3ab89da6b0 100644
(file)
--- a/
bertos/mware/sprintf_test.c
+++ b/
bertos/mware/sprintf_test.c
@@
-33,21
+33,28
@@
* \brief sprintf() implementation based on _formatted_write()
*
* \version $Id$
* \brief sprintf() implementation based on _formatted_write()
*
* \version $Id$
- * \author Bern
ardo Innocenti <bernie@develer.com
>
+ * \author Bern
ie Innocenti <bernie@codewiz.org
>
*/
*/
-#include "sprintf.c"
-#include "formatwr.c"
-#include "hex.c"
+
#include <cfg/compiler.h>
#include <cfg/compiler.h>
+#include <cfg/test.h>
+#include <cfg/debug.h>
+
#include <mware/pgm.h>
#include <mware/pgm.h>
+
#include <stdio.h>
#include <stdio.h>
-#include <assert.h> /* assert() */
#include <string.h> /* strcmp() */
#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";
{
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");
TEST("%-8.2f", -123.456, "-123.46 ");
TEST("%8.0f", -123.456, " -123");
-#undef TEST
/*
* Stress tests.
/*
* Stress tests.
@@
-94,3
+100,5
@@
int main(UNUSED_ARG(int, argc), UNUSED_ARG(char **,argv))
return 0;
}
return 0;
}
+#endif /* _TEST */
+