summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-03 00:03:44 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-03 00:03:44 +0100
commite579da493bc0b53d63cdd499c96ac181c1719068 (patch)
treef8cbc8520df4dee4fc77cadba61bad79483b797b
parent2ca83f15d5ca81ce8b45fd99d959aee49a6f2eea (diff)
added unit test for new functions in utils (trim)
-rw-r--r--test/core/UtilsTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/core/UtilsTest.cpp b/test/core/UtilsTest.cpp
index 4f754a5..0a7d2a3 100644
--- a/test/core/UtilsTest.cpp
+++ b/test/core/UtilsTest.cpp
@@ -31,5 +31,13 @@ TEST(Utils, isIdentifier)
ASSERT_FALSE(Utils::isIdentifier("0t-_EST"));
}
+TEST(Utils, trim)
+{
+ ASSERT_EQ("hello world", Utils::trim("\t hello world \n\r\t"));
+ ASSERT_EQ("hello world", Utils::trim("hello world \n\r\t"));
+ ASSERT_EQ("hello world", Utils::trim(" hello world"));
+ ASSERT_EQ("hello world", Utils::trim("hello world"));
+}
+
}