X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fmware%2Fsprintf_test.c;h=15e1e7b3e9cfbd1faa8bfd2ae65ee28b10ba77ac;hb=b5a70c67c42c8e6f62510c1cafa94cc59bca69a4;hp=390b6c314becd60bd1763ebb24663f736be6a4c4;hpb=226f5aced14a044f9385f0f6e9ec7bbef9aae377;p=bertos.git diff --git a/bertos/mware/sprintf_test.c b/bertos/mware/sprintf_test.c index 390b6c31..15e1e7b3 100644 --- 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; - 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; @@ -94,7 +94,7 @@ int sprintf_testRun(void) /* * Stress tests. */ - snprintf(buf, sizeof buf, "%s", NULL); + snprintf(buf, sizeof buf, "%s", (char *)(NULL)); if (strcmp(buf, "") != 0) return 3; snprintf(buf, sizeof buf, "%k"); @@ -110,11 +110,4 @@ int sprintf_testTearDown(void) return 0; } -#if UNIT_TEST - #include - #include "sprintf.c" - #include "formatwr.c" - #include "hex.c" - TEST_MAIN(sprintf); -#endif /* UNIT_TEST */ - +TEST_MAIN(sprintf);