You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
From c2097d5078896a71b8e1ac4074cc03766f5d7098 Mon Sep 17 00:00:00 2001
|
|
From: Stephan Bergmann <sbergman@redhat.com>
|
|
Date: Tue, 24 Oct 2017 14:56:30 +0200
|
|
Subject: [PATCH] Make testUtf8StringLiterals work when char is unsigned
|
|
|
|
...as is reportedly the case for Linux AArch64
|
|
|
|
Change-Id: I7e11c42f4437c8aad9dd734603fa7e0d458c9754
|
|
---
|
|
sal/qa/rtl/strings/test_ostring.cxx | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/sal/qa/rtl/strings/test_ostring.cxx b/sal/qa/rtl/strings/test_ostring.cxx
|
|
index 110831758916..3732f7488bde 100644
|
|
--- a/sal/qa/rtl/strings/test_ostring.cxx
|
|
+++ b/sal/qa/rtl/strings/test_ostring.cxx
|
|
@@ -111,9 +111,9 @@ void Test::testUtf8StringLiterals()
|
|
{
|
|
const OString sIn(u8"ßa");
|
|
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), sIn.getLength());
|
|
- CPPUNIT_ASSERT_EQUAL(-61, static_cast<int>(sIn[0]));
|
|
- CPPUNIT_ASSERT_EQUAL(-97, static_cast<int>(sIn[1]));
|
|
- CPPUNIT_ASSERT_EQUAL(97, static_cast<int>(sIn[2]));
|
|
+ CPPUNIT_ASSERT_EQUAL(195, int(static_cast<unsigned char>(sIn[0])));
|
|
+ CPPUNIT_ASSERT_EQUAL(159, int(static_cast<unsigned char>(sIn[1])));
|
|
+ CPPUNIT_ASSERT_EQUAL(97, int(static_cast<unsigned char>(sIn[2])));
|
|
}
|
|
|
|
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
|
--
|
|
2.14.1
|
|
|