summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/StringUtilTest.cpp
diff options
context:
space:
mode:
authorLioncash <mai.iam2048@gmail.com>2023-01-24 14:25:49 -0500
committerLioncash <mai.iam2048@gmail.com>2023-01-24 14:58:20 -0500
commite5b91f00b0688d5cba6870da6d6ad3300097b07f (patch)
tree09ec8ac31ff935d63aa9c06004802156ac96ebf5 /Source/UnitTests/Common/StringUtilTest.cpp
parentba6ee9d7ba9730e5b2165ff0ee18cbc23762b129 (diff)
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions added in C++20.
Diffstat (limited to 'Source/UnitTests/Common/StringUtilTest.cpp')
-rw-r--r--Source/UnitTests/Common/StringUtilTest.cpp24
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";