util: remove unnecessary trim/trimLeft/trimRight wrappers
When needed, use boost::algorithm::trim/trim_left/trim_right directly.
Change-Id: I854d89e553c70ab20679a38922cec306fc57824d
Refs: #3006
diff --git a/tests/unit-tests/util/string-helper.t.cpp b/tests/unit-tests/util/string-helper.t.cpp
index c59804b..c5cc218 100644
--- a/tests/unit-tests/util/string-helper.t.cpp
+++ b/tests/unit-tests/util/string-helper.t.cpp
@@ -20,6 +20,7 @@
*/
#include "util/string-helper.hpp"
+#include "encoding/buffer.hpp"
#include "boost-test.hpp"
@@ -108,52 +109,6 @@
BOOST_CHECK_THROW(fromHex("1234z"), StringHelperError);
}
-BOOST_AUTO_TEST_CASE(Trim)
-{
- std::string test1 = "Hello, world!";
- std::string test2 = "\n \t Hello, world!\n\r \t ";
- std::string test3 = " \t \n \r ";
-
- // TrimLeft
- std::string test = test1;
- trimLeft(test);
- BOOST_CHECK_EQUAL(test, "Hello, world!");
-
- test = test2;
- trimLeft(test);
- BOOST_CHECK_EQUAL(test, "Hello, world!\n\r \t ");
-
- test = test3;
- trimLeft(test);
- BOOST_CHECK_EQUAL(test, "");
-
- // TrimRight
- test = test1;
- trimRight(test);
- BOOST_CHECK_EQUAL(test, "Hello, world!");
-
- test = test2;
- trimRight(test);
- BOOST_CHECK_EQUAL(test, "\n \t Hello, world!");
-
- test = test3;
- trimRight(test);
- BOOST_CHECK_EQUAL(test, "");
-
- // Trim
- test = test1;
- trim(test);
- BOOST_CHECK_EQUAL(test, "Hello, world!");
-
- test = test2;
- trim(test);
- BOOST_CHECK_EQUAL(test, "Hello, world!");
-
- test = test3;
- trim(test);
- BOOST_CHECK_EQUAL(test, "");
-}
-
BOOST_AUTO_TEST_CASE(Unescape)
{
std::string test1 = "Hello%01, world!%AA ";