diff options
Diffstat (limited to 'absl/strings')
-rw-r--r-- | absl/strings/str_cat.h | 8 | ||||
-rw-r--r-- | absl/strings/str_cat_test.cc | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/absl/strings/str_cat.h b/absl/strings/str_cat.h index da9ed9a2..8ba0592f 100644 --- a/absl/strings/str_cat.h +++ b/absl/strings/str_cat.h @@ -97,6 +97,10 @@ enum PadSpec : uint8_t { kZeroPad14, kZeroPad15, kZeroPad16, + kZeroPad17, + kZeroPad18, + kZeroPad19, + kZeroPad20, kSpacePad2 = kZeroPad2 + 64, kSpacePad3, @@ -113,6 +117,10 @@ enum PadSpec : uint8_t { kSpacePad14, kSpacePad15, kSpacePad16, + kSpacePad17, + kSpacePad18, + kSpacePad19, + kSpacePad20, }; // ----------------------------------------------------------------------------- diff --git a/absl/strings/str_cat_test.cc b/absl/strings/str_cat_test.cc index 555d8db3..07141072 100644 --- a/absl/strings/str_cat_test.cc +++ b/absl/strings/str_cat_test.cc @@ -427,7 +427,7 @@ void CheckHex(IntType v, const char* nopad_format, const char* zeropad_format, snprintf(expected, sizeof(expected), nopad_format, v); EXPECT_EQ(expected, actual) << " decimal value " << v; - for (int spec = absl::kZeroPad2; spec <= absl::kZeroPad16; ++spec) { + for (int spec = absl::kZeroPad2; spec <= absl::kZeroPad20; ++spec) { std::string actual = absl::StrCat(absl::Hex(v, static_cast<absl::PadSpec>(spec))); snprintf(expected, sizeof(expected), zeropad_format, @@ -435,7 +435,7 @@ void CheckHex(IntType v, const char* nopad_format, const char* zeropad_format, EXPECT_EQ(expected, actual) << " decimal value " << v; } - for (int spec = absl::kSpacePad2; spec <= absl::kSpacePad16; ++spec) { + for (int spec = absl::kSpacePad2; spec <= absl::kSpacePad20; ++spec) { std::string actual = absl::StrCat(absl::Hex(v, static_cast<absl::PadSpec>(spec))); snprintf(expected, sizeof(expected), spacepad_format, @@ -453,7 +453,7 @@ void CheckDec(IntType v, const char* nopad_format, const char* zeropad_format, snprintf(expected, sizeof(expected), nopad_format, v); EXPECT_EQ(expected, actual) << " decimal value " << v; - for (int spec = absl::kZeroPad2; spec <= absl::kZeroPad16; ++spec) { + for (int spec = absl::kZeroPad2; spec <= absl::kZeroPad20; ++spec) { std::string actual = absl::StrCat(absl::Dec(v, static_cast<absl::PadSpec>(spec))); snprintf(expected, sizeof(expected), zeropad_format, @@ -463,7 +463,7 @@ void CheckDec(IntType v, const char* nopad_format, const char* zeropad_format, << "' digits " << (spec - absl::kZeroPad2 + 2); } - for (int spec = absl::kSpacePad2; spec <= absl::kSpacePad16; ++spec) { + for (int spec = absl::kSpacePad2; spec <= absl::kSpacePad20; ++spec) { std::string actual = absl::StrCat(absl::Dec(v, static_cast<absl::PadSpec>(spec))); snprintf(expected, sizeof(expected), spacepad_format, |