aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2022-01-29 22:49:11 -0500
committerrubenwardy <rw@rubenwardy.com>2022-04-08 14:55:21 +0100
commitc9317a16c5877d5c7bb2c1e684fa56fc73a53413 (patch)
treed272aa15e90602d61503a626c5be624f9ce3b6ef
parentdae6fe91a1059751a0bde504cdf41a749234ce1a (diff)
downloadminetest-c9317a16c5877d5c7bb2c1e684fa56fc73a53413.tar.gz
minetest-c9317a16c5877d5c7bb2c1e684fa56fc73a53413.tar.bz2
minetest-c9317a16c5877d5c7bb2c1e684fa56fc73a53413.zip
Remove duplicate test for trim
-rw-r--r--src/unittest/test_utilities.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/unittest/test_utilities.cpp b/src/unittest/test_utilities.cpp
index 10ea8d36a..98a143d1f 100644
--- a/src/unittest/test_utilities.cpp
+++ b/src/unittest/test_utilities.cpp
@@ -43,7 +43,6 @@ public:
void testPadString();
void testStartsWith();
void testStrEqual();
- void testStringTrim();
void testStrToIntConversion();
void testStringReplace();
void testStringAllowed();
@@ -76,7 +75,6 @@ void TestUtilities::runTests(IGameDef *gamedef)
TEST(testPadString);
TEST(testStartsWith);
TEST(testStrEqual);
- TEST(testStringTrim);
TEST(testStrToIntConversion);
TEST(testStringReplace);
TEST(testStringAllowed);
@@ -192,6 +190,8 @@ void TestUtilities::testTrim()
UASSERT(trim("dirt_with_grass") == "dirt_with_grass");
UASSERT(trim("\n \t\r Foo bAR \r\n\t\t ") == "Foo bAR");
UASSERT(trim("\n \t\r \r\n\t\t ") == "");
+ UASSERT(trim(" a") == "a");
+ UASSERT(trim("a ") == "a");
}
@@ -257,15 +257,6 @@ void TestUtilities::testStrEqual()
}
-void TestUtilities::testStringTrim()
-{
- UASSERT(trim(" a") == "a");
- UASSERT(trim(" a ") == "a");
- UASSERT(trim("a ") == "a");
- UASSERT(trim("") == "");
-}
-
-
void TestUtilities::testStrToIntConversion()
{
UASSERT(mystoi("123", 0, 1000) == 123);