Futex::futexWait returns FutexResult
[folly.git] / folly / test / RangeTest.cpp
index dbe8d88fa2b6fa216c8207696127138ddcd413c4..42faf4dea14af05817c88cef57316889254ba343 100644 (file)
@@ -1201,7 +1201,7 @@ TEST(CRangeFunc, StdArrayZero) {
   auto const numArrayRange = crange(numArray);
   EXPECT_TRUE(
       (std::is_same<int const*, decltype(numArrayRange)::iterator>::value));
-  EXPECT_THAT(numArrayRange, testing::ElementsAreArray(numArray));
+  EXPECT_THAT(numArrayRange, testing::IsEmpty());
 }
 
 TEST(CRangeFunc, Collection) {
@@ -1428,3 +1428,8 @@ TEST(Range, LiteralSuffix) {
   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());
+}