summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-11 09:23:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-11 15:16:22 +0200
commitf1769094af821860dd9e1aa00904ba7123d27d1a (patch)
tree22f50261b71068bb2011301c9e1ef19ba30a873f /sal
parentf5d02bdc6831588c0442fa24c5913971a224c4fa (diff)
round out StringConcat helpers with sal_Unicode* overloads
so we can construct efficient expressions when we have pointers to unicode data Also lightly reformat a couple of the older helpers to make it easier to compare the different helpers. Change-Id: Ib8a4227714e9218512b6871d3285e4e2703bec3b Reviewed-on: https://gerrit.libreoffice.org/80639 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/rtl/strings/test_oustring_concat.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sal/qa/rtl/strings/test_oustring_concat.cxx b/sal/qa/rtl/strings/test_oustring_concat.cxx
index 56b38ec1ee90..6e1b209f7189 100644
--- a/sal/qa/rtl/strings/test_oustring_concat.cxx
+++ b/sal/qa/rtl/strings/test_oustring_concat.cxx
@@ -71,6 +71,9 @@ void test::oustring::StringConcat::checkConcat()
const char d1[] = "xyz";
CPPUNIT_ASSERT_EQUAL( OUString( "fooxyz" ), OUString( OUString( "foo" ) + d1 ));
CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, const char[ 4 ] > )), typeid( OUString( "foo" ) + d1 ));
+ const sal_Unicode* d2 = u"xyz";
+ CPPUNIT_ASSERT_EQUAL( OUString( "fooxyz" ), OUString( OUString( "foo" ) + d2 ));
+ CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, const sal_Unicode* > )), typeid( OUString( "foo" ) + d2 ));
CPPUNIT_ASSERT_EQUAL( OUString( "num10" ), OUString( OUString( "num" ) + OUString::number( 10 )));
CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, OUStringNumber< int > > )), typeid( OUString( "num" ) + OUString::number( 10 )));