X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=unittests%2FADT%2FStringRefTest.cpp;fp=unittests%2FADT%2FStringRefTest.cpp;h=07fba49684cef032b93ddfa642c35d0beba84462;hp=3cb6143a42b6d4d9799f94cf55cea1e74815f8f1;hb=bc850d0c6c8d0e5ed4a2cdc502603a9d2946908e;hpb=136660484d56ac5bb168e0c3a8f6fbc9d986723e diff --git a/unittests/ADT/StringRefTest.cpp b/unittests/ADT/StringRefTest.cpp index 3cb6143a42b..07fba49684c 100644 --- a/unittests/ADT/StringRefTest.cpp +++ b/unittests/ADT/StringRefTest.cpp @@ -248,6 +248,7 @@ TEST(StringRefTest, Trim) { TEST(StringRefTest, StartsWith) { StringRef Str("hello"); + EXPECT_TRUE(Str.startswith("")); EXPECT_TRUE(Str.startswith("he")); EXPECT_FALSE(Str.startswith("helloworld")); EXPECT_FALSE(Str.startswith("hi")); @@ -255,6 +256,7 @@ TEST(StringRefTest, StartsWith) { TEST(StringRefTest, EndsWith) { StringRef Str("hello"); + EXPECT_TRUE(Str.endswith("")); EXPECT_TRUE(Str.endswith("lo")); EXPECT_FALSE(Str.endswith("helloworld")); EXPECT_FALSE(Str.endswith("worldhello"));