summaryrefslogtreecommitdiff
path: root/absl/strings/internal/str_format/parser_test.cc
diff options
context:
space:
mode:
authorGravatar Samuel Benzaquen <sbenza@google.com>2022-11-29 08:57:48 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2022-11-29 08:58:23 -0800
commit82196f059f213c50738142a799bb166b2971950d (patch)
tree5dbfdb957de4369303797515ad34d3099aeeece7 /absl/strings/internal/str_format/parser_test.cc
parent13708db87b1ab69f4f2b3214f3f51e986546f282 (diff)
Convert the full parser into constexpr now that Abseil requires C++14, and use
this parser for the static checker. This fixes some outstanding bugs where the static checker differed from the dynamic one. Also, fix `%v` to be accepted with POSIX syntax. Tested: Presubmit TGP OCL:487237262:BASE:490275393:1669141454896:92dd62e3 PiperOrigin-RevId: 491650577 Change-Id: Id138c108187428b3aea46f8887495f1da12c91b2
Diffstat (limited to 'absl/strings/internal/str_format/parser_test.cc')
-rw-r--r--absl/strings/internal/str_format/parser_test.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/absl/strings/internal/str_format/parser_test.cc b/absl/strings/internal/str_format/parser_test.cc
index c3e825fe..021f6a87 100644
--- a/absl/strings/internal/str_format/parser_test.cc
+++ b/absl/strings/internal/str_format/parser_test.cc
@@ -117,6 +117,7 @@ TEST_F(ConsumeUnboundConversionTest, ConsumeSpecification) {
{__LINE__, "dzz", "d", "zz"}, // length mod as suffix
{__LINE__, "3v", "", "3v"}, // 'v' cannot have modifiers
{__LINE__, "hv", "", "hv"}, // 'v' cannot have modifiers
+ {__LINE__, "1$v", "1$v", ""}, // 'v' can have use posix syntax
{__LINE__, "1$*2$d", "1$*2$d", "" }, // arg indexing and * allowed.
{__LINE__, "0-14.3hhd", "0-14.3hhd", ""}, // precision, width
{__LINE__, " 0-+#14.3hhd", " 0-+#14.3hhd", ""}, // flags