diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-07-31 14:42:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-07-31 20:57:18 +0200 |
commit | fe1d6bf5751005054520b1fea95d0b9d40e910eb (patch) | |
tree | c824d54e8478b4e24cbaae0c7350d71070c7c179 /sal | |
parent | 2a68dc02bd19a717d3c86873206fabed1098f228 (diff) |
Fix C++20-only "..."_tstr test code
...added by 6fce450b8a66d7e98a4d39528f8591184277e9fa "Introduce "..."_tstr as a
companion to "..."_ostr/u"..."_ustr in template code"
Change-Id: I779cf8e586b2a57aadfe9e57a546ee613bb505e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155093
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_stringliterals.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx index 197f72a50fea..2f4de194928d 100644 --- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx @@ -434,7 +434,9 @@ void test::oustring::StringLiterals::checkOstr() { CPPUNIT_ASSERT_EQUAL(sal_Int32(7), u"foo\0bar"_ustr.getLength()); CPPUNIT_ASSERT_EQUAL(u""_ustr, rtl::OUString(""_tstr)); CPPUNIT_ASSERT_EQUAL(u"foobar"_ustr, rtl::OUString("foobar"_tstr)); - CPPUNIT_ASSERT_EQUAL(u"foo\0bar"_ustr, rtl::OUString("foo\0bar"_tstr)); + // Unlike in a OString context, the below "foo\0bar"_tstr in a OUString context would trigger + // the assert(c!='\0') in Copy in sal/rtl/strtmpl.hxx: + // CPPUNIT_ASSERT_EQUAL(u"foo\0bar"_ustr, rtl::OUString("foo\0bar"_tstr)); #endif } |