summaryrefslogtreecommitdiff
path: root/core/fxcrt/bytestring_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/bytestring_unittest.cpp')
-rw-r--r--core/fxcrt/bytestring_unittest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fxcrt/bytestring_unittest.cpp b/core/fxcrt/bytestring_unittest.cpp
index 8dab4f0cba..d030535edd 100644
--- a/core/fxcrt/bytestring_unittest.cpp
+++ b/core/fxcrt/bytestring_unittest.cpp
@@ -23,6 +23,10 @@ TEST(ByteString, ElementAccess) {
EXPECT_DEATH({ abc[3]; }, ".*");
#endif
+ pdfium::span<const char> abc_span = abc.AsSpan();
+ EXPECT_EQ(3u, abc_span.size());
+ EXPECT_EQ(0, memcmp(abc_span.data(), "abc", 3));
+
ByteString mutable_abc = abc;
EXPECT_EQ(abc.c_str(), mutable_abc.c_str());
EXPECT_EQ('a', mutable_abc[0]);