From: Martin Flaska Date: Fri, 25 Nov 2016 11:58:25 +0000 (+0100) Subject: test_string: Make 'stripWhiteSpace' test more complex X-Git-Tag: v1.12-beta-1~110^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6cfb11bb12bc2a83d5c36151538ad080ba6b7bde;p=taglib test_string: Make 'stripWhiteSpace' test more complex No string without leading/trailing spaces was used in the test. Signed-off-by: Martin Flaska --- 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);