From 6cfb11bb12bc2a83d5c36151538ad080ba6b7bde Mon Sep 17 00:00:00 2001 From: Martin Flaska Date: Fri, 25 Nov 2016 12:58:25 +0100 Subject: [PATCH] test_string: Make 'stripWhiteSpace' test more complex No string without leading/trailing spaces was used in the test. Signed-off-by: Martin Flaska --- tests/test_string.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_string.cpp b/tests/test_string.cpp index 599e002d..b99c3f30 100644 --- a/tests/test_string.cpp +++ b/tests/test_string.cpp @@ -112,6 +112,9 @@ public: CPPUNIT_ASSERT(String(" foo ").stripWhiteSpace() == String("foo")); CPPUNIT_ASSERT(String("foo ").stripWhiteSpace() == String("foo")); CPPUNIT_ASSERT(String(" foo").stripWhiteSpace() == String("foo")); + CPPUNIT_ASSERT(String("foo").stripWhiteSpace() == String("foo")); + CPPUNIT_ASSERT(String("f o o").stripWhiteSpace() == String("f o o")); + CPPUNIT_ASSERT(String(" f o o ").stripWhiteSpace() == String("f o o")); CPPUNIT_ASSERT(memcmp(String("foo").data(String::Latin1).data(), "foo", 3) == 0); CPPUNIT_ASSERT(memcmp(String("f").data(String::Latin1).data(), "f", 1) == 0);