diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2020-05-31 14:16:58 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2020-06-02 01:39:37 +0200 |
commit | 784b7dc39d880448e5599c19e65798d7207a412a (patch) | |
tree | fe5e121ed42a254012461d8212948de8600d7dcf /test | |
parent | 224ef08c7f6c9cf2a88fbf156225f04cac2eabeb (diff) |
wsd: optimize StringVector
StringVector is heavily used for tokenization
and benefits from inlining of small functions.
Also, cat doesn't need to be slower than necessary.
Change-Id: I4ab2ff1b1f1a81092049d2cde64b6df10b34b5f7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95287
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'test')
-rw-r--r-- | test/WhiteBoxTests.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/WhiteBoxTests.cpp b/test/WhiteBoxTests.cpp index 66f3e895f..a4be56bb9 100644 --- a/test/WhiteBoxTests.cpp +++ b/test/WhiteBoxTests.cpp @@ -815,6 +815,9 @@ void WhiteBoxTests::testStringVector() // Test cat(). CPPUNIT_ASSERT_EQUAL(std::string("a b"), vector.cat(" ", 0)); + CPPUNIT_ASSERT_EQUAL(std::string("a b"), vector.cat(' ', 0)); + CPPUNIT_ASSERT_EQUAL(std::string("a*b"), vector.cat('*', 0)); + CPPUNIT_ASSERT_EQUAL(std::string("a blah mlah b"), vector.cat(" blah mlah ", 0)); CPPUNIT_ASSERT_EQUAL(std::string(), vector.cat(" ", 3)); CPPUNIT_ASSERT_EQUAL(std::string(), vector.cat(" ", 42)); |