add equals interface for Range class.
[folly.git] / folly / test / RangeTest.cpp
index 8f333403a174fe2832d12446cb5bc25bae62b5f6..8a2b2762def14124b57ea0c7b927d48400d3f11d 100644 (file)
@@ -418,6 +418,13 @@ TEST(StringPiece, Suffix) {
   }
 }
 
+TEST(StringPiece, Equals) {
+  StringPiece a("hello");
+
+  EXPECT_TRUE(a.equals("HELLO", AsciiCaseInsensitive()));
+  EXPECT_FALSE(a.equals("HELLOX", AsciiCaseInsensitive()));
+}
+
 TEST(StringPiece, PrefixEmpty) {
   StringPiece a;
   EXPECT_TRUE(a.startsWith(""));