From 0be82dce5e9e3df3010152e031d472df380a38fc Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 23 Jul 2024 15:11:34 -0400 Subject: [PATCH] [printf] Test empty format string, and empty arg string (#2018) 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 74be6af86..292d95b30 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",