From b1ce9341303078d7f7449bc6c4ed72639851f877 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 19 Jul 2024 14:30:15 -0400 Subject: [PATCH] [printf] Test empty format string, and empty arg string Issue: #1058 --- test_conformance/printf/util_printf.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test_conformance/printf/util_printf.cpp b/test_conformance/printf/util_printf.cpp index 74be6af86d..292d95b303 100644 --- a/test_conformance/printf/util_printf.cpp +++ b/test_conformance/printf/util_printf.cpp @@ -714,6 +714,12 @@ testCase testCaseChar = { std::vector printStringGenParameters = { + // empty format + { {""}, "\"foo\"" }, + + // empty argument + { {"%s"}, "\"\"" }, + //(Minimum)Four-wide,zero-filled,default(right)-justified { { "%4s" }, "\"foo\"" }, @@ -766,6 +772,10 @@ std::vector printStringGenParameters = { std::vector correctBufferString = { + "", + + "", + " foo", "f",