Make testUtf8StringLiterals work when char is unsigned

...as is reportedly the case for Linux AArch64

Change-Id: I7e11c42f4437c8aad9dd734603fa7e0d458c9754
This commit is contained in:
Stephan Bergmann
2017-10-24 14:56:30 +02:00
parent e90f2d9e07
commit c2097d5078

View File

@@ -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);