diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-12-04 11:20:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-12-04 11:20:22 +0100 |
commit | 4e593d047b9c10de085dffa3fa3dd4602361c407 (patch) | |
tree | 4e8d64663c5292a1c0e2964229304e3826886a23 /sal/qa | |
parent | 94ff635f806536b358731d046b7d9e6ce48eb0a2 (diff) |
Fix fast concat of empty strings
Change-Id: Ice9c6974f44be3bc4c9b3533de2a9beb5b146ca5
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/rtl/strings/test_ostring_concat.cxx | 1 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_concat.cxx | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx index a79b2dad32fb..46457ddf5f35 100644 --- a/sal/qa/rtl/strings/test_ostring_concat.cxx +++ b/sal/qa/rtl/strings/test_ostring_concat.cxx @@ -47,6 +47,7 @@ CPPUNIT_TEST_SUITE_END(); void test::ostring::StringConcat::check() { // All the extra () are to protect commas againsts being treated as separators of macro arguments. + CPPUNIT_ASSERT_EQUAL( OString(), OString(OString() + OString()) ); CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OString( "foo" ) + OString( "bar" ))); TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, OString > )), typeid( OString( "foo" ) + OString( "bar" ))); CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OString( "foo" ) + "bar" )); diff --git a/sal/qa/rtl/strings/test_oustring_concat.cxx b/sal/qa/rtl/strings/test_oustring_concat.cxx index 0cc25128a075..4f650dcf3657 100644 --- a/sal/qa/rtl/strings/test_oustring_concat.cxx +++ b/sal/qa/rtl/strings/test_oustring_concat.cxx @@ -47,6 +47,7 @@ CPPUNIT_TEST_SUITE_END(); void test::oustring::StringConcat::check() { // All the extra () are to protect commas againsts being treated as separators of macro arguments. + CPPUNIT_ASSERT_EQUAL( OUString(), OUString(OUString() + OUString()) ); CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUString( "foo" ) + OUString( "bar" ))); TYPES_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, OUString > )), typeid( OUString( "foo" ) + OUString( "bar" ))); CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUString( "foo" ) + "bar" )); |