diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:35:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:35:37 +0100 |
commit | 108ecc45ce374b806f032218042959e4fdc90bbe (patch) | |
tree | f898115708b983325b703e60e5039b72e8ba112f /editeng/qa/lookuptree | |
parent | 318be4e53543aab8794922127119e5f0f5b21760 (diff) |
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Icf08e69ba327225da816bd57648d4242dcbf3280
Diffstat (limited to 'editeng/qa/lookuptree')
-rw-r--r-- | editeng/qa/lookuptree/lookuptree_test.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/editeng/qa/lookuptree/lookuptree_test.cxx b/editeng/qa/lookuptree/lookuptree_test.cxx index e1a35f41d0ef..91228fdfd9f3 100644 --- a/editeng/qa/lookuptree/lookuptree_test.cxx +++ b/editeng/qa/lookuptree/lookuptree_test.cxx @@ -51,62 +51,62 @@ void LookupTreeTest::testTrie() trie.findSuggestions( OUString(), suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 0, suggestions.size() ); - trie.findSuggestions( OUString("a"), suggestions); + trie.findSuggestions( "a", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 0, suggestions.size() ); - trie.insert( OUString("abc") ); - trie.insert( OUString("abcdefghijklmnopqrstuvwxyz") ); - trie.findSuggestions( OUString("a"), suggestions); + trie.insert( "abc" ); + trie.insert( "abcdefghijklmnopqrstuvwxyz" ); + trie.findSuggestions( "a", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 2, suggestions.size() ); CPPUNIT_ASSERT_EQUAL( OUString("abc"), suggestions[0] ); CPPUNIT_ASSERT_EQUAL( OUString("abcdefghijklmnopqrstuvwxyz"), suggestions[1] ); suggestions.clear(); - trie.findSuggestions( OUString("abc"), suggestions); + trie.findSuggestions( "abc", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 1, suggestions.size() ); CPPUNIT_ASSERT_EQUAL( OUString("abcdefghijklmnopqrstuvwxyz"), suggestions[0] ); suggestions.clear(); - trie.findSuggestions( OUString("abe"), suggestions); + trie.findSuggestions( "abe", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 0, suggestions.size() ); suggestions.clear(); - trie.insert( OUString("abe") ); - trie.findSuggestions( OUString(""), suggestions); + trie.insert( "abe" ); + trie.findSuggestions( "", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 3, suggestions.size() ); CPPUNIT_ASSERT_EQUAL( OUString("abc"), suggestions[0] ); CPPUNIT_ASSERT_EQUAL( OUString("abcdefghijklmnopqrstuvwxyz"), suggestions[1] ); CPPUNIT_ASSERT_EQUAL( OUString("abe"), suggestions[2] ); suggestions.clear(); - trie.insert( OUString("H31l0") ); - trie.findSuggestions( OUString("H"), suggestions); + trie.insert( "H31l0" ); + trie.findSuggestions( "H", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 1, suggestions.size() ); CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] ); suggestions.clear(); - trie.insert( OUString("H1") ); - trie.findSuggestions( OUString("H"), suggestions); + trie.insert( "H1" ); + trie.findSuggestions( "H", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 2, suggestions.size() ); CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] ); CPPUNIT_ASSERT_EQUAL( OUString("H1"), suggestions[1] ); suggestions.clear(); - trie.findSuggestions( OUString("H3"), suggestions); + trie.findSuggestions( "H3", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 1, suggestions.size() ); CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] ); suggestions.clear(); trie.insert( OStringToOUString( "H\xC3\xA4llo", RTL_TEXTENCODING_UTF8 ) ); - trie.findSuggestions( OUString("H"), suggestions ); + trie.findSuggestions( "H", suggestions ); CPPUNIT_ASSERT_EQUAL( (size_t) 3, suggestions.size() ); CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] ); CPPUNIT_ASSERT_EQUAL( OUString("H1"), suggestions[1] ); CPPUNIT_ASSERT_EQUAL( OStringToOUString( "H\xC3\xA4llo", RTL_TEXTENCODING_UTF8 ), suggestions[2] ); suggestions.clear(); - trie.findSuggestions( OUString("H3"), suggestions ); + trie.findSuggestions( "H3", suggestions ); CPPUNIT_ASSERT_EQUAL( (size_t) 1, suggestions.size() ); CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] ); suggestions.clear(); @@ -116,7 +116,7 @@ void LookupTreeTest::testTrie() CPPUNIT_ASSERT_EQUAL( OStringToOUString("H\xC3\xA4llo", RTL_TEXTENCODING_UTF8), suggestions[0] ); suggestions.clear(); - trie.findSuggestions( OUString(""), suggestions); + trie.findSuggestions( "", suggestions); CPPUNIT_ASSERT_EQUAL( (size_t) 6, suggestions.size() ); suggestions.clear(); } |