diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2023-01-24 21:51:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-24 21:51:15 +0100 |
| commit | 4b2c00e239f44e79190cc156e4557ea4aaf64bd2 (patch) | |
| tree | 09ec8ac31ff935d63aa9c06004802156ac96ebf5 /Source/UnitTests/Common/StringUtilTest.cpp | |
| parent | ba6ee9d7ba9730e5b2165ff0ee18cbc23762b129 (diff) | |
| parent | e5b91f00b0688d5cba6870da6d6ad3300097b07f (diff) | |
Merge pull request #11487 from lioncash/str
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Diffstat (limited to 'Source/UnitTests/Common/StringUtilTest.cpp')
| -rw-r--r-- | Source/UnitTests/Common/StringUtilTest.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Source/UnitTests/Common/StringUtilTest.cpp b/Source/UnitTests/Common/StringUtilTest.cpp index 8cc3590a7c..1f1159d1eb 100644 --- a/Source/UnitTests/Common/StringUtilTest.cpp +++ b/Source/UnitTests/Common/StringUtilTest.cpp @@ -16,30 +16,6 @@ TEST(StringUtil, JoinStrings) EXPECT_EQ("???", JoinStrings({"?", "?"}, "?")); } -TEST(StringUtil, StringBeginsWith) -{ - EXPECT_TRUE(StringBeginsWith("abc", "a")); - EXPECT_FALSE(StringBeginsWith("abc", "b")); - EXPECT_TRUE(StringBeginsWith("abc", "ab")); - EXPECT_FALSE(StringBeginsWith("a", "ab")); - EXPECT_FALSE(StringBeginsWith("", "a")); - EXPECT_FALSE(StringBeginsWith("", "ab")); - EXPECT_TRUE(StringBeginsWith("abc", "")); - EXPECT_TRUE(StringBeginsWith("", "")); -} - -TEST(StringUtil, StringEndsWith) -{ - EXPECT_TRUE(StringEndsWith("abc", "c")); - EXPECT_FALSE(StringEndsWith("abc", "b")); - EXPECT_TRUE(StringEndsWith("abc", "bc")); - EXPECT_FALSE(StringEndsWith("a", "ab")); - EXPECT_FALSE(StringEndsWith("", "a")); - EXPECT_FALSE(StringEndsWith("", "ab")); - EXPECT_TRUE(StringEndsWith("abc", "")); - EXPECT_TRUE(StringEndsWith("", "")); -} - TEST(StringUtil, StringPopBackIf) { std::string abc = "abc"; |
