summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/rtl/digest/rtl_digest.cxx15
-rw-r--r--sal/qa/rtl/strings/test_ostring_concat.cxx10
-rw-r--r--sal/qa/rtl/textenc/rtl_textcvt.cxx2
3 files changed, 17 insertions, 10 deletions
diff --git a/sal/qa/rtl/digest/rtl_digest.cxx b/sal/qa/rtl/digest/rtl_digest.cxx
index e2392eaadcc8..d948deaf6d6c 100644
--- a/sal/qa/rtl/digest/rtl_digest.cxx
+++ b/sal/qa/rtl/digest/rtl_digest.cxx
@@ -24,6 +24,7 @@
#include <cppunit/plugin/TestPlugIn.h>
#include <memory>
+#include <string_view>
#include <rtl/digest.h>
#include <rtl/string.h>
@@ -61,14 +62,14 @@ const sal_uInt32 constDigestAlgorithmLengths[] =
RTL_DIGEST_LENGTH_HMAC_SHA1,
};
-const OStringLiteral constSampleStringSums[] =
+const std::string_view constSampleStringSums[] =
{
- OStringLiteral("647ee6c9d4aa5fdd374ed9d7a156acbf"),
- OStringLiteral("b16b903e6fc0b62ae389013ed93fe531"),
- OStringLiteral("eab2814429b2613301c8a077b806af3680548914"),
- OStringLiteral("2bc5bdb7506a2cdc2fd27fc8b9889343012d5008"),
- OStringLiteral("0b1b0e1a6f2e4420326354b031063605"),
- OStringLiteral("1998c6a556915be76451bfb587fa7c34d849936e")
+ std::string_view("647ee6c9d4aa5fdd374ed9d7a156acbf"),
+ std::string_view("b16b903e6fc0b62ae389013ed93fe531"),
+ std::string_view("eab2814429b2613301c8a077b806af3680548914"),
+ std::string_view("2bc5bdb7506a2cdc2fd27fc8b9889343012d5008"),
+ std::string_view("0b1b0e1a6f2e4420326354b031063605"),
+ std::string_view("1998c6a556915be76451bfb587fa7c34d849936e")
};
// Create hex-value string from the digest value to keep the string size minimal
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx
index e5872654b58d..94f4e8d692cf 100644
--- a/sal/qa/rtl/strings/test_ostring_concat.cxx
+++ b/sal/qa/rtl/strings/test_ostring_concat.cxx
@@ -68,9 +68,15 @@ void test::ostring::StringConcat::checkConcat()
CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringBuffer( "foo" ) + "bar" ));
CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringBuffer, const char[ 4 ] > )), typeid( OStringBuffer( "foo" ) + "bar" ));
CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" ) + "bar" ));
- CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral, const char[ 4 ] > )), typeid( OStringLiteral( "foo" ) + "bar" ));
+ CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const char[ 4 ] > )), typeid( OStringLiteral<4>( "foo" ) + "bar" ));
+ //TODO: the explicit OUStringLiteral<4> template argument in the unevaluated typeid context
+ // is needed by some GCC versions, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878>
+ // "Failed class template argument deduction in unevaluated, parenthesized context"
CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" ) + static_cast<const char*>("bar") ));
- CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral, const char* > )), typeid( OStringLiteral( "foo" ) + static_cast<const char*>("bar") ));
+ CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const char* > )), typeid( OStringLiteral<4>( "foo" ) + static_cast<const char*>("bar") ));
+ //TODO: the explicit OUStringLiteral<4> template argument in the unevaluated typeid context
+ // is needed by some GCC versions, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878>
+ // "Failed class template argument deduction in unevaluated, parenthesized context"
const char d1[] = "xyz";
char d2[] = "abc";
const char* d3 = d1;
diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx
index 8e619a23e1ca..6dec034a96ff 100644
--- a/sal/qa/rtl/textenc/rtl_textcvt.cxx
+++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx
@@ -2966,7 +2966,7 @@ void Test::testInvalidUtf8() {
sal_uInt32 info;
sal_Size converted;
auto const size = rtl_convertTextToUnicode(
- converter, nullptr, input.data, input.size, buf,
+ converter, nullptr, input.getStr(), input.getLength(), buf,
TEST_STRING_SIZE,
(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
| RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR