diff options
author | Abseil Team <absl-team@google.com> | 2023-10-24 08:32:58 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-10-24 08:33:49 -0700 |
commit | 822e3244e4b842fbcba9168e536ef71380a024b0 (patch) | |
tree | cbc7f8586e76104504bdd9a7b468ac6ecfcb603f /absl/strings/cord_test.cc | |
parent | a6d9a9cddade9139616a980c8092431492b84f3c (diff) |
Add `AbslStringify()` support to `absl::Cord`
PiperOrigin-RevId: 576149980
Change-Id: I0a7e3df7a01edc78ee5d15d8d8e82e7bbc5fc0f3
Diffstat (limited to 'absl/strings/cord_test.cc')
-rw-r--r-- | absl/strings/cord_test.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/absl/strings/cord_test.cc b/absl/strings/cord_test.cc index bf507094..f1a5f39c 100644 --- a/absl/strings/cord_test.cc +++ b/absl/strings/cord_test.cc @@ -2656,6 +2656,13 @@ TEST_P(CordTest, Format) { EXPECT_EQ(c, "There were 0003 little pigs.And 1 bad wolf!"); } +TEST_P(CordTest, Stringify) { + absl::Cord c = + absl::MakeFragmentedCord({"A ", "small ", "fragmented ", "Cord", "."}); + MaybeHarden(c); + EXPECT_EQ(absl::StrCat(c), "A small fragmented Cord."); +} + TEST_P(CordTest, Hardening) { absl::Cord cord("hello"); MaybeHarden(cord); |