mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Add a few tests for StringRef::{start,end}with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193550 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
136660484d
commit
bc850d0c6c
@ -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"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user