Skip to content

Commit

Permalink
[printf] Test empty format string, and empty arg string (#2018)
Browse files Browse the repository at this point in the history
Issue: #1058
  • Loading branch information
dneto0 committed Jul 23, 2024
1 parent 5b5e43e commit 0be82dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test_conformance/printf/util_printf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,12 @@ testCase testCaseChar = {

std::vector<printDataGenParameters> printStringGenParameters = {

// empty format
{ {""}, "\"foo\"" },

// empty argument
{ {"%s"}, "\"\"" },

//(Minimum)Four-wide,zero-filled,default(right)-justified

{ { "%4s" }, "\"foo\"" },
Expand Down Expand Up @@ -766,6 +772,10 @@ std::vector<printDataGenParameters> printStringGenParameters = {

std::vector<std::string> correctBufferString = {

"",

"",

" foo",

"f",
Expand Down

0 comments on commit 0be82dc

Please sign in to comment.