get textencoding tests working again
Change-Id: Ia3e0b7be14800e1d50c3e785153b45d2b4a7dd6d
This commit is contained in:
parent
5eb649a89b
commit
65f82ca629
22
sal/CppunitTest_sal_rtl_textenc.mk
Normal file
22
sal/CppunitTest_sal_rtl_textenc.mk
Normal file
@ -0,0 +1,22 @@
|
||||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
||||
#
|
||||
# This file is part of the LibreOffice project.
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
$(eval $(call gb_CppunitTest_CppunitTest,sal_rtl_textenc))
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_exception_objects,sal_rtl_textenc,\
|
||||
sal/qa/rtl/textenc/rtl_tencinfo \
|
||||
sal/qa/rtl/textenc/rtl_textcvt \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_libraries,sal_rtl_textenc,\
|
||||
sal \
|
||||
$(gb_UWINAPI) \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
@ -74,6 +74,7 @@ $(eval $(call gb_Module_add_check_targets,sal,\
|
||||
CppunitTest_sal_rtl_locale \
|
||||
CppunitTest_sal_rtl_ostringbuffer \
|
||||
CppunitTest_sal_rtl_oustringbuffer \
|
||||
CppunitTest_sal_rtl_textenc \
|
||||
CppunitTest_sal_rtl_strings \
|
||||
CppunitTest_sal_rtl_uri \
|
||||
CppunitTest_sal_rtl_uuid \
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,9 @@
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
|
||||
#include "testshl/simpleheader.hxx"
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
#include "rtl/string.hxx"
|
||||
#include "rtl/tencinfo.h"
|
||||
#include "rtl/textcvt.h"
|
||||
@ -1096,6 +1098,7 @@ void Test::testSingleByte() {
|
||||
0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
|
||||
0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
|
||||
0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A } },
|
||||
#if 0
|
||||
{ RTL_TEXTENCODING_ISCII_DEVANAGARI,
|
||||
{ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
|
||||
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
|
||||
@ -1129,6 +1132,7 @@ void Test::testSingleByte() {
|
||||
0x094D,0x093C,0x0964,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
|
||||
0xFFFF,0x0966,0x0967,0x0968,0x0969,0x096A,0x096B,0x096C,
|
||||
0x096D,0x096E,0x096F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF } },
|
||||
#endif
|
||||
{ RTL_TEXTENCODING_ADOBE_STANDARD,
|
||||
{ 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
|
||||
0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
|
||||
@ -1163,7 +1167,7 @@ void Test::testSingleByte() {
|
||||
0xFFFF,0x00E6,0xFFFF,0xFFFF,0xFFFF,0x0131,0xFFFF,0xFFFF,
|
||||
0x0142,0x00F8,0x0153,0x00DF,0xFFFF,0xFFFF,0xFFFF,0xFFFF } },
|
||||
{ RTL_TEXTENCODING_ADOBE_SYMBOL,
|
||||
{ 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
|
||||
{ 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
|
||||
0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
|
||||
0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
|
||||
0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
|
||||
@ -1212,7 +1216,7 @@ void Test::testSingleByte() {
|
||||
0x2738,0x2739,0x273A,0x273B,0x273C,0x273D,0x273E,0x273F,
|
||||
// 60
|
||||
0x2740,0x2741,0x2742,0x2743,0x2744,0x2745,0x2746,0x2747,
|
||||
0x2748,0x2749,0x274A,0x274B,0x27CF,0x274D,0x25A0,0x274F,
|
||||
0x2748,0x2749,0x274A,0x274B,0x25CF,0x274D,0x25A0,0x274F,
|
||||
0x2750,0x2751,0x2752,0x25B2,0x25BC,0x25C6,0x2756,0x25D7,
|
||||
0x2758,0x2759,0x275A,0x275B,0x275C,0x275D,0x275E,0xFFFF,
|
||||
// 80
|
||||
@ -2809,7 +2813,7 @@ void Test::testWindows() {
|
||||
{ 0, RTL_TEXTENCODING_DONTKNOW, true },
|
||||
{ 0, RTL_TEXTENCODING_UCS4, true },
|
||||
{ 0, RTL_TEXTENCODING_UCS2, true },
|
||||
{ 0, RTL_TEXTENCODING_ISCII_DEVANAGARI, true }
|
||||
{ 57002, RTL_TEXTENCODING_ISCII_DEVANAGARI, true }
|
||||
};
|
||||
for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) {
|
||||
OSL_ASSERT(data[i].codePage != 0 || data[i].reverse);
|
||||
@ -2866,8 +2870,10 @@ void Test::testInfo() {
|
||||
{ RTL_TEXTENCODING_IBM_861, RTL_TEXTENCODING_INFO_MIME, true },
|
||||
{ RTL_TEXTENCODING_IBM_863, RTL_TEXTENCODING_INFO_MIME, true },
|
||||
{ RTL_TEXTENCODING_IBM_865, RTL_TEXTENCODING_INFO_MIME, true },
|
||||
#if 0
|
||||
{ RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_INFO_ASCII, true },
|
||||
{ RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_INFO_MIME, false },
|
||||
#endif
|
||||
{ RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_ASCII, false },
|
||||
{ RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_MIME, true },
|
||||
{ RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_SYMBOL, false },
|
||||
@ -2885,10 +2891,8 @@ void Test::testInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "rtl_textcvt");
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
||||
|
||||
}
|
||||
|
||||
NOADDITIONAL;
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Loading…
x
Reference in New Issue
Block a user