projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test that _sp includes nul bytes
[folly.git]
/
folly
/
test
/
RangeTest.cpp
diff --git
a/folly/test/RangeTest.cpp
b/folly/test/RangeTest.cpp
index b1298cacec7f659466ce85bdd9f990d169bd9338..42faf4dea14af05817c88cef57316889254ba343 100644
(file)
--- a/
folly/test/RangeTest.cpp
+++ b/
folly/test/RangeTest.cpp
@@
-1428,3
+1428,8
@@
TEST(Range, LiteralSuffix) {
constexpr Range<wchar_t const*> pieceW{L"hello", 5};
EXPECT_EQ(literalPieceW, pieceW);
}
constexpr Range<wchar_t const*> pieceW{L"hello", 5};
EXPECT_EQ(literalPieceW, pieceW);
}
+
+TEST(Range, LiteralSuffixContainsNulBytes) {
+ constexpr auto literalPiece = "\0foo\0"_sp;
+ EXPECT_EQ(5u, literalPiece.size());
+}