projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use macros to generate a multiple test code for semaphore.
[bertos.git]
/
bertos
/
mware
/
sprintf_test.c
diff --git
a/bertos/mware/sprintf_test.c
b/bertos/mware/sprintf_test.c
index 390b6c314becd60bd1763ebb24663f736be6a4c4..6aaeef91c34c0225e0ae95832127a0454f15729b 100644
(file)
--- a/
bertos/mware/sprintf_test.c
+++ b/
bertos/mware/sprintf_test.c
@@
-64,7
+64,7
@@
int sprintf_testRun(void)
if (strcmp(buf, test_string) != 0)
return 1;
if (strcmp(buf, test_string) != 0)
return 1;
- snprintf(buf, sizeof buf, "%S", test_string_pgm);
+ snprintf(buf, sizeof buf, "%S",
(wchar_t *)
test_string_pgm);
if (strcmp(buf, test_string_pgm) != 0)
return 2;
if (strcmp(buf, test_string_pgm) != 0)
return 2;
@@
-94,7
+94,7
@@
int sprintf_testRun(void)
/*
* Stress tests.
*/
/*
* Stress tests.
*/
- snprintf(buf, sizeof buf, "%s",
NULL
);
+ snprintf(buf, sizeof buf, "%s",
(char *)(NULL)
);
if (strcmp(buf, "<NULL>") != 0)
return 3;
snprintf(buf, sizeof buf, "%k");
if (strcmp(buf, "<NULL>") != 0)
return 3;
snprintf(buf, sizeof buf, "%k");
@@
-111,10
+111,6
@@
int sprintf_testTearDown(void)
}
#if UNIT_TEST
}
#if UNIT_TEST
- #include <drv/kdebug.c>
- #include "sprintf.c"
- #include "formatwr.c"
- #include "hex.c"
TEST_MAIN(sprintf);
#endif /* UNIT_TEST */
TEST_MAIN(sprintf);
#endif /* UNIT_TEST */