diff options
Diffstat (limited to 'test/test_suite.cpp')
-rw-r--r-- | test/test_suite.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test_suite.cpp b/test/test_suite.cpp index 9a02b1e..c5614b0 100644 --- a/test/test_suite.cpp +++ b/test/test_suite.cpp @@ -50,8 +50,6 @@ void test::_putchar(char character) TEST_CASE("printf", "[]" ) {
- char buffer[100];
-
printf_idx = 0U;
memset(printf_buffer, 0xCC, 100U);
REQUIRE(test::printf("% d", 4232) == 5);
@@ -59,6 +57,14 @@ TEST_CASE("printf", "[]" ) { }
+TEST_CASE("oprintf", "[]" ) {
+ printf_idx = 0U;
+ memset(printf_buffer, 0xCC, 100U);
+ test::oprintf(&test::_putchar, "This is a test of %X", 0x12EFU);
+ REQUIRE(!strcmp(printf_buffer, "This is a test of 12EF"));
+}
+
+
TEST_CASE("snprintf", "[]" ) {
char buffer[100];
|