diff options
author | Marco Paland <marco@paland.com> | 2018-06-05 11:25:47 +0200 |
---|---|---|
committer | Marco Paland <marco@paland.com> | 2018-06-05 11:25:47 +0200 |
commit | a50f1a8369c909a835a21d54d3facfb4a628205f (patch) | |
tree | b54abd1b28908f40645ef871e3ad5b436bf6c6f4 /test | |
parent | aa9d7a9a5413a867ff484436edf25a65dbe9c2d0 (diff) | |
download | printf-a50f1a8369c909a835a21d54d3facfb4a628205f.tar.gz printf-a50f1a8369c909a835a21d54d3facfb4a628205f.tar.bz2 printf-a50f1a8369c909a835a21d54d3facfb4a628205f.zip |
test(test_suite): modified fctprintf() test case
Renamed 'user' to 'arg'
Diffstat (limited to 'test')
-rw-r--r-- | test/test_suite.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test_suite.cpp b/test/test_suite.cpp index 4bc773a..8aaf67a 100644 --- a/test/test_suite.cpp +++ b/test/test_suite.cpp @@ -42,11 +42,18 @@ namespace test { // dummy putchar
static char printf_buffer[100];
static size_t printf_idx = 0U;
+
void test::_putchar(char character)
{
printf_buffer[printf_idx++] = character;
}
+void _out_fct(char character, void* arg)
+{
+ (void)arg;
+ printf_buffer[printf_idx++] = character;
+}
+
TEST_CASE("printf", "[]" ) {
@@ -60,7 +67,7 @@ TEST_CASE("printf", "[]" ) { TEST_CASE("fctprintf", "[]" ) {
printf_idx = 0U;
memset(printf_buffer, 0xCC, 100U);
- test::fctprintf(&test::_putchar, "This is a test of %X", 0x12EFU);
+ test::fctprintf(&_out_fct, nullptr, "This is a test of %X", 0x12EFU);
REQUIRE(!strcmp(printf_buffer, "This is a test of 12EF"));
}
|