aboutsummaryrefslogtreecommitdiff
path: root/absl/strings/str_cat_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/str_cat_test.cc')
-rw-r--r--absl/strings/str_cat_test.cc46
1 files changed, 0 insertions, 46 deletions
diff --git a/absl/strings/str_cat_test.cc b/absl/strings/str_cat_test.cc
index b30a86fe..66eddf0d 100644
--- a/absl/strings/str_cat_test.cc
+++ b/absl/strings/str_cat_test.cc
@@ -39,24 +39,6 @@
namespace {
-template <typename Integer>
-void VerifyInteger(Integer value) {
- const std::string expected = std::to_string(value);
-
- EXPECT_EQ(absl::StrCat(value), expected);
-
- const char* short_prefix = "x";
- const char* long_prefix = "2;k.msabxiuow2[09i;o3k21-93-9=29]";
-
- std::string short_str = short_prefix;
- absl::StrAppend(&short_str, value);
- EXPECT_EQ(short_str, short_prefix + expected);
-
- std::string long_str = long_prefix;
- absl::StrAppend(&long_str, value);
- EXPECT_EQ(long_str, long_prefix + expected);
-}
-
// Test absl::StrCat of ints and longs of various sizes and signdedness.
TEST(StrCat, Ints) {
const short s = -1; // NOLINT(runtime/int)
@@ -86,34 +68,6 @@ TEST(StrCat, Ints) {
EXPECT_EQ(answer, "-9-12");
answer = absl::StrCat(uintptr, 0);
EXPECT_EQ(answer, "130");
-
- for (const uint32_t base : {2u, 10u}) {
- for (const int extra_shift : {0, 12}) {
- for (uint64_t i = 0; i < (1 << 8); ++i) {
- uint64_t j = i;
- while (true) {
- uint64_t v = j ^ (extra_shift != 0 ? (j << extra_shift) * base : 0);
- VerifyInteger(static_cast<bool>(v));
- VerifyInteger(static_cast<wchar_t>(v));
- VerifyInteger(static_cast<signed char>(v));
- VerifyInteger(static_cast<unsigned char>(v));
- VerifyInteger(static_cast<short>(v)); // NOLINT
- VerifyInteger(static_cast<unsigned short>(v)); // NOLINT
- VerifyInteger(static_cast<int>(v)); // NOLINT
- VerifyInteger(static_cast<unsigned int>(v)); // NOLINT
- VerifyInteger(static_cast<long>(v)); // NOLINT
- VerifyInteger(static_cast<unsigned long>(v)); // NOLINT
- VerifyInteger(static_cast<long long>(v)); // NOLINT
- VerifyInteger(static_cast<unsigned long long>(v)); // NOLINT
- const uint64_t next = j == 0 ? 1 : j * base;
- if (next <= j) {
- break;
- }
- j = next;
- }
- }
- }
- }
}
TEST(StrCat, Enums) {