summaryrefslogtreecommitdiff
path: root/sal/CppunitTest_sal_rtl.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-09-04 20:26:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-09-05 12:29:10 +0200
commit9abaa6492899b3a8e467b08ec8a084ed3db7f518 (patch)
treecf223bf313df7f1eb3f55f17b24542df0b526482 /sal/CppunitTest_sal_rtl.mk
parent7003fe557bd2223e9af1ed0eb6c97b209686a8ab (diff)
Make OUString(char16_t const[N]) ctor check for embedded NULs
...and fix the detected fallout. That ctor only started to get used recently with a1570b6052ae9c9349282027c9007b071589bce6 "Make the OUString ConstCharArrayDetector::TypeUtf16 overloads are actually used", but it turns out that that also gave rise to that ctor being picked in error. To better guard against such erroneous uses, make that ctor assert that the given array does not contain embedded NUL characters, see the new sal/qa/rtl/strings/nonconstarray.cxx tests. The one place where that assert would fire during `make check` is fixed now in SwWW8ImplReader::ImportDopTypography. That assert would also fire for tow OUStringLiteral-related tests in the recently added test::oustring::StringLiterals::checkEmbeddedNul, so drop those for how. They cna presumably be added back (with reversed logic values) when OUStringLiteral is changed similarly to how OStringLiteral was changed in 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String". Change-Id: I6056244003a20f77ba0d953538d25edcbd562211 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/CppunitTest_sal_rtl.mk')
-rw-r--r--sal/CppunitTest_sal_rtl.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/sal/CppunitTest_sal_rtl.mk b/sal/CppunitTest_sal_rtl.mk
index c2eaa72daa26..f559202c54d5 100644
--- a/sal/CppunitTest_sal_rtl.mk
+++ b/sal/CppunitTest_sal_rtl.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sal_rtl,\
sal/qa/rtl/process/rtl_Process \
sal/qa/rtl/random/rtl_random \
sal/qa/rtl/ref/rtl_ref \
+ sal/qa/rtl/strings/nonconstarray \
sal/qa/rtl/strings/test_strings_replace \
sal/qa/rtl/strings/test_ostring \
sal/qa/rtl/strings/test_ostring_concat \