summaryrefslogtreecommitdiff
path: root/sal/qa/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-25 10:15:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-25 12:38:32 +0200
commit8007417c318140d74b87ec5abcf835f4a2ba9682 (patch)
tree0ea40500853d78008c0d1aa1083a0e415e457e9a /sal/qa/rtl
parent707ef3171a096787b2f7a4c221e60962f05e7d01 (diff)
Revert "Revert "Generalize OUStringLiteral1""
This reverts commit 5cba714b4d03ed54debf71534ad8c8edc383a01e, now including a workaround for <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53658> "internal compiler error -- segmentation fault." Change-Id: I31f6d9ddcb0b884134703df2b9dc1800ba0a84be
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r--sal/qa/rtl/strings/test_oustring_stringliterals.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 9b85b314c85f..825e7d84ad25 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -192,6 +192,20 @@ void test::oustring::StringLiterals::checkOUStringLiteral()
void test::oustring::StringLiterals::checkOUStringLiteral1()
{
+ auto l1 = rtlunittest::OUStringLiteral1<'A'>();
+ CPPUNIT_ASSERT_EQUAL('A', l1.c);
+
+ char const c2 = 'A';
+ auto l2 = rtlunittest::OUStringLiteral1<c2>();
+ CPPUNIT_ASSERT_EQUAL('A', l2.c);
+
+ // char c3 = 'A'; auto l3 = rtlunittest::OUStringLiteral1<c3>();
+
+ auto l4 = rtlunittest::OUStringLiteral1<sal_Unicode('A')>();
+ CPPUNIT_ASSERT_EQUAL('A', l4.c);
+
+ // auto l5 = rtlunittest::OUStringLiteral1<sal_Unicode(0x100)>();
+
rtl::OUString s1;
s1 = rtlunittest::OUStringLiteral1<'A'>();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), s1.getLength());