diff options
Diffstat (limited to 'Build/source/libs/icu-xetex/test')
233 files changed, 35816 insertions, 15688 deletions
diff --git a/Build/source/libs/icu-xetex/test/cintltst/Makefile.in b/Build/source/libs/icu-xetex/test/cintltst/Makefile.in index dbc74f5381c..490f9220503 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/Makefile.in +++ b/Build/source/libs/icu-xetex/test/cintltst/Makefile.in @@ -1,6 +1,10 @@ +#****************************************************************************** +# +# Copyright (C) 1999-2006, International Business Machines +# Corporation and others. All Rights Reserved. +# +#****************************************************************************** ## Makefile.in for ICU - test/cintltst -## Copyright (c) 1999-2005, International Business Machines Corporation and -## others. All Rights Reserved. ## Source directory information srcdir = @srcdir@ @@ -8,6 +12,7 @@ top_srcdir = @top_srcdir@ top_builddir = ../.. +## All the flags and other definitions are included here. include $(top_builddir)/icudefs.mk ## Build directory information @@ -20,8 +25,8 @@ CLEANFILES = *~ $(DEPS) TARGET = cintltst$(EXEEXT) # Oh, this hurts my sensibility. This is supposedly a C test and we need to -# link using a C++ compiler?! This must be done so that C++ static -# initialization works in the libraries, like mutex.cpp, ustdio and iostream. +# link using a C++ compiler?! This must be done so that library vtables +# work correctly on all platforms. ifneq ($(ENABLE_STATIC),) LINK = $(LINK.cc) @@ -37,8 +42,11 @@ BUILDDIR := $(BUILDDIR:test\\cintltst/../../=) # Simplify the path for Windows 98 BUILDDIR := $(BUILDDIR:TEST\\CINTLTST/../../=) +ifneq ($(top_builddir),$(top_srcdir)) +CPPFLAGS += -I$(top_builddir)/common +endif # we define ICU_UNICODE_VERSION so we can test it -CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil +CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil DEFS += -D'ICU_UNICODE_VERSION="$(UNICODE_VERSION)"' -D'ICU_VERSION="@VERSION@"' -D'ICUDATA_NAME="$(ICUDATA_PLATFORM_NAME)"' -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"' LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) @@ -50,13 +58,16 @@ cmsccoll.o cmsgtst.o cposxtst.o cldrtest.o \ cnmdptst.o cnormtst.o cnumtst.o crestst.o creststn.o cturtst.o \ cucdapi.o cucdtst.o custrtst.o cstrcase.o cutiltst.o nucnvtst.o nccbtst.o bocu1tst.o \ cbiditst.o cbididat.o eurocreg.o udatatst.o utf16tst.o utransts.o \ -ncnvfbts.o ncnvtst.o putiltst.o cstrtest.o utf8tst.o ucmptst.o \ +ncnvfbts.o ncnvtst.o putiltst.o cstrtest.o utf8tst.o \ stdnmtst.o ctstdep.o usrchtst.o custrtrn.o sorttest.o trietest.o usettest.o \ uenumtst.o utmstest.o currtest.o \ -idnatest.o nfsprep.o spreptst.o sprpdata.o hpmufn.o tracetst.o reapits.o utexttst.o +idnatest.o nfsprep.o spreptst.o sprpdata.o \ +hpmufn.o tracetst.o reapits.o utexttst.o ucsdetst.o DEPS = $(OBJECTS:.o=.d) +-include Makefile.local + ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ distclean distclean-local dist dist-local check check-local @@ -85,8 +96,6 @@ clean-local: distclean-local: clean-local $(RMV) Makefile --include Makefile.local - check-local: all-local $(INVOKE) ./$(TARGET) $(CINTLTST_OPTS) @@ -106,3 +115,4 @@ ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) endif endif endif + diff --git a/Build/source/libs/icu-xetex/test/cintltst/bocu1tst.c b/Build/source/libs/icu-xetex/test/cintltst/bocu1tst.c index f15d6eb02f6..0679752d272 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/bocu1tst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/bocu1tst.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2002-2003, International Business Machines +* Copyright (C) 2002-2005, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -15,7 +15,7 @@ * * This is the reference implementation of BOCU-1, * the MIME-friendly form of the Binary Ordered Compression for Unicode, -* taken directly from ### http://oss.software.ibm.com/cvs/icu/icuhtml/design/conversion/bocu1/ +* taken directly from ### http://dev.icu-project.org/cgi-bin/viewcvs.cgi/icuhtml/design/conversion/bocu1/ * The files bocu1.h and bocu1.c from the design folder are taken * verbatim (minus copyright and #include) and copied together into this file. * The reference code and some of the reference bocu1tst.c diff --git a/Build/source/libs/icu-xetex/test/cintltst/callcoll.c b/Build/source/libs/icu-xetex/test/cintltst/callcoll.c index 9d33828e28f..f57dc605a64 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/callcoll.c +++ b/Build/source/libs/icu-xetex/test/cintltst/callcoll.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -335,7 +335,8 @@ static void doTestVariant(UCollator* myCollation, const UChar source[], const UC partialSKResult = compareUsingPartials(myCollation, source, sLen, target, tLen, partialSizes[i], &status); if(partialSKResult != result) { - log_err("Partial sortkey comparison returned wrong result: %s, %s (size %i)\n", + log_err("Partial sortkey comparison returned wrong result (%i exp. %i): %s, %s (size %i)\n", + partialSKResult, result, aescstrdup(source,-1), aescstrdup(target,-1), partialSizes[i]); } @@ -608,9 +609,8 @@ void genericLocaleStarterWithResult(const char *locale, const char *s[], uint32_ ucol_close(coll); } -#if 0 /* currently not used with options */ -void genericRulesStarterWithOptions(const char *rules, const char *s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize) { +void genericRulesStarterWithOptionsAndResult(const char *rules, const char *s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result) { UErrorCode status = U_ZERO_ERROR; UChar rlz[RULE_BUFFER_LEN] = { 0 }; uint32_t rlen = u_unescape(rules, rlz, RULE_BUFFER_LEN); @@ -626,15 +626,14 @@ void genericRulesStarterWithOptions(const char *rules, const char *s[], uint32_t ucol_setAttribute(coll, attrs[i], values[i], &status); } - genericOrderingTest(coll, s, size); + genericOrderingTestWithResult(coll, s, size, result); } else { log_err("Unable to open collator with rules %s\n", rules); } ucol_close(coll); } -#endif -void genericLocaleStarterWithOptions(const char *locale, const char *s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize) { +void genericLocaleStarterWithOptionsAndResult(const char *locale, const char *s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result) { UErrorCode status = U_ZERO_ERROR; uint32_t i; @@ -649,14 +648,18 @@ void genericLocaleStarterWithOptions(const char *locale, const char *s[], uint32 ucol_setAttribute(coll, attrs[i], values[i], &status); } - genericOrderingTest(coll, s, size); + genericOrderingTestWithResult(coll, s, size, result); } else { log_err("Unable to open collator for locale %s\n", locale); } ucol_close(coll); } -void genericRulesTestWithResult(const char *rules, const char *s[], uint32_t size, UCollationResult result) { +void genericLocaleStarterWithOptions(const char *locale, const char *s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize) { + genericLocaleStarterWithOptionsAndResult(locale, s, size, attrs, values, attsize, UCOL_LESS); +} + +void genericRulesStarterWithResult(const char *rules, const char *s[], uint32_t size, UCollationResult result) { UErrorCode status = U_ZERO_ERROR; UChar rlz[RULE_BUFFER_LEN] = { 0 }; uint32_t rlen = u_unescape(rules, rlz, RULE_BUFFER_LEN); @@ -676,7 +679,7 @@ void genericRulesTestWithResult(const char *rules, const char *s[], uint32_t siz } void genericRulesStarter(const char *rules, const char *s[], uint32_t size) { - genericRulesTestWithResult(rules, s, size, UCOL_LESS); + genericRulesStarterWithResult(rules, s, size, UCOL_LESS); } static void TestTertiary() @@ -856,10 +859,8 @@ static void TestJB581(void) /* Now, do the same comparison with keys */ sourceKeyOut = ucol_getSortKey(myCollator, source, -1, sourceKeyArray, 100); targetKeyOut = ucol_getSortKey(myCollator, target, -1, targetKeyArray, 100); - result = 0; bufferLen = ((targetKeyOut > 100) ? 100 : targetKeyOut); - result = memcmp(sourceKeyArray, targetKeyArray, bufferLen); - if (result != 0) + if (memcmp(sourceKeyArray, targetKeyArray, bufferLen) != 0) { log_err("Comparing two strings with sort keys in C failed.\n"); } diff --git a/Build/source/libs/icu-xetex/test/cintltst/callcoll.h b/Build/source/libs/icu-xetex/test/cintltst/callcoll.h index 70cf316ab7c..af2cd940dba 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/callcoll.h +++ b/Build/source/libs/icu-xetex/test/cintltst/callcoll.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -42,8 +42,10 @@ void genericOrderingTest(UCollator *coll, const char *s[], uint32_t size); void genericLocaleStarter(const char *locale, const char *s[], uint32_t size); void genericLocaleStarterWithResult(const char *locale, const char *s[], uint32_t size, UCollationResult result); void genericLocaleStarterWithOptions(const char *locale, const char *s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize); -void genericRulesTestWithResult(const char *rules, const char *s[], uint32_t size, UCollationResult result); +void genericLocaleStarterWithOptionsAndResult(const char *locale, const char *s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result); +void genericRulesStarterWithResult(const char *rules, const char *s[], uint32_t size, UCollationResult result); void genericRulesStarter(const char *rules, const char *s[], uint32_t size); +void genericRulesStarterWithOptionsAndResult(const char *rules, const char *s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result); UBool hasCollationElements(const char *locName); diff --git a/Build/source/libs/icu-xetex/test/cintltst/calltest.c b/Build/source/libs/icu-xetex/test/cintltst/calltest.c index 3740b40e5c0..b9dc71875af 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/calltest.c +++ b/Build/source/libs/icu-xetex/test/cintltst/calltest.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1996-2005, International Business Machines Corporation and + * Copyright (c) 1996-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -28,7 +28,6 @@ void addUTF16Test(TestNode** root); void addUTF8Test(TestNode** root); void addUTransTest(TestNode** root); void addPUtilTest(TestNode** root); -void addCompactArrayTest(TestNode** root); void addTestDeprecatedAPI(TestNode** root); void addUCharTransformTest(TestNode** root); void addUSetTest(TestNode** root); @@ -38,6 +37,7 @@ void addHeapMutexTest(TestNode **root); void addUTraceTest(TestNode** root); void addURegexTest(TestNode** root); void addUTextTest(TestNode** root); +void addUCsdetTest(TestNode** root); void addAllTests(TestNode** root) @@ -50,7 +50,6 @@ void addAllTests(TestNode** root) addConvert(root); addUCharTransformTest(root); addStandardNamesTest(root); - addCompactArrayTest(root); #if !UCONFIG_NO_FORMATTING addFormatTest(root); #endif @@ -76,5 +75,6 @@ void addAllTests(TestNode** root) addURegexTest(root); #endif addUTextTest(root); + addUCsdetTest(root); } diff --git a/Build/source/libs/icu-xetex/test/cintltst/capitst.c b/Build/source/libs/icu-xetex/test/cintltst/capitst.c index b43f4cefef6..b989eef8d62 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/capitst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/capitst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -281,9 +281,12 @@ void TestProperty() ICU 2.4 currVersionArray = {0x21, 0x40, 0x04, 0x04}; ICU 2.6 currVersionArray = {0x21, 0x40, 0x03, 0x03}; ICU 2.8 currVersionArray = {0x29, 0x80, 0x00, 0x04}; + ICU 3.4 currVersionArray = {0x31, 0xC0, 0x00, 0x04}; */ - UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x04}; - UVersionInfo currUCAVersionArray = {4, 1, 0, 0}; + UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x05}; + /* ICU 3.4 had UCA 4.1 */ + /*UVersionInfo currUCAVersionArray = {4, 1, 0, 0};*/ + UVersionInfo currUCAVersionArray = {5, 0, 0, 0}; UVersionInfo versionArray = {0, 0, 0, 0}; UVersionInfo versionUCAArray = {0, 0, 0, 0}; @@ -637,11 +640,13 @@ void TestDecomposition() { ucol_close(vi_VN); } -#define CLONETEST_COLLATOR_COUNT 3 +#define CLONETEST_COLLATOR_COUNT 4 void TestSafeClone() { UChar* test1; UChar* test2; + static const UChar umlautUStr[] = {0x00DC, 0}; + static const UChar oeStr[] = {0x0055, 0x0045, 0}; UCollator * someCollators [CLONETEST_COLLATOR_COUNT]; UCollator * someClonedCollators [CLONETEST_COLLATOR_COUNT]; UCollator * col; @@ -649,6 +654,8 @@ void TestSafeClone() { int8_t testSize = 6; /* Leave this here to test buffer alingment in memory*/ uint8_t buffer [CLONETEST_COLLATOR_COUNT] [U_COL_SAFECLONE_BUFFERSIZE]; int32_t bufferSize = U_COL_SAFECLONE_BUFFERSIZE; + const char sampleRuleChars[] = "&Z < CH"; + UChar sampleRule[sizeof(sampleRuleChars)]; int index; if (TestBufferSize()) { @@ -660,14 +667,16 @@ void TestSafeClone() { test2=(UChar*)malloc(sizeof(UChar) * testSize); u_uastrcpy(test1, "abCda"); u_uastrcpy(test2, "abcda"); + u_uastrcpy(sampleRule, sampleRuleChars); /* one default collator & two complex ones */ someCollators[0] = ucol_open("en_US", &err); someCollators[1] = ucol_open("ko", &err); someCollators[2] = ucol_open("ja_JP", &err); + someCollators[3] = ucol_openRules(sampleRule, -1, UCOL_ON, UCOL_TERTIARY, NULL, &err); if(U_FAILURE(err)) { - log_data_err("Couldn't open one or more collators\n"); - return; + log_data_err("Couldn't open one or more collators\n"); + return; } /* Check the various error & informational states: */ @@ -736,23 +745,60 @@ void TestSafeClone() { err = U_ZERO_ERROR; + /* Test that a cloned collator doesn't accidentally use UCA. */ + col=ucol_open("de@collation=phonebook", &err); + bufferSize = U_COL_SAFECLONE_BUFFERSIZE; + someClonedCollators[0] = ucol_safeClone(col, buffer[0], &bufferSize, &err); + doAssert( (ucol_greater(col, umlautUStr, u_strlen(umlautUStr), oeStr, u_strlen(oeStr))), "Original German phonebook collation sorts differently than expected"); + doAssert( (ucol_greater(someClonedCollators[0], umlautUStr, u_strlen(umlautUStr), oeStr, u_strlen(oeStr))), "Cloned German phonebook collation sorts differently than expected"); + if (!ucol_equals(someClonedCollators[0], col)) { + log_err("FAIL: Cloned German phonebook collator is not equal to original.\n"); + } + ucol_close(col); + ucol_close(someClonedCollators[0]); + + err = U_ZERO_ERROR; + /* change orig & clone & make sure they are independent */ for (index = 0; index < CLONETEST_COLLATOR_COUNT; index++) { + ucol_setStrength(someCollators[index], UCOL_IDENTICAL); + bufferSize = 1; + err = U_ZERO_ERROR; + ucol_close(ucol_safeClone(someCollators[index], buffer[index], &bufferSize, &err)); + if (err != U_SAFECLONE_ALLOCATED_WARNING) { + log_err("FAIL: collator number %d was not allocated.\n", index); + } + bufferSize = U_COL_SAFECLONE_BUFFERSIZE; + err = U_ZERO_ERROR; someClonedCollators[index] = ucol_safeClone(someCollators[index], buffer[index], &bufferSize, &err); + if (someClonedCollators[index] == NULL + || someClonedCollators[index] < (UCollator *)buffer[index] + || someClonedCollators[index] > (UCollator *)(buffer[index]+(U_COL_SAFECLONE_BUFFERSIZE-1))) + { + log_err("FAIL: Cloned collator didn't use provided buffer.\n"); + return; + } + if (!ucol_equals(someClonedCollators[index], someCollators[index])) { + log_err("FAIL: Cloned collator is not equal to original at index = %d.\n", index); + } - ucol_setStrength(someClonedCollators[index], UCOL_TERTIARY); + /* Check the usability */ ucol_setStrength(someCollators[index], UCOL_PRIMARY); - ucol_setAttribute(someClonedCollators[index], UCOL_CASE_LEVEL, UCOL_OFF, &err); ucol_setAttribute(someCollators[index], UCOL_CASE_LEVEL, UCOL_OFF, &err); - doAssert( (ucol_greater(someClonedCollators[index], test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"abCda\" >>> \"abcda\" "); doAssert( (ucol_equal(someCollators[index], test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"abcda\" == \"abCda\""); - ucol_close(someClonedCollators[index]); + /* Close the original to make sure that the clone is usable. */ ucol_close(someCollators[index]); + + ucol_setStrength(someClonedCollators[index], UCOL_TERTIARY); + ucol_setAttribute(someClonedCollators[index], UCOL_CASE_LEVEL, UCOL_OFF, &err); + doAssert( (ucol_greater(someClonedCollators[index], test1, u_strlen(test1), test2, u_strlen(test2))), "Result should be \"abCda\" >>> \"abcda\" "); + + ucol_close(someClonedCollators[index]); } free(test1); free(test2); @@ -818,10 +864,12 @@ void TestSortKey() { uint8_t *sortk1 = NULL, *sortk2 = NULL, *sortk3 = NULL, *sortkEmpty = NULL; uint8_t sortk2_compat[] = { - /* 3.4 key, UCA 4.1 */ - 0x28, 0x2a, 0x2c, 0x2e, 0x28, 0x01, - 0x09, 0x01, 0x09, 0x01, 0x27, 0x01, - 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 + /* 3.6 key, from UCA 5.0 */ + 0x29, 0x2b, 0x2d, 0x2f, 0x29, 0x01, + 0x09, 0x01, 0x09, 0x01, 0x28, 0x01, + 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 + /* 3.4 key, from UCA 4.1 */ + /* 0x28, 0x2a, 0x2c, 0x2e, 0x28, 0x01, 0x09, 0x01, 0x09, 0x01, 0x27, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 */ /* 2.6.1 key */ /* 0x26, 0x28, 0x2A, 0x2C, 0x26, 0x01, 0x09, 0x01, 0x09, 0x01, 0x25, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 */ /* 2.2 key */ @@ -1788,7 +1836,7 @@ static void TestShortString(void) int32_t expectedOffset; uint32_t expectedIdentifier; } testCases[] = { - {"LDE_RDE_KPHONEBOOK_T0041_ZLATN","B2800_KPHONEBOOK_LDE", "de@collation=phonebook", U_USING_FALLBACK_WARNING, 0, 0 }, + {"LDE_RDE_KPHONEBOOK_T0041_ZLATN","B2900_KPHONEBOOK_LDE", "de@collation=phonebook", U_USING_FALLBACK_WARNING, 0, 0 }, {"LEN_RUS_NO_AS_S4","AS_LEN_NO_S4", NULL, U_USING_FALLBACK_WARNING, 0, 0 }, {"LDE_VPHONEBOOK_EO_SI","EO_KPHONEBOOK_LDE_SI", "de@collation=phonebook", U_ZERO_ERROR, 0, 0 }, {"LDE_Kphonebook","KPHONEBOOK_LDE", "de@collation=phonebook", U_ZERO_ERROR, 0, 0 }, @@ -2043,7 +2091,14 @@ TestOpenBinary(void) uint8_t *image = imageBuffer; int32_t imageBufferCapacity = 32768; - int32_t imageSize = ucol_cloneBinary(coll, image, imageBufferCapacity, &status); + int32_t imageSize; + + if((coll==NULL)||(UCA==NULL)||(U_FAILURE(status))) { + log_data_err("could not load collators or error occured: %s\n", + u_errorName(status)); + return; + } + imageSize = ucol_cloneBinary(coll, image, imageBufferCapacity, &status); if(U_FAILURE(status)) { image = (uint8_t *)malloc(imageSize*sizeof(uint8_t)); status = U_ZERO_ERROR; diff --git a/Build/source/libs/icu-xetex/test/cintltst/cbiapts.c b/Build/source/libs/icu-xetex/test/cintltst/cbiapts.c index 45e2389607b..fe597ae1857 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cbiapts.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cbiapts.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -190,11 +190,11 @@ static void TestBreakIteratorCAPI() /*trying to open an illegal iterator*/ bogus = ubrk_open((UBreakIteratorType)5, "en_US", text, u_strlen(text), &status); if(U_SUCCESS(status)){ - log_err("FAIL: Error in ubrk_open() for BOGUS breakiterator. Expected U_MEMORY_ALLOCATION_ERROR\n"); + log_err("FAIL: Error in ubrk_open() for BOGUS breakiterator. Expected U_ILLEGAL_ARGUMENT_ERROR\n"); } if(U_FAILURE(status)){ - if(status != U_MEMORY_ALLOCATION_ERROR){ - log_err("FAIL: Error in ubrk_open() for BOGUS breakiterator. Expected U_MEMORY_ALLOCATION_ERROR\n Got %s\n", myErrorName(status)); + if(status != U_ILLEGAL_ARGUMENT_ERROR){ + log_err("FAIL: Error in ubrk_open() for BOGUS breakiterator. Expected U_ILLEGAL_ARGUMENT_ERROR\n Got %s\n", myErrorName(status)); } } status=U_ZERO_ERROR; diff --git a/Build/source/libs/icu-xetex/test/cintltst/cbiditst.c b/Build/source/libs/icu-xetex/test/cintltst/cbiditst.c index 7767bd820fe..bf7dab2d74e 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cbiditst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cbiditst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* file name: cbiditst.cpp @@ -18,10 +18,12 @@ #include "unicode/ustring.h" #include "unicode/ubidi.h" #include "unicode/ushape.h" -#include "cmemory.h" #include "cbiditst.h" #include "cstring.h" +/* the following include is needed for sprintf */ +#include <stdio.h> +#define MAXLEN MAX_STRING_LENGTH #define LENGTHOF(array) (sizeof(array)/sizeof((array)[0])) /* prototypes ---------------------------------------------------------------*/ @@ -71,6 +73,25 @@ static void TestFailureRecovery(void); static void TestMultipleParagraphs(void); +/* new BIDI API */ +static void doReorderingModeBidiTest(void); +static void doReorderRunsTest(void); +static void doBidiStreamingTest(void); +static void doBidiClassOverrideTest(void); +static const char* inverseBasic(UBiDi *pBiDi, const UChar *src, int32_t srcLen, + uint32_t option, UBiDiLevel level, char *result); +static UBool assertRoundTrip(UBiDi *pBiDi, int32_t tc, int32_t outIndex, + const char *srcChars, const char *destChars, + const UChar *dest, int32_t destLen, int mode, + int option, UBiDiLevel level); +static UBool checkResultLength(UBiDi *pBiDi, const char *srcChars, + const char *destChars, const UChar *dest, + int32_t destLen, const char *mode, + const char *option, UBiDiLevel level); +static UBool testMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, + const char *dest, const char *mode, const char* option, + UBiDiLevel level, UBool forward); + /* helpers ------------------------------------------------------------------ */ static const char *levelString="..............................................................."; @@ -79,7 +100,7 @@ static void initCharFromDirProps(void); static UChar * -getStringFromDirProps(const uint8_t *dirProps, int32_t length); +getStringFromDirProps(const uint8_t *dirProps, int32_t length, UChar *buffer); static void printUnicode(const UChar *s, int32_t length, const UBiDiLevel *levels); @@ -96,6 +117,11 @@ addComplexTest(TestNode** root) { addTest(root, TestReorder,"complex/bidi/TestReorder"); addTest(root, TestFailureRecovery,"complex/bidi/TestFailureRecovery"); addTest(root, TestMultipleParagraphs,"complex/bidi/multipleParagraphs"); + addTest(root, doReorderingModeBidiTest, "complex/bidi/TestReorderingMode"); + addTest(root, doReorderRunsTest, "complex/bidi/TestReorderRunsOnly"); + addTest(root, doBidiStreamingTest, "complex/bidi/TestStreamingMode"); + addTest(root, doBidiClassOverrideTest, "complex/bidi/TestClassOverride"); + addTest(root, doArabicShapingTest, "complex/arabic-shaping/ArabicShapingTest"); addTest(root, doLamAlefSpecialVLTRArabicShapingTest, "complex/arabic-shaping/lamalef"); addTest(root, doTashkeelSpecialVLTRArabicShapingTest, "complex/arabic-shaping/tashkeel"); @@ -111,7 +137,7 @@ charFromDirPropTest(void) { for(i=0; i<U_CHAR_DIRECTION_COUNT; ++i) { if(u_charDirection(charFromDirProp[i])!=(UCharDirection)i) { - log_err("u_charDirection(charFromDirProp[%d]=U+%04x)==%d!=%d\n", + log_err("\nu_charDirection(charFromDirProp[%d]=U+%04x)==%d!=%d\n", i, charFromDirProp[i], u_charDirection(charFromDirProp[i]), i); } } @@ -122,9 +148,9 @@ doBiDiTest() { UBiDi *pBiDi, *pLine=NULL; UErrorCode errorCode=U_ZERO_ERROR; - log_verbose("*** bidi regression test ***\n"); + log_verbose("\n*** bidi regression test ***\n"); - pBiDi=ubidi_openSized(MAX_STRING_LENGTH, 0, &errorCode); + pBiDi=ubidi_openSized(MAXLEN, 0, &errorCode); if(pBiDi!=NULL) { pLine=ubidi_open(); if(pLine!=NULL) { @@ -144,22 +170,22 @@ doBiDiTest() { ubidi_close(pBiDi); } - log_verbose("*** bidi regression test finished ***\n"); + log_verbose("\n*** bidi regression test finished ***\n"); } static void doTests(UBiDi *pBiDi, UBiDi *pLine, UBool countRunsFirst) { int i; - UChar *s; + UChar string[MAXLEN]; UErrorCode errorCode; int32_t lineStart; UBiDiLevel paraLevel; for(i=0; i<bidiTestCount; ++i) { errorCode=U_ZERO_ERROR; - s=getStringFromDirProps(tests[i].text, tests[i].length); + getStringFromDirProps(tests[i].text, tests[i].length, string); paraLevel=tests[i].paraLevel; - ubidi_setPara(pBiDi, s, -1, paraLevel, NULL, &errorCode); + ubidi_setPara(pBiDi, string, -1, paraLevel, NULL, &errorCode); if(U_SUCCESS(errorCode)) { log_verbose("ubidi_setPara(tests[%d], paraLevel %d) ok, direction %d paraLevel=%d\n", i, paraLevel, ubidi_getDirection(pBiDi), ubidi_getParaLevel(pBiDi)); @@ -183,102 +209,268 @@ doTests(UBiDi *pBiDi, UBiDi *pLine, UBool countRunsFirst) { } } } + +static const char columns[62] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + +#define TABLE_SIZE 256 +static UBool tablesInitialized = FALSE; +static UChar pseudoToUChar[TABLE_SIZE]; +static uint8_t UCharToPseudo[TABLE_SIZE]; /* used for Unicode chars < 0x0100 */ +static uint8_t UCharToPseud2[TABLE_SIZE]; /* used for Unicode chars >=0x0100 */ + +static void buildPseudoTables(void) +/* + The rules for pseudo-Bidi are as follows: + - [ == LRE + - ] == RLE + - { == LRO + - } == RLO + - ^ == PDF + - @ == LRM + - & == RLM + - A-F == Arabic Letters 0631-0636 + - G-Z == Hebrew letters 05d7-05ea + - 0-5 == western digits 0030-0035 + - 6-9 == Arabic-Indic digits 0666-0669 + - ` == Combining Grave Accent 0300 (NSM) + - ~ == Delete 007f (BN) + - | == Paragraph Separator 2029 (B) + - _ == Info Separator 1 001f (S) + All other characters represent themselves as Latin-1, with the corresponding + Bidi properties. +*/ +{ + int i; + UChar uchar; + uint8_t c; + /* initialize all tables to unknown */ + for (i=0; i < TABLE_SIZE; i++) { + pseudoToUChar[i] = 0xFFFD; + UCharToPseudo[i] = '?'; + UCharToPseud2[i] = '?'; + } + /* initialize non letters or digits */ + pseudoToUChar[(uint8_t) 0 ] = 0x0000; UCharToPseudo[0x00] = (uint8_t) 0 ; + pseudoToUChar[(uint8_t)' '] = 0x0020; UCharToPseudo[0x20] = (uint8_t)' '; + pseudoToUChar[(uint8_t)'!'] = 0x0021; UCharToPseudo[0x21] = (uint8_t)'!'; + pseudoToUChar[(uint8_t)'"'] = 0x0022; UCharToPseudo[0x22] = (uint8_t)'"'; + pseudoToUChar[(uint8_t)'#'] = 0x0023; UCharToPseudo[0x23] = (uint8_t)'#'; + pseudoToUChar[(uint8_t)'$'] = 0x0024; UCharToPseudo[0x24] = (uint8_t)'$'; + pseudoToUChar[(uint8_t)'%'] = 0x0025; UCharToPseudo[0x25] = (uint8_t)'%'; + pseudoToUChar[(uint8_t)'\'']= 0x0027; UCharToPseudo[0x27] = (uint8_t)'\''; + pseudoToUChar[(uint8_t)'('] = 0x0028; UCharToPseudo[0x28] = (uint8_t)'('; + pseudoToUChar[(uint8_t)')'] = 0x0029; UCharToPseudo[0x29] = (uint8_t)')'; + pseudoToUChar[(uint8_t)'*'] = 0x002A; UCharToPseudo[0x2A] = (uint8_t)'*'; + pseudoToUChar[(uint8_t)'+'] = 0x002B; UCharToPseudo[0x2B] = (uint8_t)'+'; + pseudoToUChar[(uint8_t)','] = 0x002C; UCharToPseudo[0x2C] = (uint8_t)','; + pseudoToUChar[(uint8_t)'-'] = 0x002D; UCharToPseudo[0x2D] = (uint8_t)'-'; + pseudoToUChar[(uint8_t)'.'] = 0x002E; UCharToPseudo[0x2E] = (uint8_t)'.'; + pseudoToUChar[(uint8_t)'/'] = 0x002F; UCharToPseudo[0x2F] = (uint8_t)'/'; + pseudoToUChar[(uint8_t)':'] = 0x003A; UCharToPseudo[0x3A] = (uint8_t)':'; + pseudoToUChar[(uint8_t)';'] = 0x003B; UCharToPseudo[0x3B] = (uint8_t)';'; + pseudoToUChar[(uint8_t)'<'] = 0x003C; UCharToPseudo[0x3C] = (uint8_t)'<'; + pseudoToUChar[(uint8_t)'='] = 0x003D; UCharToPseudo[0x3D] = (uint8_t)'='; + pseudoToUChar[(uint8_t)'>'] = 0x003E; UCharToPseudo[0x3E] = (uint8_t)'>'; + pseudoToUChar[(uint8_t)'?'] = 0x003F; UCharToPseudo[0x3F] = (uint8_t)'?'; + pseudoToUChar[(uint8_t)'\\']= 0x005C; UCharToPseudo[0x5C] = (uint8_t)'\\'; + /* initialize specially used characters */ + pseudoToUChar[(uint8_t)'`'] = 0x0300; UCharToPseud2[0x00] = (uint8_t)'`'; /* NSM */ + pseudoToUChar[(uint8_t)'@'] = 0x200E; UCharToPseud2[0x0E] = (uint8_t)'@'; /* LRM */ + pseudoToUChar[(uint8_t)'&'] = 0x200F; UCharToPseud2[0x0F] = (uint8_t)'&'; /* RLM */ + pseudoToUChar[(uint8_t)'_'] = 0x001F; UCharToPseudo[0x1F] = (uint8_t)'_'; /* S */ + pseudoToUChar[(uint8_t)'|'] = 0x2029; UCharToPseud2[0x29] = (uint8_t)'|'; /* B */ + pseudoToUChar[(uint8_t)'['] = 0x202A; UCharToPseud2[0x2A] = (uint8_t)'['; /* LRE */ + pseudoToUChar[(uint8_t)']'] = 0x202B; UCharToPseud2[0x2B] = (uint8_t)']'; /* RLE */ + pseudoToUChar[(uint8_t)'^'] = 0x202C; UCharToPseud2[0x2C] = (uint8_t)'^'; /* PDF */ + pseudoToUChar[(uint8_t)'{'] = 0x202D; UCharToPseud2[0x2D] = (uint8_t)'{'; /* LRO */ + pseudoToUChar[(uint8_t)'}'] = 0x202E; UCharToPseud2[0x2E] = (uint8_t)'}'; /* RLO */ + pseudoToUChar[(uint8_t)'~'] = 0x007F; UCharToPseudo[0x7F] = (uint8_t)'~'; /* BN */ + /* initialize western digits */ + for (i = 0, uchar = 0x0030; i < 6; i++, uchar++) { + c = (uint8_t)columns[i]; + pseudoToUChar[c] = uchar; + UCharToPseudo[uchar & 0x00ff] = c; + } + /* initialize Hindi digits */ + for (i = 6, uchar = 0x0666; i < 10; i++, uchar++) { + c = (uint8_t)columns[i]; + pseudoToUChar[c] = uchar; + UCharToPseud2[uchar & 0x00ff] = c; + } + /* initialize Arabic letters */ + for (i = 10, uchar = 0x0631; i < 16; i++, uchar++) { + c = (uint8_t)columns[i]; + pseudoToUChar[c] = uchar; + UCharToPseud2[uchar & 0x00ff] = c; + } + /* initialize Hebrew letters */ + for (i = 16, uchar = 0x05D7; i < 36; i++, uchar++) { + c = (uint8_t)columns[i]; + pseudoToUChar[c] = uchar; + UCharToPseud2[uchar & 0x00ff] = c; + } + /* initialize Latin lower case letters */ + for (i = 36, uchar = 0x0061; i < 62; i++, uchar++) { + c = (uint8_t)columns[i]; + pseudoToUChar[c] = uchar; + UCharToPseudo[uchar & 0x00ff] = c; + } + tablesInitialized = TRUE; +} + +/*----------------------------------------------------------------------*/ + +static int pseudoToU16( const int length, const char * input, UChar * output ) +/* This function converts a pseudo-Bidi string into a UChar string. + It returns the length of the UChar string. +*/ +{ + int i; + if (!tablesInitialized) { + buildPseudoTables(); + } + for (i = 0; i < length; i++) + output[i] = pseudoToUChar[(uint8_t)input[i]]; + return length; +} + +/*----------------------------------------------------------------------*/ + +static int u16ToPseudo( const int length, const UChar * input, char * output ) +/* This function converts a UChar string into a pseudo-Bidi string. + It returns the length of the pseudo-Bidi string. +*/ +{ + int i; + UChar uchar; + if (!tablesInitialized) { + buildPseudoTables(); + } + for (i = 0; i < length; i++) + { + uchar = input[i]; + output[i] = uchar < 0x0100 ? UCharToPseudo[uchar] : + UCharToPseud2[uchar & 0x00ff]; + } + output[length] = '\0'; + return length; +} + +static char * formatLevels(UBiDi *bidi, char *buffer) { + UErrorCode ec = U_ZERO_ERROR; + const UBiDiLevel* gotLevels = ubidi_getLevels(bidi, &ec); + int len = ubidi_getLength(bidi); + char c; + int i, k; + + if(U_FAILURE(ec)) { + strcpy(buffer, "BAD LEVELS"); + return buffer; + } + for (i=0; i<len; i++) { + k = gotLevels[i]; + if (k >= sizeof columns) + c = '+'; + else + c = columns[k]; + buffer[i] = c; + } + buffer[len] = '\0'; + return buffer; +} + static void TestReorder(){ static const char* const logicalOrder[] ={ - "DEL(\\u062F\\u0625)ADD(\\u062F.\\u0625.\\u200F)", - "DEL(\\u0645\\u0627\\u064A\\u0648) ADD(\\u0623\\u064A\\u0627\\u0631)", - "DEL(\\u0644\\u0644)ADD(\\u0644.\\u0644.\\u0029\\u0644)\\u0644.\\u200F", - "DEL(\\u0631\\u064A)ADD(\\u0631.\\u064A.) \\u0631.\\u064A.\\u200F", - "DAY 2 \\u0646 \\u0627\\u0644\\u0627\\u062B\\u0646\\u064A\\u0646 DAYABBR", - "DAY 3 \\u062B \\u0627\\u0644\\u062B\\u0644\\u0627\\u062B\\u0627\\u0621 DAYABBR", - "DAY 4 \\u0631 \\u0627\\u0644\\u0623\\u0631\\u0628\\u0639\\u0627\\u0621 DAYABBR", - "DAY 5 \\u062E \\u0627\\u0644\\u062E\\u0645\\u064A\\u0633 DAYABBR", - "DAY 6 \\u062C \\u0627\\u0644\\u062C\\u0645\\u0639\\u0629 DAYABBR", - "DAY 7 \\u0633 \\u0627\\u0644\\u0633\\u0628\\u062A DAYABBR", - "HELLO\\u0627\\u0644\\u0633\\u0628\\u062A", + "del(KC)add(K.C.&)", + "del(QDVT) add(BVDL)", + "del(PQ)add(R.S.)T)U.&", + "del(LV)add(L.V.) L.V.&", + "day 0 R DPDHRVR dayabbr", + "day 1 H DPHPDHDA dayabbr", + "day 2 L DPBLENDA dayabbr", + "day 3 J DPJQVM dayabbr", + "day 4 I DPIQNF dayabbr", + "day 5 M DPMEG dayabbr", + "helloDPMEG", }; static const char* const visualOrder[]={ - "DEL(\\u0625\\u062F)ADD(\\u200F.\\u0625.\\u062F)", - "DEL(\\u0648\\u064A\\u0627\\u0645) ADD(\\u0631\\u0627\\u064A\\u0623)", - "DEL(\\u0644\\u0644)ADD(\\u0644\\u0029.\\u0644.\\u0644)\\u200F.\\u0644", - /* I am doutful about this... - * what I would expect is : - * DEL(\\u064A\\u0631)ADD(.\\u064A.\\u0631) \\u200F.\\u064A.\\u0631 - */ - "DEL(\\u064A\\u0631)ADD(\\u200F.\\u064A.\\u0631 (.\\u064A.\\u0631", - "DAY 2 \\u0646\\u064A\\u0646\\u062B\\u0627\\u0644\\u0627 \\u0646 DAYABBR", - "DAY 3 \\u0621\\u0627\\u062B\\u0627\\u0644\\u062B\\u0644\\u0627 \\u062B DAYABBR", - "DAY 4 \\u0621\\u0627\\u0639\\u0628\\u0631\\u0623\\u0644\\u0627 \\u0631 DAYABBR", - "DAY 5 \\u0633\\u064A\\u0645\\u062E\\u0644\\u0627 \\u062E DAYABBR", - "DAY 6 \\u0629\\u0639\\u0645\\u062C\\u0644\\u0627 \\u062C DAYABBR", - "DAY 7 \\u062A\\u0628\\u0633\\u0644\\u0627 \\u0633 DAYABBR", - "HELLO\\u062A\\u0628\\u0633\\u0644\\u0627", + "del(CK)add(&.C.K)", + "del(TVDQ) add(LDVB)", + "del(QP)add(&.U(T(.S.R", + "del(VL)add(&.V.L (.V.L", + "day 0 RVRHDPD R dayabbr", + "day 1 ADHDPHPD H dayabbr", + "day 2 ADNELBPD L dayabbr", + "day 3 MVQJPD J dayabbr", + "day 4 FNQIPD I dayabbr", + "day 5 GEMPD M dayabbr", + "helloGEMPD", }; static const char* const visualOrder1[]={ - ")\\u062F.\\u0625.\\u200F(DDA)\\u062F\\u0625(LED", - ")\\u0623\\u064A\\u0627\\u0631(DDA )\\u0645\\u0627\\u064A\\u0648(LED", - "\\u0644.\\u0644.(\\u0644(\\u0644.\\u200F(DDA)\\u0644\\u0644(LED", - "\\u0631.\\u064A.( \\u0631.\\u064A.\\u200F(DDA)\\u0631\\u064A(LED", - "RBBAYAD \\u0646 \\u0627\\u0644\\u0627\\u062B\\u0646\\u064A\\u0646 2 YAD", - "RBBAYAD \\u062B \\u0627\\u0644\\u062B\\u0644\\u0627\\u062B\\u0627\\u0621 3 YAD", - "RBBAYAD \\u0631 \\u0627\\u0644\\u0623\\u0631\\u0628\\u0639\\u0627\\u0621 4 YAD", - "RBBAYAD \\u062E \\u0627\\u0644\\u062E\\u0645\\u064A\\u0633 5 YAD", - "RBBAYAD \\u062C \\u0627\\u0644\\u062C\\u0645\\u0639\\u0629 6 YAD", - "RBBAYAD \\u0633 \\u0627\\u0644\\u0633\\u0628\\u062A 7 YAD", - "\\u0627\\u0644\\u0633\\u0628\\u062AOLLEH", + ")K.C.&(dda)KC(led", + ")BVDL(dda )QDVT(led", + "R.S.(T(U.&(dda)PQ(led", + "L.V.( L.V.&(dda)LV(led", + "rbbayad R DPDHRVR 0 yad", + "rbbayad H DPHPDHDA 1 yad", + "rbbayad L DPBLENDA 2 yad", + "rbbayad J DPJQVM 3 yad", + "rbbayad I DPIQNF 4 yad", + "rbbayad M DPMEG 5 yad", + "DPMEGolleh", }; static const char* const visualOrder2[]={ - "\\u200E)\\u200E\\u062F.\\u0625.\\u200F\\u200E(DDA)\\u200E\\u062F\\u0625\\u200E(LED", - "\\u200E)\\u200E\\u0623\\u064A\\u0627\\u0631\\u200E(DDA )\\u200E\\u0645\\u0627\\u064A\\u0648\\u200E(LED", - "\\u0644.\\u0644.)\\u0644)\\u0644.\\u200F\\u200E(DDA)\\u200E\\u0644\\u0644\\u200E(LED", - "\\u0631.\\u064A.) \\u0631.\\u064A.\\u200F\\u200E(DDA)\\u200E\\u0631\\u064A\\u200E(LED", - "RBBAYAD \\u200E\\u0646 \\u0627\\u0644\\u0627\\u062B\\u0646\\u064A\\u0646\\u200E 2 YAD", - "RBBAYAD \\u200E\\u062B \\u0627\\u0644\\u062B\\u0644\\u0627\\u062B\\u0627\\u0621\\u200E 3 YAD", - "RBBAYAD \\u200E\\u0631 \\u0627\\u0644\\u0623\\u0631\\u0628\\u0639\\u0627\\u0621\\u200E 4 YAD", - "RBBAYAD \\u200E\\u062E \\u0627\\u0644\\u062E\\u0645\\u064A\\u0633\\u200E 5 YAD", - "RBBAYAD \\u200E\\u062C \\u0627\\u0644\\u062C\\u0645\\u0639\\u0629\\u200E 6 YAD", - "RBBAYAD \\u200E\\u0633 \\u0627\\u0644\\u0633\\u0628\\u062A\\u200E 7 YAD", - "\\u0627\\u0644\\u0633\\u0628\\u062AOLLEH", + "@)@K.C.&@(dda)@KC@(led", + "@)@BVDL@(dda )@QDVT@(led", + "R.S.)T)U.&@(dda)@PQ@(led", + "L.V.) L.V.&@(dda)@LV@(led", + "rbbayad @R DPDHRVR@ 0 yad", + "rbbayad @H DPHPDHDA@ 1 yad", + "rbbayad @L DPBLENDA@ 2 yad", + "rbbayad @J DPJQVM@ 3 yad", + "rbbayad @I DPIQNF@ 4 yad", + "rbbayad @M DPMEG@ 5 yad", + "DPMEGolleh", }; static const char* const visualOrder3[]={ - ")\\u062F.\\u0625.\\u200F(DDA)\\u062F\\u0625(LED", - ")\\u0623\\u064A\\u0627\\u0631(DDA )\\u0645\\u0627\\u064A\\u0648(LED", - "\\u0644.\\u0644.)\\u0644)\\u0644.\\u200F(\\u0644\\u0644)DDA(LED", - "\\u0631.\\u064A.) \\u0631.\\u064A.\\u200F(\\u0631\\u064A)DDA(LED", - "RBBAYAD \\u0627\\u0644\\u0627\\u062B\\u0646\\u064A\\u0646 \\u0646 2 YAD", - "RBBAYAD \\u0627\\u0644\\u062B\\u0644\\u0627\\u062B\\u0627\\u0621 \\u062B 3 YAD", - "RBBAYAD \\u0627\\u0644\\u0623\\u0631\\u0628\\u0639\\u0627\\u0621 \\u0631 4 YAD", - "RBBAYAD \\u0627\\u0644\\u062E\\u0645\\u064A\\u0633 \\u062E 5 YAD", - "RBBAYAD \\u0627\\u0644\\u062C\\u0645\\u0639\\u0629 \\u062C", - "RBBAYAD \\u0627\\u0644\\u0633\\u0628\\u062A \\u0633 7 YAD", - "\\u0627\\u0644\\u0633\\u0628\\u062AOLLEH" + ")K.C.&(KC)dda(led", + ")BVDL(ddaQDVT) (led", + "R.S.)T)U.&(PQ)dda(led", + "L.V.) L.V.&(LV)dda(led", + "rbbayad DPDHRVR R 0 yad", + "rbbayad DPHPDHDA H 1 yad", + "rbbayad DPBLENDA L 2 yad", + "rbbayad DPJQVM J 3 yad", + "rbbayad DPIQNF I 4 yad", + "rbbayad DPMEG M 5 yad", + "DPMEGolleh" }; static const char* const visualOrder4[]={ - "DEL(ADD(\\u0625\\u062F(.\\u0625.\\u062F)", - "DEL( (\\u0648\\u064A\\u0627\\u0645ADD(\\u0631\\u0627\\u064A\\u0623)", - "DEL(ADD(\\u0644\\u0644(.\\u0644(\\u0644(.\\u0644.\\u0644", - "DEL(ADD(\\u064A\\u0631(.\\u064A.\\u0631 (.\\u064A.\\u0631", - "DAY 2 \\u0646 \\u0646\\u064A\\u0646\\u062B\\u0627\\u0644\\u0627 DAYABBR", - "DAY 3 \\u062B \\u0621\\u0627\\u062B\\u0627\\u0644\\u062B\\u0644\\u0627 DAYABBR", - "DAY 4 \\u0631 \\u0621\\u0627\\u0639\\u0628\\u0631\\u0623\\u0644\\u0627 DAYABBR", - "DAY 5 \\u062E \\u0633\\u064A\\u0645\\u062E\\u0644\\u0627 DAYABBR", - "DAY 6 \\u062C \\u0629\\u0639\\u0645\\u062C\\u0644\\u0627 DAYABBR", - "DAY 7 \\u0633 \\u062A\\u0628\\u0633\\u0644\\u0627 DAYABBR ", - "HELLO\\u062A\\u0628\\u0633\\u0644\\u0627" + "del(add(CK(.C.K)", + "del( (TVDQadd(LDVB)", + "del(add(QP(.U(T(.S.R", + "del(add(VL(.V.L (.V.L", + "day 0 R RVRHDPD dayabbr", + "day 1 H ADHDPHPD dayabbr", + "day 2 L ADNELBPD dayabbr", + "day 3 J MVQJPD dayabbr", + "day 4 I FNQIPD dayabbr", + "day 5 M GEMPD dayabbr", + "helloGEMPD" }; + char formatChars[MAXLEN]; UErrorCode ec = U_ZERO_ERROR; UBiDi* bidi = ubidi_open(); - int i=0; - for(;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){ - int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]); + int i; + for(i=0;i<LENGTHOF(logicalOrder);i++){ + int32_t srcSize = (int32_t)strlen(logicalOrder[i]); int32_t destSize = srcSize*2; - UChar* src = (UChar*) malloc(sizeof(UChar)*srcSize ); - UChar* dest = (UChar*) malloc(sizeof(UChar)*destSize); - char* chars=NULL; + UChar src[MAXLEN]; + UChar dest[MAXLEN]; + char chars[MAXLEN]; + pseudoToU16(srcSize,logicalOrder[i],src); ec = U_ZERO_ERROR; - u_unescape(logicalOrder[i],src,srcSize); - srcSize= u_strlen(src); ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR ,NULL,&ec); if(U_FAILURE(ec)){ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n", @@ -294,25 +486,24 @@ static void TestReorder(){ ec= U_ZERO_ERROR; } destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_DO_MIRRORING,&ec); - chars = aescstrdup(dest,-1); + u16ToPseudo(destSize,dest,chars); if(destSize!=srcSize){ log_err("ubidi_writeReordered() destSize and srcSize do not match\n"); - }else if(uprv_strncmp(visualOrder[i],chars,destSize)!=0){ - log_err("ubidi_writeReordered() did not give expected results. Expected: %s Got: %s At Index: %d\n",visualOrder[i],chars,i); + }else if(strcmp(visualOrder[i],chars)!=0){ + log_err("ubidi_writeReordered() did not give expected results for UBIDI_DO_MIRRORING.\n" + "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n", + logicalOrder[i],visualOrder[i],chars,formatLevels(bidi, formatChars),i); } - free(src); - free(dest); } - for(i=0;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){ - int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]); + for(i=0;i<LENGTHOF(logicalOrder);i++){ + int32_t srcSize = (int32_t)strlen(logicalOrder[i]); int32_t destSize = srcSize*2; - UChar* src = (UChar*) malloc(sizeof(UChar)*srcSize ); - UChar* dest = (UChar*) malloc(sizeof(UChar)*destSize); - char* chars=NULL; + UChar src[MAXLEN]; + UChar dest[MAXLEN]; + char chars[MAXLEN]; + pseudoToU16(srcSize,logicalOrder[i],src); ec = U_ZERO_ERROR; - u_unescape(logicalOrder[i],src,srcSize); - srcSize=u_strlen(src); ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR ,NULL,&ec); if(U_FAILURE(ec)){ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n", @@ -328,28 +519,26 @@ static void TestReorder(){ ec= U_ZERO_ERROR; } destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_DO_MIRRORING+UBIDI_OUTPUT_REVERSE,&ec); - chars = aescstrdup(dest,destSize); + u16ToPseudo(destSize,dest,chars); if(destSize!=srcSize){ log_err("ubidi_writeReordered() destSize and srcSize do not match\n"); - }else if(uprv_strncmp(visualOrder1[i],chars,destSize)!=0){ - log_err("ubidi_writeReordered() did not give expected results for UBIDI_DO_MIRRORING+UBIDI_OUTPUT_REVERSE. Expected: %s Got: %s At Index: %d\n",visualOrder1[i],chars,i); + }else if(strcmp(visualOrder1[i],chars)!=0){ + log_err("ubidi_writeReordered() did not give expected results for UBIDI_DO_MIRRORING+UBIDI_OUTPUT_REVERSE.\n" + "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n", + logicalOrder[i],visualOrder1[i],chars,formatLevels(bidi, formatChars),i); } - free(src); - free(dest); } - for(i=0;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){ - int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]); + for(i=0;i<LENGTHOF(logicalOrder);i++){ + int32_t srcSize = (int32_t)strlen(logicalOrder[i]); int32_t destSize = srcSize*2; - UChar* src = (UChar*) malloc(sizeof(UChar)*srcSize ); - UChar* dest = (UChar*) malloc(sizeof(UChar)*destSize); - char* chars=NULL; + UChar src[MAXLEN]; + UChar dest[MAXLEN]; + char chars[MAXLEN]; + pseudoToU16(srcSize,logicalOrder[i],src); ec = U_ZERO_ERROR; - u_unescape(logicalOrder[i],src,srcSize); - srcSize=u_strlen(src); ubidi_setInverse(bidi,TRUE); ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR ,NULL,&ec); - if(U_FAILURE(ec)){ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n", i, UBIDI_DEFAULT_LTR, u_errorName(ec)); @@ -362,28 +551,23 @@ static void TestReorder(){ ec= U_ZERO_ERROR; } destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_INSERT_LRM_FOR_NUMERIC+UBIDI_OUTPUT_REVERSE,&ec); - chars = aescstrdup(dest,destSize); - - /*if(destSize!=srcSize){ - log_err("ubidi_writeReordered() destSize and srcSize do not match. Dest Size = %d Source Size = %d\n",destSize,srcSize ); - }else*/ - if(uprv_strncmp(visualOrder2[i],chars,destSize)!=0){ - log_err("ubidi_writeReordered() did not give expected results for UBIDI_INSERT_LRM_FOR_NUMERIC+UBIDI_OUTPUT_REVERSE. Expected: %s Got: %s At Index: %d\n",visualOrder2[i],chars,i); + u16ToPseudo(destSize,dest,chars); + if(strcmp(visualOrder2[i],chars)!=0){ + log_err("ubidi_writeReordered() did not give expected results for UBIDI_INSERT_LRM_FOR_NUMERIC+UBIDI_OUTPUT_REVERSE.\n" + "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n", + logicalOrder[i],visualOrder2[i],chars,formatLevels(bidi, formatChars),i); } - free(src); - free(dest); } /* Max Explicit level */ - for(i=0;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){ - int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]); + for(i=0;i<LENGTHOF(logicalOrder);i++){ + int32_t srcSize = (int32_t)strlen(logicalOrder[i]); int32_t destSize = srcSize*2; - UChar* src = (UChar*) malloc(sizeof(UChar)*srcSize ); - UChar* dest = (UChar*) malloc(sizeof(UChar)*destSize); - char* chars=NULL; + UChar src[MAXLEN]; + UChar dest[MAXLEN]; + char chars[MAXLEN]; UBiDiLevel levels[UBIDI_MAX_EXPLICIT_LEVEL]={1,2,3,4,5,6,7,8,9,10}; + pseudoToU16(srcSize,logicalOrder[i],src); ec = U_ZERO_ERROR; - u_unescape(logicalOrder[i],src,srcSize); - srcSize=u_strlen(src); ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR,levels,&ec); if(U_FAILURE(ec)){ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n", @@ -396,54 +580,46 @@ static void TestReorder(){ }else if(destSize!=srcSize){ log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize); }else{ - ec= U_ZERO_ERROR; + ec = U_ZERO_ERROR; } destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_OUTPUT_REVERSE,&ec); - chars = aescstrdup(dest,destSize); - + u16ToPseudo(destSize,dest,chars); if(destSize!=srcSize){ log_err("ubidi_writeReordered() destSize and srcSize do not match. Dest Size = %d Source Size = %d\n",destSize,srcSize ); - }else if(uprv_strncmp(visualOrder3[i],chars,destSize)!=0){ - log_err("ubidi_writeReordered() did not give expected results for UBIDI_OUTPUT_REVERSE. Expected: %s Got: %s At Index: %d\n",visualOrder3[i],chars,i); + }else if(strcmp(visualOrder3[i],chars)!=0){ + log_err("ubidi_writeReordered() did not give expected results for UBIDI_OUTPUT_REVERSE.\n" + "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n", + logicalOrder[i],visualOrder3[i],chars,formatLevels(bidi, formatChars),i); } - free(src); - free(dest); } - for(i=0;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){ - int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]); + for(i=0;i<LENGTHOF(logicalOrder);i++){ + int32_t srcSize = (int32_t)strlen(logicalOrder[i]); int32_t destSize = srcSize*2; - UChar* src = (UChar*) malloc(sizeof(UChar)*srcSize ); - UChar* dest = (UChar*) malloc(sizeof(UChar)*destSize); - char* chars=NULL; + UChar src[MAXLEN]; + UChar dest[MAXLEN]; + char chars[MAXLEN]; UBiDiLevel levels[UBIDI_MAX_EXPLICIT_LEVEL]={1,2,3,4,5,6,7,8,9,10}; + pseudoToU16(srcSize,logicalOrder[i],src); ec = U_ZERO_ERROR; - u_unescape(logicalOrder[i],src,srcSize); - srcSize=u_strlen(src); ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR,levels,&ec); if(U_FAILURE(ec)){ log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n", i, UBIDI_MAX_EXPLICIT_LEVEL, u_errorName(ec)); } - /* try pre-flighting */ destSize = ubidi_writeReordered(bidi,dest,0,UBIDI_DO_MIRRORING+UBIDI_REMOVE_BIDI_CONTROLS,&ec); if(ec!=U_BUFFER_OVERFLOW_ERROR){ log_err("Pre-flighting did not give expected error: Expected: U_BUFFER_OVERFLOW_ERROR. Got: %s \n",u_errorName(ec)); - /*}else if(destSize!=srcSize){ - log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize);*/ }else{ ec= U_ZERO_ERROR; } destSize=ubidi_writeReordered(bidi,dest,destSize+1,UBIDI_DO_MIRRORING+UBIDI_REMOVE_BIDI_CONTROLS,&ec); - chars = aescstrdup(dest,destSize); - - /*if(destSize!=srcSize){ - log_err("ubidi_writeReordered() destSize and srcSize do not match. Dest Size = %d Source Size = %d\n",destSize,srcSize ); - }else*/ if(uprv_strncmp(visualOrder4[i],chars,destSize)!=0){ - log_err("ubidi_writeReordered() did not give expected results for UBIDI_DO_MIRRORING+UBIDI_REMOVE_BIDI_CONTROLS. Expected: %s Got: %s At Index: %d\n",visualOrder4[i],chars,i); + u16ToPseudo(destSize,dest,chars); + if(strcmp(visualOrder4[i],chars)!=0){ + log_err("ubidi_writeReordered() did not give expected results for UBIDI_DO_MIRRORING+UBIDI_REMOVE_BIDI_CONTROLS.\n" + "Input : %s\nExpected: %s\nGot : %s\nLevels : %s\nAt Index: %d\n", + logicalOrder[i],visualOrder4[i],chars,formatLevels(bidi, formatChars),i); } - free(src); - free(dest); } ubidi_close(bidi); } @@ -506,7 +682,7 @@ doTest(UBiDi *pBiDi, int testNumber, BiDiTestData *test, int32_t lineStart, UBoo for(i=0; i<len; ++i) { if(levels[i]!=ubidi_getLevelAt(pBiDi, i)) { - log_err("ubidi_getLevelAt(tests[%d], %d): wrong level %d\n", testNumber, i, ubidi_getLevelAt(pBiDi, i)); + log_err("ubidi_getLevelAt(tests[%d], %d): wrong level %d, expected %d\n", testNumber, i, ubidi_getLevelAt(pBiDi, i), levels[i]); return; } } @@ -553,11 +729,12 @@ doTest(UBiDi *pBiDi, int testNumber, BiDiTestData *test, int32_t lineStart, UBoo static void testReordering(UBiDi *pBiDi, int testNumber) { int32_t - logicalMap1[200], logicalMap2[200], logicalMap3[200], - visualMap1[200], visualMap2[200], visualMap3[200], visualMap4[200]; + logicalMap1[MAXLEN], logicalMap2[MAXLEN], logicalMap3[MAXLEN], + visualMap1[MAXLEN], visualMap2[MAXLEN], visualMap3[MAXLEN], visualMap4[MAXLEN]; UErrorCode errorCode=U_ZERO_ERROR; - UBiDiLevel levels[200]; - int32_t i, length=ubidi_getLength(pBiDi); + const UBiDiLevel *levels; + int32_t i, length=ubidi_getLength(pBiDi), + destLength=ubidi_getResultLength(pBiDi); int32_t runCount, visualIndex, logicalStart, runLength; UBool odd; @@ -573,7 +750,6 @@ testReordering(UBiDi *pBiDi, int testNumber) { } ubidi_getVisualMap(pBiDi, visualMap1, &errorCode); - if(U_FAILURE(errorCode)) { log_err("ubidi_getVisualMap(tests[%d]): error %s\n", testNumber, myErrorName(errorCode)); return; @@ -581,10 +757,10 @@ testReordering(UBiDi *pBiDi, int testNumber) { /* invert them both */ ubidi_invertMap(logicalMap1, visualMap2, length); - ubidi_invertMap(visualMap1, logicalMap2, length); + ubidi_invertMap(visualMap1, logicalMap2, destLength); /* get them from the levels array, too */ - uprv_memcpy(levels, ubidi_getLevels(pBiDi, &errorCode), length); + levels=ubidi_getLevels(pBiDi, &errorCode); if(U_FAILURE(errorCode)) { log_err("ubidi_getLevels(tests[%d]): error %s\n", testNumber, myErrorName(errorCode)); @@ -600,17 +776,12 @@ testReordering(UBiDi *pBiDi, int testNumber) { log_err("ubidi_countRuns(tests[%d]): error %s\n", testNumber, myErrorName(errorCode)); return; } - log_verbose("\n----%2d runs:", runCount); - for(i=0; i<runCount; ++i) { - odd=(UBool)(ubidi_getVisualRun(pBiDi, i, &logicalStart, &runLength)); - log_verbose(" (%c @%d[%d])", odd ? 'R' : 'L', logicalStart, runLength); - } - log_verbose("\n"); - visualIndex=0; for(i=0; i<runCount; ++i) { - if(UBIDI_LTR==ubidi_getVisualRun(pBiDi, i, &logicalStart, &runLength)) { + odd=(UBool)ubidi_getVisualRun(pBiDi, i, &logicalStart, &runLength); + log_verbose(" (%c @%d[%d])", odd ? 'R' : 'L', logicalStart, runLength); + if(UBIDI_LTR==odd) { do { /* LTR */ visualMap4[visualIndex++]=logicalStart++; } while(--runLength>0); @@ -621,6 +792,7 @@ testReordering(UBiDi *pBiDi, int testNumber) { } while(--runLength>0); } } + log_verbose("\n"); /* print all the maps */ log_verbose("logical maps:\n"); @@ -637,11 +809,11 @@ testReordering(UBiDi *pBiDi, int testNumber) { } log_verbose("\nvisual maps:\n"); - for(i=0; i<length; ++i) { + for(i=0; i<destLength; ++i) { log_verbose("%4d", visualMap1[i]); } log_verbose("\n"); - for(i=0; i<length; ++i) { + for(i=0; i<destLength; ++i) { log_verbose("%4d", visualMap2[i]); } log_verbose("\n"); @@ -718,7 +890,6 @@ static void TestFailureRecovery(void) { } static void TestMultipleParagraphs(void) { - #define MAXLEN 100 static const char* const text = "__ABC\\u001c" /* Para #0 offset 0 */ "__\\u05d0DE\\u001c" /* 1 6 */ "__123\\u001c" /* 2 12 */ @@ -993,29 +1164,30 @@ static void TestMultipleParagraphs(void) { /* inverse BiDi ------------------------------------------------------------- */ -static const UChar - string0[]={ 0x6c, 0x61, 0x28, 0x74, 0x69, 0x6e, 0x20, 0x5d0, 0x5d1, 0x29, 0x5d2, 0x5d3 }, - string1[]={ 0x6c, 0x61, 0x74, 0x20, 0x5d0, 0x5d1, 0x5d2, 0x20, 0x31, 0x32, 0x33 }, - string2[]={ 0x6c, 0x61, 0x74, 0x20, 0x5d0, 0x28, 0x5d1, 0x5d2, 0x20, 0x31, 0x29, 0x32, 0x33 }, - string3[]={ 0x31, 0x32, 0x33, 0x20, 0x5d0, 0x5d1, 0x5d2, 0x20, 0x34, 0x35, 0x36 }, - string4[]={ 0x61, 0x62, 0x20, 0x61, 0x62, 0x20, 0x661, 0x662 }; +static int countRoundtrips=0, countNonRoundtrips=0; #define STRING_TEST_CASE(s) { (s), LENGTHOF(s) } -static const struct { - const UChar *s; - int32_t length; -} testCases[]={ - STRING_TEST_CASE(string0), - STRING_TEST_CASE(string1), - STRING_TEST_CASE(string2), - STRING_TEST_CASE(string3) -}; - -static int countRoundtrips=0, countNonRoundtrips=0; - static void doInverseBiDiTest() { + static const UChar + string0[]={ 0x6c, 0x61, 0x28, 0x74, 0x69, 0x6e, 0x20, 0x5d0, 0x5d1, 0x29, 0x5d2, 0x5d3 }, + string1[]={ 0x6c, 0x61, 0x74, 0x20, 0x5d0, 0x5d1, 0x5d2, 0x20, 0x31, 0x32, 0x33 }, + string2[]={ 0x6c, 0x61, 0x74, 0x20, 0x5d0, 0x28, 0x5d1, 0x5d2, 0x20, 0x31, 0x29, 0x32, 0x33 }, + string3[]={ 0x31, 0x32, 0x33, 0x20, 0x5d0, 0x5d1, 0x5d2, 0x20, 0x34, 0x35, 0x36 }, + string4[]={ 0x61, 0x62, 0x20, 0x61, 0x62, 0x20, 0x661, 0x662 }; + + static const struct { + const UChar *s; + int32_t length; + } testCases[]={ + STRING_TEST_CASE(string0), + STRING_TEST_CASE(string1), + STRING_TEST_CASE(string2), + STRING_TEST_CASE(string3), + STRING_TEST_CASE(string4) + }; + UBiDi *pBiDi; UErrorCode errorCode; int i; @@ -1027,7 +1199,7 @@ doInverseBiDiTest() { } log_verbose("inverse BiDi: testInverseBiDi(L) with %u test cases ---\n", LENGTHOF(testCases)); - for(i=0; i<LENGTHOF(testCases); ++i) { + for(i=0; i<LENGTHOF(testCases); ++i) { errorCode=U_ZERO_ERROR; testInverseBiDi(pBiDi, testCases[i].s, testCases[i].length, 0, &errorCode); } @@ -1061,7 +1233,7 @@ static const UChar repeatSegments[COUNT_REPEAT_SEGMENTS][2]={ static void testManyInverseBiDi(UBiDi *pBiDi, UBiDiLevel direction) { - static UChar text[8]={ 0, 0, 0x20, 0, 0, 0x20, 0, 0 }; + UChar text[8]={ 0, 0, 0x20, 0, 0, 0x20, 0, 0 }; int i, j, k; UErrorCode errorCode; @@ -1085,8 +1257,9 @@ testManyInverseBiDi(UBiDi *pBiDi, UBiDiLevel direction) { } static void -testInverseBiDi(UBiDi *pBiDi, const UChar *src, int32_t srcLength, UBiDiLevel direction, UErrorCode *pErrorCode) { - static UChar visualLTR[200], logicalDest[200], visualDest[200]; +testInverseBiDi(UBiDi *pBiDi, const UChar *src, int32_t srcLength, + UBiDiLevel direction, UErrorCode *pErrorCode) { + UChar visualLTR[MAXLEN], logicalDest[MAXLEN], visualDest[MAXLEN]; int32_t ltrLength, logicalLength, visualLength; if(direction==0) { @@ -1094,7 +1267,13 @@ testInverseBiDi(UBiDi *pBiDi, const UChar *src, int32_t srcLength, UBiDiLevel di /* convert visual to logical */ ubidi_setInverse(pBiDi, TRUE); + if (!ubidi_isInverse(pBiDi)) { + log_err("Error while doing ubidi_setInverse(TRUE)\n"); + } ubidi_setPara(pBiDi, src, srcLength, 0, NULL, pErrorCode); + if (src != ubidi_getText(pBiDi)) { + log_err("Wrong value returned by ubidi_getText\n"); + } logicalLength=ubidi_writeReordered(pBiDi, logicalDest, LENGTHOF(logicalDest), UBIDI_DO_MIRRORING|UBIDI_INSERT_LRM_FOR_NUMERIC, pErrorCode); log_verbose(" v "); @@ -1103,6 +1282,9 @@ testInverseBiDi(UBiDi *pBiDi, const UChar *src, int32_t srcLength, UBiDiLevel di /* convert back to visual LTR */ ubidi_setInverse(pBiDi, FALSE); + if (ubidi_isInverse(pBiDi)) { + log_err("Error while doing ubidi_setInverse(FALSE)\n"); + } ubidi_setPara(pBiDi, logicalDest, logicalLength, 0, NULL, pErrorCode); visualLength=ubidi_writeReordered(pBiDi, visualDest, LENGTHOF(visualDest), UBIDI_DO_MIRRORING|UBIDI_REMOVE_BIDI_CONTROLS, pErrorCode); @@ -1141,7 +1323,7 @@ testInverseBiDi(UBiDi *pBiDi, const UChar *src, int32_t srcLength, UBiDiLevel di if(U_FAILURE(*pErrorCode)) { log_err("inverse BiDi: *** error %s\n" " turn on verbose mode to see details\n", u_errorName(*pErrorCode)); - } else if(srcLength==visualLength && uprv_memcmp(src, visualDest, srcLength*U_SIZEOF_UCHAR)==0) { + } else if(srcLength==visualLength && memcmp(src, visualDest, srcLength*U_SIZEOF_UCHAR)==0) { ++countRoundtrips; log_verbose(" + roundtripped\n"); } else { @@ -1162,7 +1344,7 @@ testWriteReverse() { }, reverseRemoveControlsKeepCombiningDoMirror[]={ 0x28, 0x31, 0x29, 0x20, 0x627, 0x64e, 0x650 }; - static UChar reverse[10]; + UChar reverse[10]; UErrorCode errorCode; int32_t length; @@ -1172,18 +1354,18 @@ testWriteReverse() { reverse, LENGTHOF(reverse), UBIDI_KEEP_BASE_COMBINING, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(reverseKeepCombining) || uprv_memcmp(reverse, reverseKeepCombining, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(reverseKeepCombining) || memcmp(reverse, reverseKeepCombining, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in ubidi_writeReverse(UBIDI_KEEP_BASE_COMBINING): length=%d (should be %d), error code %s\n", length, LENGTHOF(reverseKeepCombining), u_errorName(errorCode)); } - uprv_memset(reverse, 0xa5, LENGTHOF(reverse)*U_SIZEOF_UCHAR); + memset(reverse, 0xa5, LENGTHOF(reverse)*U_SIZEOF_UCHAR); errorCode=U_ZERO_ERROR; length=ubidi_writeReverse(forward, LENGTHOF(forward), reverse, LENGTHOF(reverse), UBIDI_REMOVE_BIDI_CONTROLS|UBIDI_DO_MIRRORING|UBIDI_KEEP_BASE_COMBINING, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(reverseRemoveControlsKeepCombiningDoMirror) || uprv_memcmp(reverse, reverseRemoveControlsKeepCombiningDoMirror, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(reverseRemoveControlsKeepCombiningDoMirror) || memcmp(reverse, reverseRemoveControlsKeepCombiningDoMirror, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in ubidi_writeReverse(UBIDI_REMOVE_BIDI_CONTROLS|UBIDI_DO_MIRRORING|UBIDI_KEEP_BASE_COMBINING):\n" " length=%d (should be %d), error code %s\n", length, LENGTHOF(reverseRemoveControlsKeepCombiningDoMirror), u_errorName(errorCode)); @@ -1228,7 +1410,7 @@ doArabicShapingTest() { dest, LENGTHOF(dest), U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || uprv_memcmp(dest, en2an, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, en2an, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(en2an)\n"); } @@ -1238,7 +1420,7 @@ doArabicShapingTest() { dest, LENGTHOF(dest), U_SHAPE_DIGITS_AN2EN|U_SHAPE_DIGIT_TYPE_AN_EXTENDED, &errorCode); - if(U_FAILURE(errorCode) || length!=u_strlen(source) || uprv_memcmp(dest, an2en, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=u_strlen(source) || memcmp(dest, an2en, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(an2en)\n"); } @@ -1248,7 +1430,7 @@ doArabicShapingTest() { dest, LENGTHOF(dest), U_SHAPE_DIGITS_ALEN2AN_INIT_LR|U_SHAPE_DIGIT_TYPE_AN, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || uprv_memcmp(dest, logical_alen2an_init_lr, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, logical_alen2an_init_lr, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(logical_alen2an_init_lr)\n"); } @@ -1258,7 +1440,7 @@ doArabicShapingTest() { dest, LENGTHOF(dest), U_SHAPE_DIGITS_ALEN2AN_INIT_AL|U_SHAPE_DIGIT_TYPE_AN_EXTENDED, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || uprv_memcmp(dest, logical_alen2an_init_al, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, logical_alen2an_init_al, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(logical_alen2an_init_al)\n"); } @@ -1268,7 +1450,7 @@ doArabicShapingTest() { dest, LENGTHOF(dest), U_SHAPE_DIGITS_ALEN2AN_INIT_LR|U_SHAPE_DIGIT_TYPE_AN|U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || uprv_memcmp(dest, reverse_alen2an_init_lr, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, reverse_alen2an_init_lr, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(reverse_alen2an_init_lr)\n"); } @@ -1278,7 +1460,7 @@ doArabicShapingTest() { dest, LENGTHOF(dest), U_SHAPE_DIGITS_ALEN2AN_INIT_AL|U_SHAPE_DIGIT_TYPE_AN_EXTENDED|U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || uprv_memcmp(dest, reverse_alen2an_init_al, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, reverse_alen2an_init_al, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(reverse_alen2an_init_al)\n"); } @@ -1288,7 +1470,7 @@ doArabicShapingTest() { dest, LENGTHOF(dest), 0, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || uprv_memcmp(dest, source, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(source) || memcmp(dest, source, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(noop)\n"); } @@ -1437,7 +1619,7 @@ doLamAlefSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_near) || uprv_memcmp(dest, shape_near, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_near) || memcmp(dest, shape_near, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(LAMALEF shape_near)\n"); } @@ -1449,7 +1631,7 @@ doLamAlefSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_at_end) || uprv_memcmp(dest, shape_at_end, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_at_end) || memcmp(dest, shape_at_end, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(LAMALEF shape_at_end)\n"); } @@ -1461,7 +1643,7 @@ doLamAlefSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_at_begin) || uprv_memcmp(dest, shape_at_begin, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_at_begin) || memcmp(dest, shape_at_begin, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(LAMALEF shape_at_begin)\n"); } @@ -1473,7 +1655,7 @@ doLamAlefSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || uprv_memcmp(dest, shape_grow_shrink, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || memcmp(dest, shape_grow_shrink, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(LAMALEF shape_grow_shrink)\n"); } @@ -1487,7 +1669,7 @@ doLamAlefSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_near) || uprv_memcmp(dest, shape_excepttashkeel_near, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_near) || memcmp(dest, shape_excepttashkeel_near, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(LAMALEF shape_excepttashkeel_near)\n"); } @@ -1499,7 +1681,7 @@ doLamAlefSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_at_end) || uprv_memcmp(dest,shape_excepttashkeel_at_end , length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_at_end) || memcmp(dest,shape_excepttashkeel_at_end , length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(LAMALEF shape_excepttashkeel_at_end)\n"); } @@ -1511,7 +1693,7 @@ doLamAlefSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_at_begin) || uprv_memcmp(dest, shape_excepttashkeel_at_begin, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_at_begin) || memcmp(dest, shape_excepttashkeel_at_begin, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(LAMALEF shape_excepttashkeel_at_begin)\n"); } @@ -1523,7 +1705,7 @@ doLamAlefSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || uprv_memcmp(dest, shape_excepttashkeel_grow_shrink, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || memcmp(dest, shape_excepttashkeel_grow_shrink, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(LAMALEF shape_excepttashkeel_grow_shrink)\n"); } } @@ -1563,7 +1745,7 @@ doTashkeelSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_near) || uprv_memcmp(dest, shape_near, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_near) || memcmp(dest, shape_near, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(TASHKEEL shape_near)\n"); } @@ -1575,7 +1757,7 @@ doTashkeelSpecialVLTRArabicShapingTest() { U_SHAPE_TEXT_DIRECTION_VISUAL_LTR, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_near) || uprv_memcmp(dest, shape_excepttashkeel_near, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(shape_excepttashkeel_near) || memcmp(dest, shape_excepttashkeel_near, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(TASHKEEL shape_excepttashkeel_near)\n"); } } @@ -1617,7 +1799,7 @@ doLOGICALArabicDeShapingTest() { U_SHAPE_TEXT_DIRECTION_LOGICAL, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_near) || uprv_memcmp(dest, unshape_near, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_near) || memcmp(dest, unshape_near, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(unshape_near)\n"); } @@ -1629,7 +1811,7 @@ doLOGICALArabicDeShapingTest() { U_SHAPE_TEXT_DIRECTION_LOGICAL, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_at_end) || uprv_memcmp(dest, unshape_at_end, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_at_end) || memcmp(dest, unshape_at_end, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(unshape_at_end)\n"); } @@ -1641,7 +1823,7 @@ doLOGICALArabicDeShapingTest() { U_SHAPE_TEXT_DIRECTION_LOGICAL, &errorCode); - if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_at_begin) || uprv_memcmp(dest, unshape_at_begin, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || length!=LENGTHOF(unshape_at_begin) || memcmp(dest, unshape_at_begin, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(unshape_at_begin)\n"); } @@ -1653,7 +1835,7 @@ doLOGICALArabicDeShapingTest() { U_SHAPE_TEXT_DIRECTION_LOGICAL, &errorCode); - if(U_FAILURE(errorCode) || uprv_memcmp(dest, unshape_grow_shrink, length*U_SIZEOF_UCHAR)!=0) { + if(U_FAILURE(errorCode) || memcmp(dest, unshape_grow_shrink, length*U_SIZEOF_UCHAR)!=0) { log_err("failure in u_shapeArabic(unshape_grow_shrink)\n"); } @@ -1680,18 +1862,17 @@ initCharFromDirProps() { /* return a string with characters according to the desired directional properties */ static UChar * -getStringFromDirProps(const uint8_t *dirProps, int32_t length) { - static UChar s[MAX_STRING_LENGTH]; +getStringFromDirProps(const uint8_t *dirProps, int32_t length, UChar *buffer) { int32_t i; initCharFromDirProps(); /* this part would have to be modified for UTF-x */ for(i=0; i<length; ++i) { - s[i]=charFromDirProp[dirProps[i]]; + buffer[i]=charFromDirProp[dirProps[i]]; } - s[i]=0; - return s; + buffer[length]=0; + return buffer; } static void @@ -1708,3 +1889,1124 @@ printUnicode(const UChar *s, int32_t length, const UBiDiLevel *levels) { } log_verbose(" }"); } + +/* new BIDI API */ + +/* Reordering Mode BiDi --------------------------------------------------------- */ + +static const UBiDiLevel paraLevels[] = { UBIDI_LTR, UBIDI_RTL }; + +static UBool +assertSuccessful(const char* message, UErrorCode* rc) { + if (rc != NULL && U_FAILURE(*rc)) { + log_err("%s() failed with error %s.\n", message, myErrorName(*rc)); + return FALSE; + } + return TRUE; +} + +static UBool +assertStringsEqual(const char* expected, const char* actual, const char* src, + const char* mode, const char* option, UBiDi* pBiDi) { + if (uprv_strcmp(expected, actual)) { + char formatChars[MAXLEN]; + log_err("\nActual and expected output mismatch.\n" + "%20s %s\n%20s %s\n%20s %s\n%20s %s\n%20s %d %s\n%20s %u\n%20s %d %s\n", + "Input:", src, + "Actual output:", actual, + "Expected output:", expected, + "Levels:", formatLevels(pBiDi, formatChars), + "Reordering mode:", ubidi_getReorderingMode(pBiDi), mode, + "Paragraph level:", ubidi_getParaLevel(pBiDi), + "Reordering option:", ubidi_getReorderingOptions(pBiDi), option); + return FALSE; + } + return TRUE; +} + +static UBiDi* +getBiDiObject(void) { + UBiDi* pBiDi = ubidi_open(); + if (pBiDi == NULL) { + log_err("Unable to allocate a UBiDi object. Tests are skipped.\n"); + } + return pBiDi; +} + +#define MAKE_ITEMS(val) val, #val + +static const struct { + uint32_t value; + const char* description; +} +modes[] = { + { MAKE_ITEMS(UBIDI_REORDER_GROUP_NUMBERS_WITH_R) }, + { MAKE_ITEMS(UBIDI_REORDER_INVERSE_LIKE_DIRECT) }, + { MAKE_ITEMS(UBIDI_REORDER_NUMBERS_SPECIAL) }, + { MAKE_ITEMS(UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL) }, + { MAKE_ITEMS(UBIDI_REORDER_INVERSE_NUMBERS_AS_L) } +}, +options[] = { + { MAKE_ITEMS(UBIDI_OPTION_INSERT_MARKS) }, + { MAKE_ITEMS(0) } +}; + +#define TC_COUNT LENGTHOF(textIn) +#define MODES_COUNT LENGTHOF(modes) +#define OPTIONS_COUNT LENGTHOF(options) +#define LEVELS_COUNT LENGTHOF(paraLevels) + +static const char* const textIn[] = { +/* (0) 123 */ + "123", +/* (1) .123->4.5 */ + ".123->4.5", +/* (2) 678 */ + "678", +/* (3) .678->8.9 */ + ".678->8.9", +/* (4) JIH1.2,3MLK */ + "JIH1.2,3MLK", +/* (5) FE.>12-> */ + "FE.>12->", +/* (6) JIH.>12->a */ + "JIH.>12->a", +/* (7) CBA.>67->89=a */ + "CBA.>67->89=a", +/* (8) CBA.123->xyz */ + "CBA.123->xyz", +/* (9) .>12->xyz */ + ".>12->xyz", +/* (10) a.>67->xyz */ + "a.>67->xyz", +/* (11) 123JIH */ + "123JIH", +/* (12) 123 JIH */ + "123 JIH" +}; + +static const char* const textOut[] = { +/* TC 0: 123 */ + "123", /* (0) */ +/* TC 1: .123->4.5 */ + ".123->4.5", /* (1) */ + "4.5<-123.", /* (2) */ +/* TC 2: 678 */ + "678", /* (3) */ +/* TC 3: .678->8.9 */ + ".8.9<-678", /* (4) */ + "8.9<-678.", /* (5) */ + ".678->8.9", /* (6) */ +/* TC 4: MLK1.2,3JIH */ + "KLM1.2,3HIJ", /* (7) */ +/* TC 5: FE.>12-> */ + "12<.EF->", /* (8) */ + "<-12<.EF", /* (9) */ + "EF.>@12->", /* (10) */ +/* TC 6: JIH.>12->a */ + "12<.HIJ->a", /* (11) */ + "a<-12<.HIJ", /* (12) */ + "HIJ.>@12->a", /* (13) */ + "a&<-12<.HIJ", /* (14) */ +/* TC 7: CBA.>67->89=a */ + "ABC.>@67->89=a", /* (15) */ + "a=89<-67<.ABC", /* (16) */ + "a&=89<-67<.ABC", /* (17) */ + "89<-67<.ABC=a", /* (18) */ +/* TC 8: CBA.123->xyz */ + "123.ABC->xyz", /* (19) */ + "xyz<-123.ABC", /* (20) */ + "ABC.@123->xyz", /* (21) */ + "xyz&<-123.ABC", /* (22) */ +/* TC 9: .>12->xyz */ + ".>12->xyz", /* (23) */ + "xyz<-12<.", /* (24) */ + "xyz&<-12<.", /* (25) */ +/* TC 10: a.>67->xyz */ + "a.>67->xyz", /* (26) */ + "a.>@67@->xyz", /* (27) */ + "xyz<-67<.a", /* (28) */ +/* TC 11: 123JIH */ + "123HIJ", /* (29) */ + "HIJ123", /* (30) */ +/* TC 12: 123 JIH */ + "123 HIJ", /* (31) */ + "HIJ 123", /* (32) */ +}; + +#define NO UBIDI_MAP_NOWHERE +#define MAX_MAP_LENGTH 20 + +static const int32_t forwardMap[][MAX_MAP_LENGTH] = { +/* TC 0: 123 */ + { 0, 1, 2 }, /* (0) */ +/* TC 1: .123->4.5 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (1) */ + { 8, 5, 6, 7, 4, 3, 0, 1, 2 }, /* (2) */ +/* TC 2: 678 */ + { 0, 1, 2 }, /* (3) */ +/* TC 3: .678->8.9 */ + { 0, 6, 7, 8, 5, 4, 1, 2, 3 }, /* (4) */ + { 8, 5, 6, 7, 4, 3, 0, 1, 2 }, /* (5) */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (6) */ +/* TC 4: MLK1.2,3JIH */ + { 10, 9, 8, 3, 4, 5, 6, 7, 2, 1, 0 }, /* (7) */ +/* TC 5: FE.>12-> */ + { 5, 4, 3, 2, 0, 1, 6, 7 }, /* (8) */ + { 7, 6, 5, 4, 2, 3, 1, 0 }, /* (9) */ + { 1, 0, 2, 3, 5, 6, 7, 8 }, /* (10) */ +/* TC 6: JIH.>12->a */ + { 6, 5, 4, 3, 2, 0, 1, 7, 8, 9 }, /* (11) */ + { 9, 8, 7, 6, 5, 3, 4, 2, 1, 0 }, /* (12) */ + { 2, 1, 0, 3, 4, 6, 7, 8, 9, 10 }, /* (13) */ + { 10, 9, 8, 7, 6, 4, 5, 3, 2, 0 }, /* (14) */ +/* TC 7: CBA.>67->89=a */ + { 2, 1, 0, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13 }, /* (15) */ + { 12, 11, 10, 9, 8, 6, 7, 5, 4, 2, 3, 1, 0 }, /* (16) */ + { 13, 12, 11, 10, 9, 7, 8, 6, 5, 3, 4, 2, 0 }, /* (17) */ + { 10, 9, 8, 7, 6, 4, 5, 3, 2, 0, 1, 11, 12 }, /* (18) */ +/* TC 8: CBA.123->xyz */ + { 6, 5, 4, 3, 0, 1, 2, 7, 8, 9, 10, 11 }, /* (19) */ + { 11, 10, 9, 8, 5, 6, 7, 4, 3, 0, 1, 2 }, /* (20) */ + { 2, 1, 0, 3, 5, 6, 7, 8, 9, 10, 11, 12 }, /* (21) */ + { 12, 11, 10, 9, 6, 7, 8, 5, 4, 0, 1, 2 }, /* (22) */ +/* TC 9: .>12->xyz */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (23) */ + { 8, 7, 5, 6, 4, 3, 0, 1, 2 }, /* (24) */ + { 9, 8, 6, 7, 5, 4, 0, 1, 2 }, /* (25) */ +/* TC 10: a.>67->xyz */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, /* (26) */ + { 0, 1, 2, 4, 5, 7, 8, 9, 10, 11 }, /* (27) */ + { 9, 8, 7, 5, 6, 4, 3, 0, 1, 2 }, /* (28) */ +/* TC 11: 123JIH */ + { 0, 1, 2, 5, 4, 3 }, /* (29) */ + { 3, 4, 5, 2, 1, 0 }, /* (30) */ +/* TC 12: 123 JIH */ + { 0, 1, 2, 3, 6, 5, 4 }, /* (31) */ + { 4, 5, 6, 3, 2, 1, 0 }, /* (32) */ +}; + +static const int32_t inverseMap[][MAX_MAP_LENGTH] = { +/* TC 0: 123 */ + { 0, 1, 2 }, /* (0) */ +/* TC 1: .123->4.5 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (1) */ + { 6, 7, 8, 5, 4, 1, 2, 3, 0 }, /* (2) */ +/* TC 2: 678 */ + { 0, 1, 2 }, /* (3) */ +/* TC 3: .678->8.9 */ + { 0, 6, 7, 8, 5, 4, 1, 2, 3 }, /* (4) */ + { 6, 7, 8, 5, 4, 1, 2, 3, 0 }, /* (5) */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (6) */ +/* TC 4: MLK1.2,3JIH */ + { 10, 9, 8, 3, 4, 5, 6, 7, 2, 1, 0 }, /* (7) */ +/* TC 5: FE.>12-> */ + { 4, 5, 3, 2, 1, 0, 6, 7 }, /* (8) */ + { 7, 6, 4, 5, 3, 2, 1, 0 }, /* (9) */ + { 1, 0, 2, 3, NO, 4, 5, 6, 7 }, /* (10) */ +/* TC 6: JIH.>12->a */ + { 5, 6, 4, 3, 2, 1, 0, 7, 8, 9 }, /* (11) */ + { 9, 8, 7, 5, 6, 4, 3, 2, 1, 0 }, /* (12) */ + { 2, 1, 0, 3, 4, NO, 5, 6, 7, 8, 9 }, /* (13) */ + { 9, NO, 8, 7, 5, 6, 4, 3, 2, 1, 0 }, /* (14) */ +/* TC 7: CBA.>67->89=a */ + { 2, 1, 0, 3, 4, NO, 5, 6, 7, 8, 9, 10, 11, 12 }, /* (15) */ + { 12, 11, 9, 10, 8, 7, 5, 6, 4, 3, 2, 1, 0 }, /* (16) */ + { 12, NO, 11, 9, 10, 8, 7, 5, 6, 4, 3, 2, 1, 0 }, /* (17) */ + { 9, 10, 8, 7, 5, 6, 4, 3, 2, 1, 0, 11, 12 }, /* (18) */ +/* TC 8: CBA.123->xyz */ + { 4, 5, 6, 3, 2, 1, 0, 7, 8, 9, 10, 11 }, /* (19) */ + { 9, 10, 11, 8, 7, 4, 5, 6, 3, 2, 1, 0 }, /* (20) */ + { 2, 1, 0, 3, NO, 4, 5, 6, 7, 8, 9, 10, 11 }, /* (21) */ + { 9, 10, 11, NO, 8, 7, 4, 5, 6, 3, 2, 1, 0 }, /* (22) */ +/* TC 9: .>12->xyz */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, /* (23) */ + { 6, 7, 8, 5, 4, 2, 3, 1, 0 }, /* (24) */ + { 6, 7, 8, NO, 5, 4, 2, 3, 1, 0 }, /* (25) */ +/* TC 10: a.>67->xyz */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, /* (26) */ + { 0, 1, 2, NO, 3, 4, NO, 5, 6, 7, 8, 9 }, /* (27) */ + { 7, 8, 9, 6, 5, 3, 4, 2, 1, 0 }, /* (28) */ +/* TC 11: 123JIH */ + { 0, 1, 2, 5, 4, 3 }, /* (29) */ + { 5, 4, 3, 0, 1, 2 }, /* (30) */ +/* TC 12: 123 JIH */ + { 0, 1, 2, 3, 6, 5, 4 }, /* (31) */ + { 6, 5, 4, 3, 0, 1, 2 }, /* (32) */ +}; + +static const char outIndices[TC_COUNT][MODES_COUNT - 1][OPTIONS_COUNT] + [LEVELS_COUNT] = { + { /* TC 0: 123 */ + {{ 0, 0}, { 0, 0}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 0, 0}, { 0, 0}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 0, 0}, { 0, 0}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 0, 0}, { 0, 0}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 1: .123->4.5 */ + {{ 1, 2}, { 1, 2}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 2}, { 1, 2}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 2}, { 1, 2}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 2}, { 1, 2}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 2: 678 */ + {{ 3, 3}, { 3, 3}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 3, 3}, { 3, 3}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 3, 3}, { 3, 3}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 3, 3}, { 3, 3}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 3: .678->8.9 */ + {{ 6, 5}, { 6, 5}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 4, 5}, { 4, 5}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 6, 5}, { 6, 5}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 6, 5}, { 6, 5}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 4: MLK1.2,3JIH */ + {{ 7, 7}, { 7, 7}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 7, 7}, { 7, 7}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 7, 7}, { 7, 7}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 7, 7}, { 7, 7}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 5: FE.>12-> */ + {{ 8, 9}, { 8, 9}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{10, 9}, { 8, 9}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 8, 9}, { 8, 9}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{10, 9}, { 8, 9}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 6: JIH.>12->a */ + {{11, 12}, {11, 12}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{13, 14}, {11, 12}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{11, 12}, {11, 12}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{13, 14}, {11, 12}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 7: CBA.>67->89=a */ + {{18, 16}, {18, 16}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{18, 17}, {18, 16}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{18, 16}, {18, 16}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{15, 17}, {18, 16}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 8: CBA.>124->xyz */ + {{19, 20}, {19, 20}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{21, 22}, {19, 20}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{19, 20}, {19, 20}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{21, 22}, {19, 20}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 9: .>12->xyz */ + {{23, 24}, {23, 24}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{23, 25}, {23, 24}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{23, 24}, {23, 24}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{23, 25}, {23, 24}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 10: a.>67->xyz */ + {{26, 26}, {26, 26}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{26, 27}, {26, 28}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{26, 28}, {26, 28}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{26, 27}, {26, 28}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 11: 124JIH */ + {{30, 30}, {30, 30}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{29, 30}, {29, 30}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{30, 30}, {30, 30}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{30, 30}, {30, 30}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + }, + { /* TC 12: 124 JIH */ + {{32, 32}, {32, 32}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{31, 32}, {31, 32}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{31, 32}, {31, 32}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{31, 32}, {31, 32}} /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + } +}; + +static UBool +assertRoundTrip(UBiDi *pBiDi, int32_t tc, int32_t outIndex, const char *srcChars, + const char *destChars, const UChar *dest, int32_t destLen, + int mode, int option, UBiDiLevel level) { + + static const char roundtrip[TC_COUNT][MODES_COUNT][OPTIONS_COUNT] + [LEVELS_COUNT] = { + { /* TC 0: 123 */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 1: .123->4.5 */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 2: 678 */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 3: .678->8.9 */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 0, 0}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 4: MLK1.2,3JIH */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 5: FE.>12-> */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 0, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 6: JIH.>12->a */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 0, 0}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 7: CBA.>67->89=a */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 0, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 0, 0}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 8: CBA.>123->xyz */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 0, 0}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 9: .>12->xyz */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 0}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 10: a.>67->xyz */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 0}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 11: 123JIH */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + }, + { /* TC 12: 123 JIH */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_GROUP_NUMBERS_WITH_R */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_LIKE_DIRECT */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}}, /* UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL */ + {{ 1, 1}, { 1, 1}} /* UBIDI_REORDER_INVERSE_NUMBERS_AS_L */ + } + }; + + #define SET_ROUND_TRIP_MODE(mode) \ + ubidi_setReorderingMode(pBiDi, mode); \ + desc = #mode; \ + break; + + UErrorCode rc = U_ZERO_ERROR; + UChar dest2[MAXLEN]; + int32_t destLen2; + const char* desc; + char destChars2[MAXLEN]; + char destChars3[MAXLEN]; + + switch (modes[mode].value) { + case UBIDI_REORDER_NUMBERS_SPECIAL: + SET_ROUND_TRIP_MODE(UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL) + case UBIDI_REORDER_GROUP_NUMBERS_WITH_R: + SET_ROUND_TRIP_MODE(UBIDI_REORDER_GROUP_NUMBERS_WITH_R) + case UBIDI_REORDER_RUNS_ONLY: + SET_ROUND_TRIP_MODE(UBIDI_REORDER_RUNS_ONLY) + case UBIDI_REORDER_INVERSE_NUMBERS_AS_L: + SET_ROUND_TRIP_MODE(UBIDI_REORDER_DEFAULT) + case UBIDI_REORDER_INVERSE_LIKE_DIRECT: + SET_ROUND_TRIP_MODE(UBIDI_REORDER_DEFAULT) + case UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL: + SET_ROUND_TRIP_MODE(UBIDI_REORDER_NUMBERS_SPECIAL) + default: + SET_ROUND_TRIP_MODE(UBIDI_REORDER_INVERSE_LIKE_DIRECT) + } + ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_REMOVE_CONTROLS); + + ubidi_setPara(pBiDi, dest, destLen, level, NULL, &rc); + assertSuccessful("ubidi_setPara", &rc); + *dest2 = 0; + destLen2 = ubidi_writeReordered(pBiDi, dest2, MAXLEN, UBIDI_DO_MIRRORING, + &rc); + assertSuccessful("ubidi_writeReordered", &rc); + + u16ToPseudo(destLen, dest, destChars3); + u16ToPseudo(destLen2, dest2, destChars2); + if (strcmp(srcChars, destChars2)) { + if (roundtrip[tc][mode][option][level]) { + log_err("\nRound trip failed for case=%d mode=%d option=%d.\n" + "%20s %s\n%20s %s\n%20s %s\n%20s %s\n%20s %s" + "\n%20s %u\n", tc, mode, option, + "Original text:", srcChars, + "Round-tripped text:", destChars2, + "Intermediate text:", destChars3, + "Reordering mode:", modes[mode].description, + "Reordering option:", options[option].description, + "Paragraph level:", level); + } + else { + log_verbose("\nExpected round trip failure for case=%d mode=%d option=%d.\n" + "%20s %s\n%20s %s\n%20s %s\n%20s %s\n%20s %s" + "\n%20s %u\n", tc, mode, option, + "Original text:", srcChars, + "Round-tripped text:", destChars2, + "Intermediate text:", destChars3, + "Reordering mode:", modes[mode].description, + "Reordering option:", options[option].description, + "Paragraph level:", level); + } + return FALSE; + } + if (!checkResultLength(pBiDi, destChars, destChars2, dest2, destLen2, + desc, "UBIDI_OPTION_REMOVE_CONTROLS", level)) { + return FALSE; + } + if (outIndex > -1 && !testMaps(pBiDi, outIndex, srcChars, destChars, + desc, "UBIDI_OPTION_REMOVE_CONTROLS", + level, FALSE)) { + return FALSE; + } + return TRUE; +} + +static UBool +checkResultLength(UBiDi *pBiDi, const char *srcChars, const char *destChars, + const UChar *dest, int32_t destLen, const char* mode, + const char* option, UBiDiLevel level) { + int32_t actualLen; + if (strcmp(mode, "UBIDI_REORDER_INVERSE_NUMBERS_AS_L") == 0) + actualLen = strlen(destChars); + else + actualLen = ubidi_getResultLength(pBiDi); + if (actualLen != destLen) { + log_err("\nubidi_getResultLength failed.\n%20s %7d\n%20s %7d\n" + "%20s %s\n%20s %s\n%20s %s\n%20s %s\n%20s %u\n", + "Expected:", destLen, "Actual:", actualLen, + "Input:", srcChars, "Output:", destChars, + "Reordering mode:", mode, "Reordering option:", option, + "Paragraph level:", level); + return FALSE; + } + return TRUE; +} + +static void +doReorderRunsTest(void) { + static const struct { + const char* textIn; + const char* textOut[2][2]; + const char noroundtrip[2]; + } testCases[] = { + {"ab 234 896 de", {{"de 896 ab 234", "de 896 ab 234"}, + {"ab 234 @896@ de", "de 896 ab 234"}}, {0, 0}}, + {"abcGHI", {{"GHIabc", "GHIabc"}, {"GHIabc", "GHIabc"}}, {0, 0}}, + {"a.>67->", {{"<-67<.a", "<-67<.a"}, {"<-67<.a", "<-67<.a"}}, {0, 0}}, + {"-=%$123/ *", {{"* /%$123=-", "* /%$123=-"}, + {"* /%$123=-", "* /%$123=-"}}, {0, 0}}, + {"abc->12..>JKL", {{"JKL<..12<-abc", "JKL<..abc->12"}, + {"JKL<..12<-abc", "JKL<..abc->12"}}, {0, 0}}, + {"JKL->12..>abc", {{"abc<..JKL->12", "abc<..12<-JKL"}, + {"abc<..JKL->12", "abc<..12<-JKL"}}, {0, 0}}, + {"123->abc", {{"abc<-123", "abc<-123"}, + {"abc&<-123", "abc<-123"}}, {1, 0}}, + {"123->JKL", {{"JKL<-123", "123->JKL"}, + {"JKL<-123", "JKL<-@123"}}, {0, 1}}, + {"*>12.>34->JKL", {{"JKL<-34<.12<*", "12.>34->JKL<*"}, + {"JKL<-34<.12<*", "JKL<-@34<.12<*"}}, {0, 1}}, + {"*>67.>89->JKL", {{"67.>89->JKL<*", "67.>89->JKL<*"}, + {"67.>89->JKL<*", "67.>89->JKL<*"}}, {0, 0}}, + {"* /abc-=$%123", {{"$%123=-abc/ *", "abc-=$%123/ *"}, + {"$%123=-abc/ *", "abc-=$%123/ *"}}, {0, 0}}, + {"* /$%def-=123", {{"123=-def%$/ *", "def-=123%$/ *"}, + {"123=-def%$/ *", "def-=123%$/ *"}}, {0, 0}}, + {"-=GHI* /123%$", {{"GHI* /123%$=-", "123%$/ *GHI=-"}, + {"GHI* /123%$=-", "123%$/ *GHI=-"}}, {0, 0}}, + {"-=%$JKL* /123", {{"JKL* /%$123=-", "123/ *JKL$%=-"}, + {"JKL* /%$123=-", "123/ *JKL$%=-"}}, {0, 0}}, + {"ab =#CD *?450", {{"CD *?450#= ab", "450?* CD#= ab"}, + {"CD *?450#= ab", "450?* CD#= ab"}}, {0, 0}}, + {"ab 234 896 de", {{"de 896 ab 234", "de 896 ab 234"}, + {"ab 234 @896@ de", "de 896 ab 234"}}, {0, 0}}, + {"abc-=%$LMN* /123", {{"LMN* /%$123=-abc", "123/ *LMN$%=-abc"}, + {"LMN* /%$123=-abc", "123/ *LMN$%=-abc"}}, {0, 0}}, + {"123->JKL&MN&P", {{"JKLMNP<-123", "123->JKLMNP"}, + {"JKLMNP<-123", "JKLMNP<-@123"}}, {0, 1}} + }; + UBiDi *pBiDi = getBiDiObject(); + UBiDi *pL2VBiDi = getBiDiObject(); + UChar src[MAXLEN], dest[MAXLEN], visual1[MAXLEN], visual2[MAXLEN]; + char destChars[MAXLEN], vis1Chars[MAXLEN], vis2Chars[MAXLEN]; + int32_t srcLen, destLen, vis1Len, vis2Len, option, i, j, nCases; + UErrorCode rc = U_ZERO_ERROR; + UBiDiLevel level; + if(!pL2VBiDi) { + ubidi_close(pBiDi); /* in case this one was allocated */ + return; + } + ubidi_setReorderingMode(pBiDi, UBIDI_REORDER_RUNS_ONLY); + ubidi_setReorderingOptions(pL2VBiDi, UBIDI_OPTION_REMOVE_CONTROLS); + + for (option = 0; option < 2; option++) { + ubidi_setReorderingOptions(pBiDi, option==0 ? UBIDI_OPTION_REMOVE_CONTROLS + : UBIDI_OPTION_INSERT_MARKS); + for (i = 0, nCases = LENGTHOF(testCases); i < nCases; i++) { + srcLen = strlen(testCases[i].textIn); + pseudoToU16(srcLen, testCases[i].textIn, src); + for(j = 0; j < 2; j++) { + level = paraLevels[j]; + ubidi_setPara(pBiDi, src, srcLen, level, NULL, &rc); + assertSuccessful("ubidi_setPara", &rc); + *dest = 0; + destLen = ubidi_writeReordered(pBiDi, dest, MAXLEN, UBIDI_DO_MIRRORING, &rc); + assertSuccessful("ubidi_writeReordered", &rc); + u16ToPseudo(destLen, dest, destChars); + assertStringsEqual(testCases[i].textOut[option][level], destChars, + testCases[i].textIn, "UBIDI_REORDER_RUNS_ONLY", + option==0 ? "0" : "UBIDI_OPTION_INSERT_MARKS", + pBiDi); + + if((option==0) && testCases[i].noroundtrip[level]) { + continue; + } + ubidi_setPara(pL2VBiDi, src, srcLen, level, NULL, &rc); + assertSuccessful("ubidi_setPara1", &rc); + *visual1 = 0; + vis1Len = ubidi_writeReordered(pL2VBiDi, visual1, MAXLEN, UBIDI_DO_MIRRORING, &rc); + assertSuccessful("ubidi_writeReordered1", &rc); + u16ToPseudo(vis1Len, visual1, vis1Chars); + ubidi_setPara(pL2VBiDi, dest, destLen, level^1, NULL, &rc); + assertSuccessful("ubidi_setPara2", &rc); + *visual2 = 0; + vis2Len = ubidi_writeReordered(pL2VBiDi, visual2, MAXLEN, UBIDI_DO_MIRRORING, &rc); + assertSuccessful("ubidi_writeReordered2", &rc); + u16ToPseudo(vis2Len, visual2, vis2Chars); + assertStringsEqual(vis1Chars, vis2Chars, + testCases[i].textIn, "UBIDI_REORDER_RUNS_ONLY (2)", + option==0 ? "0" : "UBIDI_OPTION_INSERT_MARKS", + pBiDi); + } + } + } + ubidi_close(pBiDi); + ubidi_close(pL2VBiDi); +} + +static void +doReorderingModeBidiTest() { + + UChar src[MAXLEN], dest[MAXLEN]; + char destChars[MAXLEN]; + UBiDi *pBiDi = NULL, *pBiDi2 = NULL, *pBiDi3 = NULL; + UErrorCode rc; + int tc, mode, option, level; + uint32_t modeValue, modeBack, optionValue, optionBack; + int32_t srcLen, destLen, index; + const char *expectedChars; + UBool testOK = TRUE; + + log_verbose("\n*** Bidi reordering mode test ***\n"); + + pBiDi = getBiDiObject(); + pBiDi2 = getBiDiObject(); + pBiDi3 = getBiDiObject(); + if(!pBiDi3) { + ubidi_close(pBiDi); /* in case this one was allocated */ + ubidi_close(pBiDi2); /* in case this one was allocated */ + return; + } + + ubidi_setInverse(pBiDi2, TRUE); + + for (tc = 0; tc < TC_COUNT; tc++) { + const char* srcChars = textIn[tc]; + srcLen = strlen(srcChars); + pseudoToU16(srcLen, srcChars, src); + + for (mode = 0; mode < MODES_COUNT; mode++) { + modeValue = modes[mode].value; + ubidi_setReorderingMode(pBiDi, modeValue); + modeBack = ubidi_getReorderingMode(pBiDi); + if (modeValue != modeBack) { + log_err("Error while setting reordering mode to %d, returned %d\n", + modeValue, modeBack); + } + + for (option = 0; option < OPTIONS_COUNT; option++) { + optionValue = options[option].value; + ubidi_setReorderingOptions(pBiDi, optionValue); + optionBack = ubidi_getReorderingOptions(pBiDi); + if (optionValue != optionBack) { + log_err("Error while setting reordering option to %d, returned %d\n", + optionValue, optionBack); + } + + for (level = 0; level < LEVELS_COUNT; level++) { + log_verbose("starting test %d mode=%d option=%d level=%d\n", + tc, modes[mode].value, options[option].value, level); + rc = U_ZERO_ERROR; + ubidi_setPara(pBiDi, src, srcLen, paraLevels[level], NULL, &rc); + assertSuccessful("ubidi_setPara", &rc); + + *dest = 0; + destLen = ubidi_writeReordered(pBiDi, dest, MAXLEN, + UBIDI_DO_MIRRORING, &rc); + assertSuccessful("ubidi_writeReordered", &rc); + u16ToPseudo(destLen, dest, destChars); + + if (modes[mode].value == UBIDI_REORDER_INVERSE_NUMBERS_AS_L) { + index = -1; + expectedChars = inverseBasic(pBiDi2, src, srcLen, + options[option].value, paraLevels[level], destChars); + } + else { + index = outIndices[tc][mode][option][level]; + expectedChars = textOut[index]; + } + if (!assertStringsEqual(expectedChars, destChars, srcChars, + modes[mode].description, + options[option].description, + pBiDi)) { + testOK = FALSE; + } + else if (options[option].value == UBIDI_OPTION_INSERT_MARKS && + !assertRoundTrip(pBiDi3, tc, index, srcChars, + destChars, dest, destLen, + mode, option, paraLevels[level])) { + testOK = FALSE; + } + else if (!checkResultLength(pBiDi, srcChars, destChars, + dest, destLen, modes[mode].description, + options[option].description, + paraLevels[level])) { + testOK = FALSE; + } + else if (index > -1 && !testMaps(pBiDi, index, srcChars, + destChars, modes[mode].description, + options[option].description, paraLevels[level], + TRUE)) { + testOK = FALSE; + } + } + } + } + } + if (testOK == TRUE) { + log_verbose("\nReordering mode test OK\n"); + } + ubidi_close(pBiDi3); + ubidi_close(pBiDi2); + ubidi_close(pBiDi); +} + +static const char* inverseBasic(UBiDi *pBiDi, const UChar *src, int32_t srcLen, + uint32_t option, UBiDiLevel level, char *result) { + UErrorCode rc = U_ZERO_ERROR; + int32_t destLen; + UChar dest2 [MAXLEN]; + + if (pBiDi == NULL || src == NULL) { + return NULL; + } + ubidi_setReorderingOptions(pBiDi, option); + ubidi_setPara(pBiDi, src, srcLen, level, NULL, &rc); + assertSuccessful("ubidi_setPara", &rc); + + *dest2 = 0; + destLen = ubidi_writeReordered(pBiDi, dest2, MAXLEN, + UBIDI_DO_MIRRORING, &rc); + assertSuccessful("ubidi_writeReordered", &rc); + u16ToPseudo(destLen, dest2, result); + return result; +} + +#define NULL_CHAR '\0' + +static void +doBidiStreamingTest() { +#define MAXPORTIONS 10 + + static const struct { + const char* textIn; + short int chunk; + short int nPortions[2]; + char portionLens[2][MAXPORTIONS]; + const char* message[2]; + } testData[] = { + { "123\\u000A" + "abc45\\u000D" + "67890\\u000A" + "\\u000D" + "02468\\u000D" + "ghi", + 6, { 6, 6 }, {{ 6, 4, 6, 1, 6, 3}, { 4, 6, 6, 1, 6, 3 }}, + {"6, 4, 6, 1, 6, 3", "4, 6, 6, 1, 6, 3"} + }, + { "abcd\\u000Afgh\\u000D12345\\u000A456", + 6, { 4, 4 }, {{ 6, 3, 6, 3 }, { 5, 4, 6, 3 }}, + {"6, 3, 6, 3", "5, 4, 6, 3"} + }, + { "abcd\\u000Afgh\\u000D12345\\u000A45\\u000D", + 6, { 4, 4 }, {{ 6, 3, 6, 3 }, { 5, 4, 6, 3 }}, + {"6, 3, 6, 3", "5, 4, 6, 3"} + }, + { "abcde\\u000Afghi", + 10, { 1, 2 }, {{ 10 }, { 6, 4 }}, + {"10", "6, 4"} + } + }; + UChar src[MAXLEN]; + UBiDi *pBiDi = NULL; + UChar *pSrc; + UErrorCode rc = U_ZERO_ERROR; + int32_t srcLen, processedLen, chunk, len, nPortions; + int i, j, levelIndex; + UBiDiLevel level; + int nTests = LENGTHOF(testData), nLevels = LENGTHOF(paraLevels); + UBool mismatch, testOK = TRUE; + char processedLenStr[MAXPORTIONS * 5]; + + log_verbose("\n*** Bidi streaming test ***\n"); + + pBiDi = getBiDiObject(); + + ubidi_orderParagraphsLTR(pBiDi, TRUE); + + for (levelIndex = 0; levelIndex < nLevels; levelIndex++) { + for (i = 0; i < nTests; i++) { + srcLen = u_unescape(testData[i].textIn, src, MAXLEN); + chunk = testData[i].chunk; + nPortions = testData[i].nPortions[levelIndex]; + level = paraLevels[levelIndex]; + *processedLenStr = NULL_CHAR; + + mismatch = FALSE; + + ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_STREAMING); + for (j = 0, pSrc = src; j < MAXPORTIONS && srcLen > 0; j++) { + + len = chunk < srcLen ? chunk : srcLen; + ubidi_setPara(pBiDi, pSrc, len, level, NULL, &rc); + assertSuccessful("ubidi_setPara", &rc); + + processedLen = ubidi_getProcessedLength(pBiDi); + if (processedLen == 0) { + ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_DEFAULT); + j--; + continue; + } + ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_STREAMING); + + mismatch = j >= nPortions || + processedLen != testData[i].portionLens[levelIndex][j]; + + sprintf(processedLenStr + j * 4, "%4d", processedLen); + srcLen -= processedLen, pSrc += processedLen; + } + + if (mismatch || j != nPortions) { + testOK = FALSE; + log_err("\nProcessed lengths mismatch.\n" + "\tParagraph level: %u\n" + "\tInput string: %s\n" + "\tActually processed portion lengths: { %s }\n" + "\tExpected portion lengths : { %s }\n", + paraLevels[levelIndex], testData[i].textIn, + processedLenStr, testData[i].message[levelIndex]); + } + } + } + ubidi_close(pBiDi); + if (testOK == TRUE) { + log_verbose("\nBiDi streaming test OK\n"); + } +} + +U_CDECL_BEGIN + +static UCharDirection U_CALLCONV +overrideBidiClass(const void *context, UChar32 c) { + +#define DEF U_BIDI_CLASS_DEFAULT + + static const UCharDirection customClasses[] = { + /* 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F */ + DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 00-07 */ + DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 08-0F */ + DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 10-17 */ + DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 18-1F */ + DEF, DEF, DEF, DEF, DEF, DEF, R, DEF, /* 20-27 */ + DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 28-2F */ + EN, EN, EN, EN, EN, EN, AN, AN, /* 30-37 */ + AN, AN, DEF, DEF, DEF, DEF, DEF, DEF, /* 38-3F */ + L, AL, AL, AL, AL, AL, AL, R, /* 40-47 */ + R, R, R, R, R, R, R, R, /* 48-4F */ + R, R, R, R, R, R, R, R, /* 50-57 */ + R, R, R, LRE, DEF, RLE, PDF, S, /* 58-5F */ + NSM, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 60-67 */ + DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 68-6F */ + DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 70-77 */ + DEF, DEF, DEF, LRO, B, RLO, BN, DEF /* 78-7F */ + }; + static const int nEntries = LENGTHOF(customClasses); + + return c >= nEntries ? U_BIDI_CLASS_DEFAULT : customClasses[c]; +} + +U_CDECL_END + +static void verifyCallbackParams(UBiDiClassCallback* fn, const void* context, + UBiDiClassCallback* expectedFn, + const void* expectedContext, + int32_t sizeOfContext) { + if (fn != expectedFn) { + log_err("Class callback pointer is not set properly.\n"); + } + if (context != expectedContext) { + log_err("Class callback context is not set properly.\n"); + } + else if (context != NULL && + memcmp(context, expectedContext, sizeOfContext)) { + log_err("Callback context content doesn't match the expected one.\n"); + } +} + +static void doBidiClassOverrideTest(void) { + static const char* const textSrc = "JIH.>12->a \\u05D0\\u05D1 6 ABC78"; + static const char* const textResult = "12<.HIJ->a 78CBA 6 \\u05D1\\u05D0"; + + UChar src[MAXLEN], dest[MAXLEN]; + UErrorCode rc = U_ZERO_ERROR; + UBiDi *pBiDi = NULL; + UBiDiClassCallback* oldFn = NULL; + UBiDiClassCallback* newFn = overrideBidiClass; + const void* oldContext = NULL; + int32_t srcLen, destLen, textSrcSize = (int32_t)uprv_strlen(textSrc); + char* destChars = NULL; + + log_verbose("\n*** Bidi class override test ***\n"); + + pBiDi = getBiDiObject(); + if(!pBiDi) { + return; + } + + ubidi_getClassCallback(pBiDi, &oldFn, &oldContext); + verifyCallbackParams(oldFn, oldContext, NULL, NULL, 0); + + ubidi_setClassCallback(pBiDi, newFn, textSrc, &oldFn, &oldContext, &rc); + if (!assertSuccessful("ubidi_setClassCallback", &rc)) { + ubidi_close(pBiDi); + return; + } + verifyCallbackParams(oldFn, oldContext, NULL, NULL, 0); + + ubidi_getClassCallback(pBiDi, &oldFn, &oldContext); + verifyCallbackParams(oldFn, oldContext, newFn, textSrc, textSrcSize); + + ubidi_setClassCallback(pBiDi, newFn, textSrc, &oldFn, &oldContext, &rc); + if (!assertSuccessful("ubidi_setClassCallback", &rc)) { + ubidi_close(pBiDi); + return; + } + verifyCallbackParams(oldFn, oldContext, newFn, textSrc, textSrcSize); + + srcLen = u_unescape(textSrc, src, MAXLEN); + ubidi_setPara(pBiDi, src, srcLen, UBIDI_LTR, NULL, &rc); + assertSuccessful("ubidi_setPara", &rc); + + destLen = ubidi_writeReordered(pBiDi, dest, MAXLEN, + UBIDI_DO_MIRRORING, &rc); + assertSuccessful("ubidi_writeReordered", &rc); + + destChars = aescstrdup(dest, destLen); + if (uprv_strcmp(textResult, destChars)) { + log_err("\nActual and expected output mismatch.\n" + "%20s %s\n%20s %s\n%20s %s\n", + "Input:", textSrc, "Actual output:", destChars, + "Expected output:", textResult); + } + else { + log_verbose("\nClass override test OK\n"); + } + ubidi_close(pBiDi); +} + +static char * formatMap(const int32_t * map, int len, char * buffer) +{ + int32_t i, k; + char c; + for (i = 0; i < len; i++) { + k = map[i]; + if (k < 0) + c = '-'; + else if (k >= sizeof columns) + c = '+'; + else + c = columns[k]; + buffer[i] = c; + } + buffer[len] = '\0'; + return buffer; +} + +static UBool +testMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, const char *dest, + const char *mode, const char* option, UBiDiLevel level, UBool forward) +{ + int32_t actualLogicalMap[MAX_MAP_LENGTH]; + int32_t actualVisualMap[MAX_MAP_LENGTH]; + int32_t getIndexMap[MAX_MAP_LENGTH]; + int32_t i, srcLen, resLen, index; + const int32_t *expectedLogicalMap, *expectedVisualMap; + UErrorCode rc = U_ZERO_ERROR; + UBool testOK = TRUE; + + if (forward) { + expectedLogicalMap = forwardMap[stringIndex]; + expectedVisualMap = inverseMap[stringIndex]; + } + else { + expectedLogicalMap = inverseMap[stringIndex]; + expectedVisualMap = forwardMap[stringIndex]; + } + ubidi_getLogicalMap(pBiDi, actualLogicalMap, &rc); + if (!assertSuccessful("ubidi_getLogicalMap", &rc)) { + testOK = FALSE; + } + srcLen = ubidi_getProcessedLength(pBiDi); + if (memcmp(expectedLogicalMap, actualLogicalMap, srcLen * sizeof(int32_t))) { + char expChars[MAX_MAP_LENGTH]; + char actChars[MAX_MAP_LENGTH]; + log_err("\nubidi_getLogicalMap() returns unexpected map for output string " + "index %d\n" + "source: %s\n" + "dest : %s\n" + "Scale : %s\n" + "ExpMap: %s\n" + "Actual: %s\n" + "Paragraph level : %d == %d\n" + "Reordering mode : %s == %d\n" + "Reordering option: %s == %d\n" + "Forward flag : %d\n", + stringIndex, src, dest, columns, + formatMap(expectedLogicalMap, srcLen, expChars), + formatMap(actualLogicalMap, srcLen, actChars), + level, ubidi_getParaLevel(pBiDi), + mode, ubidi_getReorderingMode(pBiDi), + option, ubidi_getReorderingOptions(pBiDi), + forward + ); + testOK = FALSE; + } + resLen = ubidi_getResultLength(pBiDi); + ubidi_getVisualMap(pBiDi, actualVisualMap, &rc); + assertSuccessful("ubidi_getVisualMap", &rc); + if (memcmp(expectedVisualMap, actualVisualMap, resLen * sizeof(int32_t))) { + char expChars[MAX_MAP_LENGTH]; + char actChars[MAX_MAP_LENGTH]; + log_err("\nubidi_getVisualMap() returns unexpected map for output string " + "index %d\n" + "source: %s\n" + "dest : %s\n" + "Scale : %s\n" + "ExpMap: %s\n" + "Actual: %s\n" + "Paragraph level : %d == %d\n" + "Reordering mode : %s == %d\n" + "Reordering option: %s == %d\n" + "Forward flag : %d\n", + stringIndex, src, dest, columns, + formatMap(expectedVisualMap, resLen, expChars), + formatMap(actualVisualMap, resLen, actChars), + level, ubidi_getParaLevel(pBiDi), + mode, ubidi_getReorderingMode(pBiDi), + option, ubidi_getReorderingOptions(pBiDi), + forward + ); + testOK = FALSE; + } + for (i = 0; i < srcLen; i++) { + index = ubidi_getVisualIndex(pBiDi, i, &rc); + assertSuccessful("ubidi_getVisualIndex", &rc); + getIndexMap[i] = index; + } + if (memcmp(actualLogicalMap, getIndexMap, srcLen * sizeof(int32_t))) { + char actChars[MAX_MAP_LENGTH]; + char gotChars[MAX_MAP_LENGTH]; + log_err("\nMismatch between ubidi_getLogicalMap and ubidi_getVisualIndex for output string " + "index %d\n" + "source: %s\n" + "dest : %s\n" + "Scale : %s\n" + "ActMap: %s\n" + "IdxMap: %s\n" + "Paragraph level : %d == %d\n" + "Reordering mode : %s == %d\n" + "Reordering option: %s == %d\n" + "Forward flag : %d\n", + stringIndex, src, dest, columns, + formatMap(actualLogicalMap, srcLen, actChars), + formatMap(getIndexMap, srcLen, gotChars), + level, ubidi_getParaLevel(pBiDi), + mode, ubidi_getReorderingMode(pBiDi), + option, ubidi_getReorderingOptions(pBiDi), + forward + ); + testOK = FALSE; + } + for (i = 0; i < resLen; i++) { + index = ubidi_getLogicalIndex(pBiDi, i, &rc); + assertSuccessful("ubidi_getLogicalIndex", &rc); + getIndexMap[i] = index; + } + if (memcmp(actualVisualMap, getIndexMap, resLen * sizeof(int32_t))) { + char actChars[MAX_MAP_LENGTH]; + char gotChars[MAX_MAP_LENGTH]; + log_err("\nMismatch between ubidi_getVisualMap and ubidi_getLogicalIndex for output string " + "index %d\n" + "source: %s\n" + "dest : %s\n" + "Scale : %s\n" + "ActMap: %s\n" + "IdxMap: %s\n" + "Paragraph level : %d == %d\n" + "Reordering mode : %s == %d\n" + "Reordering option: %s == %d\n" + "Forward flag : %d\n", + stringIndex, src, dest, columns, + formatMap(actualVisualMap, resLen, actChars), + formatMap(getIndexMap, resLen, gotChars), + level, ubidi_getParaLevel(pBiDi), + mode, ubidi_getReorderingMode(pBiDi), + option, ubidi_getReorderingOptions(pBiDi), + forward + ); + testOK = FALSE; + } + return testOK; +} + diff --git a/Build/source/libs/icu-xetex/test/cintltst/ccaltst.c b/Build/source/libs/icu-xetex/test/cintltst/ccaltst.c index fd1e14ef253..08a81699e38 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/ccaltst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/ccaltst.c @@ -1,16 +1,16 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ -/******************************************************************************** +/****************************************************************************** * * File CCALTST.C * * Modification History: * Name Description * Madhu Katragadda Creation -*********************************************************************************/ +*******************************************************************************/ /* C API AND FUNCTIONALITY TEST FOR CALENDAR (ucol.h)*/ @@ -28,6 +28,8 @@ #include "ccaltst.h" #include "cformtst.h" +void TestGregorianChange(void); + void addCalTest(TestNode** root); void addCalTest(TestNode** root) @@ -40,7 +42,7 @@ void addCalTest(TestNode** root) addTest(root, &TestGetLimits, "tsformat/ccaltst/TestGetLimits"); addTest(root, &TestDOWProgression, "tsformat/ccaltst/TestDOWProgression"); addTest(root, &TestGMTvsLocal, "tsformat/ccaltst/TestGMTvsLocal"); - + addTest(root, &TestGregorianChange, "tsformat/ccaltst/TestGregorianChange"); } /* "GMT" */ @@ -894,7 +896,7 @@ static void TestGetLimits() val = ucal_get(cal, UCAL_DAY_OF_WEEK, &status); min = ucal_getLimit(cal, UCAL_DAY_OF_WEEK, UCAL_MINIMUM, &status); max = ucal_getLimit(cal, UCAL_DAY_OF_WEEK, UCAL_MAXIMUM, &status); - if ( (min != UCAL_SUNDAY || max != UCAL_SATURDAY ) && (min > val > max) && (val != UCAL_FRIDAY)){ + if ( (min != UCAL_SUNDAY || max != UCAL_SATURDAY ) && (min > val && val > max) && (val != UCAL_FRIDAY)){ log_err("FAIL: Min/max bad\n"); log_err("FAIL: Day of week %d out of range\n", val); log_err("FAIL: FAIL: Day of week should be SUNDAY Got %d\n", val); @@ -905,7 +907,7 @@ static void TestGetLimits() val = ucal_get(cal, UCAL_DAY_OF_WEEK_IN_MONTH, &status); min = ucal_getLimit(cal, UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_MINIMUM, &status); max = ucal_getLimit(cal, UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_MAXIMUM, &status); - if ( (min != 0 || max != 5 ) && (min > val > max) && (val != 1)){ + if ( (min != 0 || max != 5 ) && (min > val && val > max) && (val != 1)){ log_err("FAIL: Min/max bad\n"); log_err("FAIL: Day of week in month %d out of range\n", val); log_err("FAIL: FAIL: Day of week in month should be SUNDAY Got %d\n", val); @@ -937,7 +939,7 @@ static void TestGetLimits() ac_min=ucal_getLimit(cal, UCAL_MINUTE, UCAL_ACTUAL_MINIMUM, &status); ac_max=ucal_getLimit(cal, UCAL_SECOND, UCAL_ACTUAL_MAXIMUM, &status); if( (min!=0 || max!= 11 || gr_min!=0 || le_max!=60 || ac_min!=0 || ac_max!=60) && - (min>val>max) && val!=4){ + (min>val && val>max) && val!=4){ log_err("FAIL: Min/max bad\n"); log_err("FAIL: Hour of Day %d out of range\n", val); @@ -1273,4 +1275,50 @@ static void verify2(const char* msg, UCalendar* c, UDateFormat* dat, int32_t yea } +void TestGregorianChange() { + static const UChar utc[] = { 0x45, 0x74, 0x63, 0x2f, 0x47, 0x4d, 0x54, 0 }; /* "Etc/GMT" */ + const int32_t dayMillis = 86400 * INT64_C(1000); /* 1 day = 86400 seconds */ + UCalendar *cal; + UDate date; + UErrorCode errorCode = U_ZERO_ERROR; + + /* Test ucal_setGregorianChange() on a Gregorian calendar. */ + errorCode = U_ZERO_ERROR; + cal = ucal_open(utc, -1, "", UCAL_GREGORIAN, &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucal_open(UTC) failed: %s\n", u_errorName(errorCode)); + return; + } + ucal_setGregorianChange(cal, -365 * (dayMillis * (UDate)1), &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucal_setGregorianChange(1969) failed: %s\n", u_errorName(errorCode)); + } else { + date = ucal_getGregorianChange(cal, &errorCode); + if(U_FAILURE(errorCode) || date != -365 * (dayMillis * (UDate)1)) { + log_err("ucal_getGregorianChange() failed: %s, date = %f\n", u_errorName(errorCode), date); + } + } + ucal_close(cal); + + /* Test ucal_setGregorianChange() on a non-Gregorian calendar where it should fail. */ + errorCode = U_ZERO_ERROR; + cal = ucal_open(utc, -1, "th@calendar=buddhist", UCAL_TRADITIONAL, &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucal_open(UTC, non-Gregorian) failed: %s\n", u_errorName(errorCode)); + return; + } + ucal_setGregorianChange(cal, -730 * (dayMillis * (UDate)1), &errorCode); + if(errorCode != U_UNSUPPORTED_ERROR) { + log_err("ucal_setGregorianChange(non-Gregorian calendar) did not yield U_UNSUPPORTED_ERROR but %s\n", + u_errorName(errorCode)); + } + errorCode = U_ZERO_ERROR; + date = ucal_getGregorianChange(cal, &errorCode); + if(errorCode != U_UNSUPPORTED_ERROR) { + log_err("ucal_getGregorianChange(non-Gregorian calendar) did not yield U_UNSUPPORTED_ERROR but %s\n", + u_errorName(errorCode)); + } + ucal_close(cal); +} + #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/Build/source/libs/icu-xetex/test/cintltst/ccapitst.c b/Build/source/libs/icu-xetex/test/cintltst/ccapitst.c index dfe75b05f35..daa73bd5aeb 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/ccapitst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/ccapitst.c @@ -1,16 +1,16 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ -/******************************************************************************** +/******************************************************************************* * * File CU_CAPITST.C * * Modification History: * Name Description * Madhu Katragadda Ported for C API -********************************************************************************* +******************************************************************************** */ #include <stdio.h> #include <stdlib.h> @@ -22,6 +22,7 @@ #include "unicode/putil.h" #include "unicode/ustring.h" #include "ucnv_bld.h" /* for sizeof(UConverter) */ +#include "cmemory.h" /* for UAlignedMemory */ #include "cintltst.h" #include "ccapitst.h" @@ -100,13 +101,21 @@ static void TestCCSID(void); static void TestJ932(void); static void TestJ1968(void); static void TestLMBCSMaxChar(void); + +#if !UCONFIG_NO_LEGACY_CONVERSION static void TestConvertSafeCloneCallback(void); +#endif + static void TestEBCDICSwapLFNL(void); static void TestConvertEx(void); static void TestConvertAlgorithmic(void); void TestDefaultConverterError(void); /* defined in cctest.c */ static void TestToUCountPending(void); -static void TestFromUCountPending(void); +static void TestFromUCountPending(void); +static void TestDefaultName(void); +static void TestCompareNames(void); +static void TestSubstString(void); + void addTestConvert(TestNode** root); void addTestConvert(TestNode** root) @@ -116,8 +125,12 @@ void addTestConvert(TestNode** root) addTest(root, &TestFlushCache, "tsconv/ccapitst/TestFlushCache"); addTest(root, &TestAlias, "tsconv/ccapitst/TestAlias"); addTest(root, &TestDuplicateAlias, "tsconv/ccapitst/TestDuplicateAlias"); - addTest(root, &TestConvertSafeClone, "tsconv/ccapitst/TestConvertSafeClone"); - addTest(root, &TestConvertSafeCloneCallback,"tsconv/ccapitst/TestConvertSafeCloneCallback"); + addTest(root, &TestConvertSafeClone, "tsconv/ccapitst/TestConvertSafeClone"); + +#if !UCONFIG_NO_LEGACY_CONVERSION + addTest(root, &TestConvertSafeCloneCallback,"tsconv/ccapitst/TestConvertSafeCloneCallback"); +#endif + addTest(root, &TestCCSID, "tsconv/ccapitst/TestCCSID"); addTest(root, &TestJ932, "tsconv/ccapitst/TestJ932"); addTest(root, &TestJ1968, "tsconv/ccapitst/TestJ1968"); @@ -128,6 +141,9 @@ void addTestConvert(TestNode** root) addTest(root, &TestDefaultConverterError, "tsconv/ccapitst/TestDefaultConverterError"); addTest(root, &TestToUCountPending, "tsconv/ccapitst/TestToUCountPending"); addTest(root, &TestFromUCountPending, "tsconv/ccapitst/TestFromUCountPending"); + addTest(root, &TestDefaultName, "tsconv/ccapitst/TestDefaultName"); + addTest(root, &TestCompareNames, "tsconv/ccapitst/TestCompareNames"); + addTest(root, &TestSubstString, "tsconv/ccapitst/TestSubstString"); } static void ListNames(void) { @@ -153,7 +169,10 @@ static void ListNames(void) { count1++; log_verbose("read \"%s\", length %i\n", string, len); } - err = U_ZERO_ERROR; + if (U_FAILURE(err)) { + log_err("FAILURE! uenum_next(allNamesEnum...) set an error: %s\n", u_errorName(err)); + err = U_ZERO_ERROR; + } uenum_reset(allNamesEnum, &err); while ((string = uenum_next(allNamesEnum, &len, &err))) { count2++; @@ -241,6 +260,7 @@ static void ListNames(void) { static void TestConvert() { +#if !UCONFIG_NO_LEGACY_CONVERSION char myptr[4]; char save[4]; int32_t testLong1 = 0; @@ -511,23 +531,6 @@ static void TestConvert() log_verbose("getName(someConverters[1]) returned %s\n", ucnv_getName(someConverters[1], &err)); } - /*Testing ucnv_getDefaultName() and ucnv_setDefaultNAme()*/ - { - static char defaultName[UCNV_MAX_CONVERTER_NAME_LENGTH + 1]; - strcpy(defaultName, ucnv_getDefaultName()); - - log_verbose("getDefaultName returned %s\n", defaultName); - - /*change the default name by setting it */ - ucnv_setDefaultName("changed"); - if(strcmp(ucnv_getDefaultName(), "changed")==0) - log_verbose("setDefaultName o.k"); - else - log_err("setDefaultName failed"); - /*set the default name back*/ - ucnv_setDefaultName(defaultName); - } - ucnv_close(someConverters[0]); ucnv_close(someConverters[1]); ucnv_close(someConverters[2]); @@ -1067,6 +1070,7 @@ static void TestConvert() free((void*)output_cp_buffer); free((void*)ucs_file_buffer); free((void*)my_ucs_file_buffer); +#endif } static UConverterFromUCallback otherUnicodeAction(UConverterFromUCallback MIA) @@ -1081,6 +1085,7 @@ static UConverterToUCallback otherCharAction(UConverterToUCallback MIA) } static void TestFlushCache(void) { +#if !UCONFIG_NO_LEGACY_CONVERSION UErrorCode err = U_ZERO_ERROR; UConverter* someConverters[5]; int flushCount = 0; @@ -1150,7 +1155,7 @@ static void TestFlushCache(void) { log_verbose("Flush cache ok\n"); else log_data_err("Flush Cache failed line %d, expected 1 got %d \n", __LINE__, flushCount); - +#endif } /** @@ -1399,6 +1404,7 @@ static void TSCC_fromU(const void *context, UErrorCode subErr = U_ZERO_ERROR; TSCCContext *newCtx; TSCCContext *junkCtx; + TSCCContext **pjunkCtx = &junkCtx; /* "recreate" it */ log_verbose("TSCC_fromU: cloning..\n"); @@ -1409,7 +1415,7 @@ static void TSCC_fromU(const void *context, } /* now, SET it */ - ucnv_getFromUCallBack(fromUArgs->converter, &junkFrom, (const void**)&junkCtx); + ucnv_getFromUCallBack(fromUArgs->converter, &junkFrom, (const void**)pjunkCtx); ucnv_setFromUCallBack(fromUArgs->converter, junkFrom, newCtx, NULL, NULL, &subErr); if(U_FAILURE(subErr)) { @@ -1445,6 +1451,7 @@ static void TSCC_toU(const void *context, UErrorCode subErr = U_ZERO_ERROR; TSCCContext *newCtx; TSCCContext *junkCtx; + TSCCContext **pjunkCtx = &junkCtx; /* "recreate" it */ log_verbose("TSCC_toU: cloning..\n"); @@ -1455,7 +1462,7 @@ static void TSCC_toU(const void *context, } /* now, SET it */ - ucnv_getToUCallBack(toUArgs->converter, &junkFrom, (const void**)&junkCtx); + ucnv_getToUCallBack(toUArgs->converter, &junkFrom, (const void**)pjunkCtx); ucnv_setToUCallBack(toUArgs->converter, junkFrom, newCtx, NULL, NULL, &subErr); if(U_FAILURE(subErr)) { @@ -1490,11 +1497,13 @@ static void TSCC_print_log(TSCCContext *q, const char *name) } } +#if !UCONFIG_NO_LEGACY_CONVERSION static void TestConvertSafeCloneCallback() { UErrorCode err = U_ZERO_ERROR; TSCCContext from1, to1; TSCCContext *from2, *from3, *to2, *to3; + TSCCContext **pfrom2 = &from2, **pfrom3 = &from3, **pto2 = &to2, **pto3 = &to3; char hunk[8192]; int32_t hunkSize = 8192; UConverterFromUCallback junkFrom; @@ -1532,8 +1541,8 @@ static void TestConvertSafeCloneCallback() log_verbose("Cloned to conv2=%p.\n", conv2); /********** from *********************/ - ucnv_getFromUCallBack(conv2, &junkFrom, (const void**)&from2); - ucnv_getFromUCallBack(conv1, &junkFrom, (const void**)&from3); + ucnv_getFromUCallBack(conv2, &junkFrom, (const void**)pfrom2); + ucnv_getFromUCallBack(conv1, &junkFrom, (const void**)pfrom3); TSCC_print_log(from2, "from2"); TSCC_print_log(from3, "from3(==from1)"); @@ -1565,8 +1574,8 @@ static void TestConvertSafeCloneCallback() } /********** to *********************/ - ucnv_getToUCallBack(conv2, &junkTo, (const void**)&to2); - ucnv_getToUCallBack(conv1, &junkTo, (const void**)&to3); + ucnv_getToUCallBack(conv2, &junkTo, (const void**)pto2); + ucnv_getToUCallBack(conv1, &junkTo, (const void**)pto3); TSCC_print_log(to2, "to2"); TSCC_print_log(to3, "to3(==to1)"); @@ -1654,6 +1663,7 @@ static void TestConvertSafeCloneCallback() free(from2); /* from1 is stack based */ } } +#endif static UBool containsAnyOtherByte(uint8_t *p, int32_t length, uint8_t b) { @@ -1671,28 +1681,39 @@ static void TestConvertSafeClone() { /* one 'regular' & all the 'private stateful' converters */ static const char *const names[] = { +#if !UCONFIG_NO_LEGACY_CONVERSION "ibm-1047", "ISO_2022,locale=zh,version=1", +#endif "SCSU", +#if !UCONFIG_NO_LEGACY_CONVERSION "HZ", "lmbcs", "ISCII,version=0", "ISO_2022,locale=kr,version=1", "ISO_2022,locale=jp,version=2", +#endif "BOCU-1", "UTF-7", +#if !UCONFIG_NO_LEGACY_CONVERSION "IMAP-mailbox-name", "ibm-1047-s390" +#else + "IMAP=mailbox-name" +#endif }; + /* store the actual sizes of each converter */ + int32_t actualSizes[LENGTHOF(names)]; + static const int32_t bufferSizes[] = { U_CNV_SAFECLONE_BUFFERSIZE, (int32_t)(3*sizeof(UConverter))/2, /* 1.5*sizeof(UConverter) */ (int32_t)sizeof(UConverter)/2 /* 0.5*sizeof(UConverter) */ }; - char charBuffer [21]; /* Leave at an odd number for alignment testing */ - uint8_t buffer [3] [U_CNV_SAFECLONE_BUFFERSIZE]; + char charBuffer[21]; /* Leave at an odd number for alignment testing */ + uint8_t buffer[3] [U_CNV_SAFECLONE_BUFFERSIZE]; int32_t bufferSize, maxBufferSize; const char *maxName; UConverter * cnv, *cnv2; @@ -1701,9 +1722,9 @@ static void TestConvertSafeClone() char *pCharBuffer; const char *pConstCharBuffer; const char *charBufferLimit = charBuffer + sizeof(charBuffer)/sizeof(*charBuffer); - UChar uniBuffer [] = {0x0058, 0x0059, 0x005A}; /* "XYZ" */ - UChar uniCharBuffer [20]; - char charSourceBuffer [] = { 0x1b, 0x24, 0x42 }; + UChar uniBuffer[] = {0x0058, 0x0059, 0x005A}; /* "XYZ" */ + UChar uniCharBuffer[20]; + char charSourceBuffer[] = { 0x1b, 0x24, 0x42 }; const char *pCharSource = charSourceBuffer; const char *pCharSourceLimit = charSourceBuffer + sizeof(charSourceBuffer); UChar *pUCharTarget = uniCharBuffer; @@ -1808,10 +1829,10 @@ static void TestConvertSafeClone() if(j == 0) { /* preflight to get maxBufferSize */ - bufferSize = 0; - ucnv_safeClone(cnv, NULL, &bufferSize, &err); - if(bufferSize > maxBufferSize) { - maxBufferSize = bufferSize; + actualSizes[index] = 0; + ucnv_safeClone(cnv, NULL, &actualSizes[index], &err); + if(actualSizes[index] > maxBufferSize) { + maxBufferSize = actualSizes[index]; maxName = names[index]; } } @@ -1824,6 +1845,12 @@ static void TestConvertSafeClone() /* close the original immediately to make sure that the clone works by itself */ ucnv_close(cnv); + if( actualSizes[index] <= (bufferSizes[j] - (int32_t)sizeof(UAlignedMemory)) && + err == U_SAFECLONE_ALLOCATED_WARNING + ) { + log_err("ucnv_safeClone(%s) did a heap clone although the buffer was large enough\n", names[index]); + } + /* check if the clone function overwrote any bytes that it is not supposed to touch */ if(bufferSize <= bufferSizes[j]) { /* used the stack buffer */ @@ -1880,9 +1907,14 @@ static void TestConvertSafeClone() log_verbose("ucnv_safeClone(): sizeof(UConverter)=%lu max preflighted clone size=%d (%s) U_CNV_SAFECLONE_BUFFERSIZE=%d\n", sizeof(UConverter), maxBufferSize, maxName, (int)U_CNV_SAFECLONE_BUFFERSIZE); + if(maxBufferSize > U_CNV_SAFECLONE_BUFFERSIZE) { + log_err("ucnv_safeClone(): max preflighted clone size=%d (%s) is larger than U_CNV_SAFECLONE_BUFFERSIZE=%d\n", + maxBufferSize, maxName, (int)U_CNV_SAFECLONE_BUFFERSIZE); + } } static void TestCCSID() { +#if !UCONFIG_NO_LEGACY_CONVERSION UConverter *cnv; UErrorCode errorCode; int32_t ccsids[]={ 37, 850, 943, 949, 950, 1047, 1252, 1392, 33722 }; @@ -1909,6 +1941,7 @@ static void TestCCSID() { ucnv_close(cnv); } +#endif } /* jitterbug 932: ucnv_convert() bugs --------------------------------------- */ @@ -1946,6 +1979,7 @@ TestJ932(void) */ static void bug1() { +#if !UCONFIG_NO_LEGACY_CONVERSION static char char_in[CHUNK_SIZE+32]; static char char_out[CHUNK_SIZE*2]; @@ -1985,6 +2019,7 @@ static void bug1() log_err("error j932 bug 1: expected success, got U_TRUNCATED_CHAR_FOUND\n"); } } +#endif } /* bug2: pre-flighting loop bug: simple overflow causes bug */ @@ -2059,6 +2094,7 @@ static void bug2() */ static void bug3() { +#if !UCONFIG_NO_LEGACY_CONVERSION static char char_in[CHUNK_SIZE*4]; static char target[5]; UErrorCode err = U_ZERO_ERROR; @@ -2113,6 +2149,7 @@ static void bug3() */ log_data_err("error j932 bug 3b: expected 0x%04x, got 0x%04x\n", sizeof(char_in) * 2, size); } +#endif } static void @@ -2221,6 +2258,7 @@ convertExMultiStreaming(UConverter *srcCnv, UConverter *targetCnv, } static void TestConvertEx() { +#if !UCONFIG_NO_LEGACY_CONVERSION static const uint8_t utf8[]={ /* 4e00 30a1 ff61 0410 */ @@ -2349,12 +2387,24 @@ static void TestConvertEx() { log_err("ucnv_convertEx(*source==NULL) sets %s\n", u_errorName(errorCode)); } + /* streaming conversion without a pivot buffer */ + errorCode=U_ZERO_ERROR; + src=srcBuffer; + pivotSource=pivotBuffer; + ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL, + NULL, &pivotSource, &pivotTarget, pivotBuffer+1, TRUE, FALSE, &errorCode); + if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) { + log_err("ucnv_convertEx(pivotStart==NULL) sets %s\n", u_errorName(errorCode)); + } + ucnv_close(cnv1); ucnv_close(cnv2); +#endif } static void TestConvertAlgorithmic() { +#if !UCONFIG_NO_LEGACY_CONVERSION static const uint8_t utf8[]={ /* 4e00 30a1 ff61 0410 */ @@ -2475,6 +2525,7 @@ TestConvertAlgorithmic() { log_err("ucnv_fromAlgorithmic(illegal alg. type) sets %s\n", u_errorName(errorCode)); } ucnv_close(cnv); +#endif } static void TestLMBCSMaxChar(void) { @@ -2634,6 +2685,7 @@ static void TestJ1968(void) { } +#if !UCONFIG_NO_LEGACY_CONVERSION static void testSwap(const char *name, UBool swap) { /* @@ -2787,10 +2839,17 @@ TestEBCDICSwapLFNL() { testSwap(tests[i].name, tests[i].swap); } } +#else +static void +TestEBCDICSwapLFNL() { + /* test nothing... */ +} +#endif + static const UVersionInfo ICU_34 = {3,4,0,0}; static void TestFromUCountPending(){ - +#if !UCONFIG_NO_LEGACY_CONVERSION UErrorCode status = U_ZERO_ERROR; /* const UChar expectedUnicode[] = { 0x20ac, 0x0005, 0x0006, 0x000b, 0xdbc4, 0xde34, 0xd84d, 0xdc56, 0xfffd}; */ static const struct { @@ -2889,10 +2948,12 @@ static void TestFromUCountPending(){ } } ucnv_close(cnv); +#endif } static void TestToUCountPending(){ +#if !UCONFIG_NO_LEGACY_CONVERSION UErrorCode status = U_ZERO_ERROR; static const struct { char input[6]; @@ -3000,5 +3061,188 @@ TestToUCountPending(){ } ucnv_close(cnv); } +#endif +} + +static void TestOneDefaultNameChange(const char *name) { + UErrorCode status = U_ZERO_ERROR; + UConverter *cnv; + ucnv_setDefaultName(name); + if(strcmp(ucnv_getDefaultName(), name)==0) + log_verbose("setDefaultName of %s works.\n", name); + else + log_err("setDefaultName of %s failed\n", name); + cnv=ucnv_open(NULL, &status); + if (U_FAILURE(status) || cnv == NULL) { + log_err("opening the default converter of %s failed\n", name); + return; + } + if(strcmp(ucnv_getName(cnv, &status), name)==0) + log_verbose("ucnv_getName of %s works.\n", name); + else + log_err("ucnv_getName of %s failed\n", name); + ucnv_close(cnv); +} + +static void TestDefaultName(void) { + /*Testing ucnv_getDefaultName() and ucnv_setDefaultNAme()*/ + static char defaultName[UCNV_MAX_CONVERTER_NAME_LENGTH + 1]; + strcpy(defaultName, ucnv_getDefaultName()); + + log_verbose("getDefaultName returned %s\n", defaultName); + + /*change the default name by setting it */ + TestOneDefaultNameChange("UTF-8"); +#if !UCONFIG_NO_LEGACY_CONVERSION + TestOneDefaultNameChange("ISCII,version=1"); + TestOneDefaultNameChange("ISCII,version=2"); +#endif + TestOneDefaultNameChange("ISO-8859-1"); + + /*set the default name back*/ + ucnv_setDefaultName(defaultName); +} + +/* Test that ucnv_compareNames() matches names according to spec. ----------- */ + +static U_INLINE int +sign(int n) { + if(n==0) { + return 0; + } else if(n<0) { + return -1; + } else /* n>0 */ { + return 1; + } +} + +static void +compareNames(const char **names) { + const char *relation, *name1, *name2; + int rel, result; + + relation=*names++; + if(*relation=='=') { + rel = 0; + } else if(*relation=='<') { + rel = -1; + } else { + rel = 1; + } + + name1=*names++; + if(name1==NULL) { + return; + } + while((name2=*names++)!=NULL) { + result=ucnv_compareNames(name1, name2); + if(sign(result)!=rel) { + log_err("ucnv_compareNames(\"%s\", \"%s\")=%d, sign!=%d\n", name1, name2, result, rel); + } + name1=name2; + } +} +static void +TestCompareNames() { + static const char *equalUTF8[]={ "=", "UTF-8", "utf_8", "u*T@f08", "Utf 8", NULL }; + static const char *equalIBM[]={ "=", "ibm-37", "IBM037", "i-B-m 00037", "ibm-0037", "IBM00037", NULL }; + static const char *lessMac[]={ "<", "macos-0_1-10.2", "macos-1-10.0.2", "macos-1-10.2", NULL }; + static const char *lessUTF080[]={ "<", "UTF-0008", "utf$080", "u*T@f0800", "Utf 0000000009", NULL }; + + compareNames(equalUTF8); + compareNames(equalIBM); + compareNames(lessMac); + compareNames(lessUTF080); +} + +static void +TestSubstString() { + static const UChar surrogate[1]={ 0xd900 }; + char buffer[16]; + + static const UChar sub[5]={ 0x61, 0x62, 0x63, 0x64, 0x65 }; + static const char subChars[5]={ 0x61, 0x62, 0x63, 0x64, 0x65 }; + UConverter *cnv; + UErrorCode errorCode; + int32_t length; + int8_t len8; + + /* UTF-16/32: test that the BOM is output before the sub character */ + errorCode=U_ZERO_ERROR; + cnv=ucnv_open("UTF-16", &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucnv_open(UTF-16) failed - %s\n", u_errorName(errorCode)); + return; + } + length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode); + ucnv_close(cnv); + if(U_FAILURE(errorCode) || + length!=4 || + NULL == ucnv_detectUnicodeSignature(buffer, length, NULL, &errorCode) + ) { + log_err("ucnv_fromUChars(UTF-16, U+D900) did not write a BOM\n"); + } + + errorCode=U_ZERO_ERROR; + cnv=ucnv_open("UTF-32", &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucnv_open(UTF-32) failed - %s\n", u_errorName(errorCode)); + return; + } + length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode); + ucnv_close(cnv); + if(U_FAILURE(errorCode) || + length!=8 || + NULL == ucnv_detectUnicodeSignature(buffer, length, NULL, &errorCode) + ) { + log_err("ucnv_fromUChars(UTF-32, U+D900) did not write a BOM\n"); + } + + /* Simple API test of ucnv_setSubstString() + ucnv_getSubstChars(). */ + errorCode=U_ZERO_ERROR; + cnv=ucnv_open("ISO-8859-1", &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucnv_open(ISO-8859-1) failed - %s\n", u_errorName(errorCode)); + return; + } + ucnv_setSubstString(cnv, sub, LENGTHOF(sub), &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucnv_setSubstString(ISO-8859-1, sub[5]) failed - %s\n", u_errorName(errorCode)); + } else { + len8 = sizeof(buffer); + ucnv_getSubstChars(cnv, buffer, &len8, &errorCode); + /* Stateless converter, we expect the string converted to charset bytes. */ + if(U_FAILURE(errorCode) || len8!=sizeof(subChars) || 0!=uprv_memcmp(buffer, subChars, len8)) { + log_err("ucnv_getSubstChars(ucnv_setSubstString(ISO-8859-1, sub[5])) failed - %s\n", u_errorName(errorCode)); + } + } + ucnv_close(cnv); + +#if !UCONFIG_NO_LEGACY_CONVERSION + errorCode=U_ZERO_ERROR; + cnv=ucnv_open("HZ", &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucnv_open(HZ) failed - %s\n", u_errorName(errorCode)); + return; + } + ucnv_setSubstString(cnv, sub, LENGTHOF(sub), &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucnv_setSubstString(HZ, sub[5]) failed - %s\n", u_errorName(errorCode)); + } else { + len8 = sizeof(buffer); + ucnv_getSubstChars(cnv, buffer, &len8, &errorCode); + /* Stateful converter, we expect that the Unicode string was set and that we get an empty char * string now. */ + if(U_FAILURE(errorCode) || len8!=0) { + log_err("ucnv_getSubstChars(ucnv_setSubstString(HZ, sub[5])) failed - %s\n", u_errorName(errorCode)); + } + } + ucnv_close(cnv); +#endif + /* + * Further testing of ucnv_setSubstString() is done via intltest convert. + * We do not test edge cases of illegal arguments and similar because the + * function implementation uses all of its parameters in calls to other + * functions with UErrorCode parameters. + */ } diff --git a/Build/source/libs/icu-xetex/test/cintltst/cdattst.c b/Build/source/libs/icu-xetex/test/cintltst/cdattst.c index 728a1165f8c..3fcdb47e3c0 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cdattst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cdattst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -126,9 +126,9 @@ static void TestDateFormat() for(i=0;i<numlocales;i++) { UErrorCode subStatus = U_ZERO_ERROR; log_verbose("Testing open of %s\n", udat_getAvailable(i)); - any = udat_open(UDAT_SHORT, UDAT_SHORT, udat_getAvailable(i), NULL ,0, NULL, 0, &status); + any = udat_open(UDAT_SHORT, UDAT_SHORT, udat_getAvailable(i), NULL ,0, NULL, 0, &subStatus); if(U_FAILURE(subStatus)) { - log_data_err("FAIL: date format %s (getAvailable(%d)) is not instantiable: %s\n", udat_getAvailable(i), i, u_errorName(subStatus)); + log_data_err("FAIL: date format %s (getAvailable(%d)) is not instantiable: %s\n", udat_getAvailable(i), i, u_errorName(subStatus)); } udat_close(any); } @@ -395,6 +395,7 @@ static void TestSymbols() if(udat_countSymbols(def, UDAT_ERAS)!=2 || udat_countSymbols(def, UDAT_MONTHS)!=12 || udat_countSymbols(def, UDAT_SHORT_MONTHS)!=12 || udat_countSymbols(def, UDAT_WEEKDAYS)!=8 || udat_countSymbols(def, UDAT_SHORT_WEEKDAYS)!=8 || udat_countSymbols(def, UDAT_AM_PMS)!=2 || + udat_countSymbols(def, UDAT_QUARTERS) != 4 || udat_countSymbols(def, UDAT_SHORT_QUARTERS) != 4 || udat_countSymbols(def, UDAT_LOCALIZED_CHARS)!=1) { log_err("FAIL: error in udat_countSymbols\n"); @@ -445,6 +446,10 @@ static void TestSymbols() VerifygetSymbols(def, UDAT_AM_PMS, 1, "PM"); VerifygetSymbols(fr, UDAT_SHORT_MONTHS, 0, "janv."); VerifygetSymbols(def, UDAT_SHORT_MONTHS, 11, "Dec"); + VerifygetSymbols(fr, UDAT_QUARTERS, 0, "1er trimestre"); + VerifygetSymbols(def, UDAT_QUARTERS, 3, "4th quarter"); + VerifygetSymbols(fr, UDAT_SHORT_QUARTERS, 1, "T2"); + VerifygetSymbols(def, UDAT_SHORT_QUARTERS, 2, "Q3"); VerifygetSymbols(def,UDAT_LOCALIZED_CHARS, 0, "GyMdkHmsSEDFwWahKzYeugAZvcL"); @@ -541,11 +546,24 @@ free(pattern); /*run series of tests to test setSymbols regressively*/ log_verbose("\nTesting setSymbols regressively\n"); - VerifysetSymbols(def, UDAT_WEEKDAYS, 1, "Sundayweek"); VerifysetSymbols(def, UDAT_ERAS, 0, "BeforeChrist"); + VerifysetSymbols(def, UDAT_ERA_NAMES, 1, "AnnoDomini"); + VerifysetSymbols(def, UDAT_WEEKDAYS, 1, "Sundayweek"); VerifysetSymbols(def, UDAT_SHORT_WEEKDAYS, 7, "Satweek"); + VerifysetSymbols(def, UDAT_NARROW_WEEKDAYS, 4, "M"); + VerifysetSymbols(def, UDAT_STANDALONE_WEEKDAYS, 1, "Sonntagweek"); + VerifysetSymbols(def, UDAT_STANDALONE_SHORT_WEEKDAYS, 7, "Sams"); + VerifysetSymbols(def, UDAT_STANDALONE_NARROW_WEEKDAYS, 4, "V"); VerifysetSymbols(fr, UDAT_MONTHS, 11, "december"); VerifysetSymbols(fr, UDAT_SHORT_MONTHS, 0, "Jan"); + VerifysetSymbols(fr, UDAT_NARROW_MONTHS, 1, "R"); + VerifysetSymbols(fr, UDAT_STANDALONE_MONTHS, 11, "dezember"); + VerifysetSymbols(fr, UDAT_STANDALONE_SHORT_MONTHS, 7, "Aug"); + VerifysetSymbols(fr, UDAT_STANDALONE_NARROW_MONTHS, 2, "M"); + VerifysetSymbols(fr, UDAT_QUARTERS, 0, "1. Quart"); + VerifysetSymbols(fr, UDAT_SHORT_QUARTERS, 1, "QQ2"); + VerifysetSymbols(fr, UDAT_STANDALONE_QUARTERS, 2, "3rd Quar."); + VerifysetSymbols(fr, UDAT_STANDALONE_SHORT_QUARTERS, 3, "4QQ"); /*run series of tests to test get and setSymbols regressively*/ diff --git a/Build/source/libs/icu-xetex/test/cintltst/cdtdptst.c b/Build/source/libs/icu-xetex/test/cintltst/cdtdptst.c index 31391eb4ccf..d19b7eedac4 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cdtdptst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cdtdptst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -233,11 +233,11 @@ void TestCzechMonths459() UErrorCode status = U_ZERO_ERROR; UChar *date; - ctest_setTimeZone(NULL, &status); + ctest_setTimeZone(NULL, &status); fmt = udat_open(UDAT_FULL, UDAT_FULL, "cs", NULL, 0, NULL, 0, &status); if(U_FAILURE(status)){ log_err("Error in constructing the date format\n"); - ctest_resetTimeZone(); + ctest_resetTimeZone(); return; } lneed=0; @@ -267,10 +267,17 @@ void TestCzechMonths459() } d = udat_parse(fmt, juneStr, u_strlen(juneStr), &pos, &status); date = myDateFormat(fmt, d); - if(u_strcmp(myDateFormat(fmt, june), myDateFormat(fmt, d) ) !=0) - log_err("Error in handling the czech month june\n"); - else - log_verbose("Pass: Date = %s (czech month June)\n", aescstrdup(date, -1)); + + if(U_SUCCESS(status)){ + UChar* out1 = myDateFormat(fmt, june); + UChar* out2 = myDateFormat(fmt, d); + if(u_strcmp(out1, out2) !=0) + log_err("Error in handling the czech month june\n"); + else + log_verbose("Pass: Date = %s (czech month June)\n", aescstrdup(date, -1)); + }else{ + log_err("udat_parse failed. Error. %s\n",u_errorName(status)); + } pos=0; d = udat_parse(fmt, julyStr, u_strlen(julyStr), &pos, &status); date = myDateFormat(fmt, d); @@ -279,7 +286,7 @@ void TestCzechMonths459() else log_verbose("Pass: Date = %s (czech month July)\n", aescstrdup(date, -1)); - ctest_resetTimeZone(); + ctest_resetTimeZone(); udat_close(fmt); ucal_close(cal); free(pattern); diff --git a/Build/source/libs/icu-xetex/test/cintltst/cdtrgtst.c b/Build/source/libs/icu-xetex/test/cintltst/cdtrgtst.c index 7d5b3cbd1ab..3ef0f780af0 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cdtrgtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cdtrgtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -179,7 +179,10 @@ void Test4056591() gotdate=myFormatit(def, got); expdate=myFormatit(def, exp); - if(u_strcmp(gotdate, expdate) !=0){ + if (gotdate == NULL || expdate == NULL) { + log_err("myFormatit failed!\n"); + } + else if(u_strcmp(gotdate, expdate) !=0){ log_err("set2DigitYearStart broken for %s \n got: %s, expected: %s\n", austrdup(s), austrdup(gotdate), austrdup(expdate) ); } @@ -191,6 +194,7 @@ void Test4056591() /** + * SimpleDateFormat does not properly parse date strings without delimiters * @bug 4059917 */ void Test4059917() @@ -219,7 +223,7 @@ void Test4059917() udat_close(def); u_uastrcpy(pattern, "yyyyMMdd"); - def = udat_open(UDAT_IGNORE,UDAT_IGNORE,NULL,NULL,0,pattern, u_strlen(pattern),&status); + def = udat_open(UDAT_IGNORE,UDAT_IGNORE,NULL,tzID,-1,pattern, u_strlen(pattern),&status); if(U_FAILURE(status)) { log_err("FAIL: error in creating the dateformat using openPattern: %s\n", myErrorName(status)); @@ -388,48 +392,46 @@ void Test4073003() return; } u_uastrcpy(temp, "m/D/yy"); - udat_applyPattern(fmt, TRUE, temp, u_strlen(temp)); + udat_applyPattern(fmt, FALSE, temp, u_strlen(temp)); + + for(i= 0; i < 4; i+=2) { + status=U_ZERO_ERROR; + datestr=(UChar*)malloc(sizeof(UChar) * (strlen(tests[i])+1)); + u_uastrcpy(datestr, tests[i]); + + pos=0; + d = udat_parse(fmt, datestr, u_strlen(datestr), &pos, &status); + if(U_FAILURE(status)){ + log_err("ERROR : in test 4073003: %s\n", myErrorName(status)); + } + + free(datestr); + datestr=(UChar*)malloc(sizeof(UChar) * (strlen(tests[i+1])+1)); + u_uastrcpy(datestr, tests[i+1]); - for(i= 0; i < 4; i+=2) { - status=U_ZERO_ERROR; - datestr=(UChar*)malloc(sizeof(UChar) * (strlen(tests[i])+1)); - u_uastrcpy(datestr, tests[i]); - - pos=0; - d = udat_parse(fmt, datestr, u_strlen(datestr), &pos, &status); - if(U_FAILURE(status)){ - log_err("ERROR : in test 4073003: %s\n", myErrorName(status)); - } - - free(datestr); - datestr=(UChar*)malloc(sizeof(UChar) * (strlen(tests[i+1])+1)); - u_uastrcpy(datestr, tests[i+1]); + pos=0; + status=U_ZERO_ERROR; + dd = udat_parse(fmt, datestr, u_strlen(datestr), &pos, &status); + if(U_FAILURE(status)){ + log_err("ERROR : in test 4073003: %s\n", myErrorName(status)); + } + free(datestr); - pos=0; - status=U_ZERO_ERROR; - dd = udat_parse(fmt, datestr, u_strlen(datestr), &pos, &status); - if(U_FAILURE(status)){ - log_err("ERROR : in test 4073003: %s\n", myErrorName(status)); - } - free(datestr); - - result =myFormatit(fmt, d); - result2 =myFormatit(fmt, dd); - if(!result || !result2) { - log_data_err("Fail: could not format - exitting test"); - return; - } - if (u_strcmp(result, result2)!=0){ - log_err("Fail: %s != %s\n", austrdup(result), austrdup(result2) ); - } - else{ + result =myFormatit(fmt, d); + result2 =myFormatit(fmt, dd); + if(!result || !result2) { + log_data_err("Fail: could not format - exitting test\n"); + return; + } + if (u_strcmp(result, result2)!=0){ + log_err("Fail: %s != %s\n", austrdup(result), austrdup(result2) ); + } + else{ log_verbose("Ok: %s == %s\n", austrdup(result), austrdup(result2) ); - } - - - } - udat_close(fmt); + + } + udat_close(fmt); } /** @@ -455,12 +457,12 @@ void Test4162071() pos=0; x = udat_parse(df, datestr, u_strlen(datestr), &pos, &status); if(U_FAILURE(status)){ - log_data_err("ERROR : parse format %s fails : %s\n", austrdup(format), myErrorName(status)); - } + log_data_err("ERROR : parse format %s fails : %s\n", austrdup(format), myErrorName(status)); + } else{ log_verbose("Parse format \"%s \" ok.\n", austrdup(format) ); } - log_verbose("date= %s\n", austrdup(myFormatit(df, x)) ); + /*log_verbose("date= %s\n", austrdup(myFormatit(df, x)) );*/ udat_close(df); } diff --git a/Build/source/libs/icu-xetex/test/cintltst/chashtst.c b/Build/source/libs/icu-xetex/test/cintltst/chashtst.c index 8dd66b45189..c70ae2bca5d 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/chashtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/chashtst.c @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2000-2004, International Business Machines +* Copyright (C) 2000-2005, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * Date Name Description @@ -103,7 +103,7 @@ static void TestBasic(void) { UErrorCode status = U_ZERO_ERROR; UHashtable *hash; - hash = uhash_open(hashChars, isEqualChars, &status); + hash = uhash_open(hashChars, isEqualChars, NULL, &status); if (U_FAILURE(status)) { log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n", u_errorName(status), hash); @@ -163,7 +163,7 @@ static void TestOtherAPI(void){ static const UChar five[6] = {0x0066, 0x0069, 0x0076, 0x0065, 0}; /* L"five" */ static const UChar five2[6] = {0x0066, 0x0069, 0x0076, 0x0065, 0}; /* L"five" */ - hash = uhash_open(uhash_hashUChars, uhash_compareUChars, &status); + hash = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status); if (U_FAILURE(status)) { log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n", u_errorName(status), hash); @@ -287,7 +287,7 @@ static void hashIChars(void) { UErrorCode status = U_ZERO_ERROR; UHashtable *hash; - hash = uhash_open(uhash_hashIChars, uhash_compareIChars, &status); + hash = uhash_open(uhash_hashIChars, uhash_compareIChars, NULL, &status); if (U_FAILURE(status)) { log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n", u_errorName(status), hash); diff --git a/Build/source/libs/icu-xetex/test/cintltst/cintltst.vcproj b/Build/source/libs/icu-xetex/test/cintltst/cintltst.vcproj index ed6a9b2bfcc..6f6a923d41c 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cintltst.vcproj +++ b/Build/source/libs/icu-xetex/test/cintltst/cintltst.vcproj @@ -28,6 +28,7 @@ RuntimeLibrary="1" BufferSecurityCheck="TRUE" DisableLanguageExtensions="TRUE" + TreatWChar_tAsBuiltInType="TRUE" PrecompiledHeaderFile=".\Debug/cintltst.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" @@ -90,6 +91,7 @@ BufferSecurityCheck="TRUE" EnableFunctionLevelLinking="TRUE" DisableLanguageExtensions="TRUE" + TreatWChar_tAsBuiltInType="TRUE" PrecompiledHeaderFile=".\Release/cintltst.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" @@ -268,9 +270,6 @@ RelativePath=".\trietest.c"> </File> <File - RelativePath=".\ucmptst.c"> - </File> - <File RelativePath=".\uenumtst.c"> </File> </Filter> @@ -319,6 +318,9 @@ <File RelativePath=".\stdnmtst.c"> </File> + <File + RelativePath=".\ucsdetst.c"> + </File> </Filter> <Filter Name="data & memory" @@ -476,9 +478,6 @@ RelativePath=".\cucdtst.c"> </File> <File - RelativePath=".\cucdtst.h"> - </File> - <File RelativePath=".\usettest.c"> </File> </Filter> diff --git a/Build/source/libs/icu-xetex/test/cintltst/cldrtest.c b/Build/source/libs/icu-xetex/test/cintltst/cldrtest.c index eba37fa5129..fe4716eddee 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cldrtest.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cldrtest.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -16,7 +16,51 @@ #include "locmap.h" #include "uresimp.h" -static UBool isCurrencyPreEuro(const char* currencyKey){ +/*-------------------------------------------------------------------- + Time bomb - allows temporary behavior that expires at a given + release + ---------------------------------------------------------------------*/ +static const UVersionInfo ICU_37 = {3,7,0,0}; + +/* +returns a new UnicodeSet that is a flattened form of the original +UnicodeSet. +*/ +static USet* +createFlattenSet(USet *origSet, UErrorCode *status) { + + + USet *newSet = NULL; + int32_t origItemCount = 0; + int32_t idx, graphmeSize; + UChar32 start, end; + UChar graphme[64]; + if (U_FAILURE(*status)) { + log_err("createFlattenSet called with %s\n", u_errorName(*status)); + return NULL; + } + newSet = uset_open(1, 0); + origItemCount = uset_getItemCount(origSet); + for (idx = 0; idx < origItemCount; idx++) { + graphmeSize = uset_getItem(origSet, idx, + &start, &end, + graphme, (int32_t)(sizeof(graphme)/sizeof(graphme[0])), + status); + if (U_FAILURE(*status)) { + log_err("ERROR: uset_getItem returned %s\n", u_errorName(*status)); + *status = U_ZERO_ERROR; + } + if (graphmeSize) { + uset_addAllCodePoints(newSet, graphme, graphmeSize); + } + else { + uset_addRange(newSet, start, end); + } + } + return newSet; +} +static UBool +isCurrencyPreEuro(const char* currencyKey){ if( strcmp(currencyKey, "PTE") == 0 || strcmp(currencyKey, "ESP") == 0 || strcmp(currencyKey, "LUF") == 0 || @@ -117,26 +161,8 @@ TestKeyInRootRecursive(UResourceBundle *root, const char *rootName, if (U_SUCCESS(errorCode) && (ures_getType(subSubBundle) == URES_ARRAY || ures_getType(subSubRootBundle) == URES_ARRAY)) { - /* TODO: Properly check for 2D arrays and zoneStrings */ - if (subBundleKey != NULL && strcmp(subBundleKey, "zoneStrings") == 0) { -/* int32_t minSize = ures_getSize(subBundle); - int32_t idx; - - for (idx = 0; idx < minSize; idx++) { - UResourceBundle *subSubBundleAtIndex = ures_getByIndex(subBundle, idx, NULL, &errorCode); - if (ures_getSize(subSubBundleAtIndex) != 6) { - log_err("zoneStrings at index %d has wrong size for locale \"%s\". array size=%d\n", - idx, - locale, - ures_getSize(subSubBundleAtIndex)); - } - ures_close(subSubBundleAtIndex); - }*/ - } - else { - /* Here is one of the recursive parts */ - TestKeyInRootRecursive(subRootBundle, rootName, subBundle, locale); - } + /* Here is one of the recursive parts */ + TestKeyInRootRecursive(subRootBundle, rootName, subBundle, locale); } else { int32_t minSize = ures_getSize(subRootBundle); @@ -283,7 +309,8 @@ TestKeyInRootRecursive(UResourceBundle *root, const char *rootName, subBundleKey, ures_getKey(currentBundle), locale); - } else if (strcmp(subBundleKey, "localPatternChars") == 0) { + } else if (strcmp(subBundleKey, "localPatternChars") == 0 && + isICUVersionAtLeast(ICU_37)) { /* Check well-formedness of localPatternChars. First, the * length must match the number of fields defined by * DateFormat. Second, each character in the string must @@ -348,8 +375,13 @@ TestKeyInRootRecursive(UResourceBundle *root, const char *rootName, #endif } else if (ures_getType(subBundle) == URES_TABLE) { - /* Here is one of the recursive parts */ - TestKeyInRootRecursive(subRootBundle, rootName, subBundle, locale); + if (strcmp(subBundleKey, "availableFormats")!=0) { + /* Here is one of the recursive parts */ + TestKeyInRootRecursive(subRootBundle, rootName, subBundle, locale); + } + else { + log_verbose("Skipping key %s in %s\n", subBundleKey, locale); + } } else if (ures_getType(subBundle) == URES_BINARY || ures_getType(subBundle) == URES_INT) { /* Can't do anything to check it */ @@ -737,17 +769,21 @@ findStringSetMismatch(const char *currLoc, const UChar *string, int32_t langSize const UChar *exemplarCharacters, int32_t exemplarLen, UBool ignoreNumbers) { UErrorCode errorCode = U_ZERO_ERROR; - USet *exemplarSet = uset_openPatternOptions(exemplarCharacters, exemplarLen, USET_CASE_INSENSITIVE, &errorCode); + USet *origSet = uset_openPatternOptions(exemplarCharacters, exemplarLen, USET_CASE_INSENSITIVE, &errorCode); + USet *exemplarSet = createFlattenSet(origSet, &errorCode); int32_t strIdx; + uset_close(origSet); if (U_FAILURE(errorCode)) { - log_err("%s: error uset_openPattern returned %s\n", currLoc, u_errorName(errorCode)); + log_err("%s: error uset_openPattern returned %s\n", currLoc, u_errorName(errorCode)); return -1; } for (strIdx = 0; strIdx < langSize; strIdx++) { if (!uset_contains(exemplarSet, string[strIdx]) - && string[strIdx] != 0x0020 && string[strIdx] != 0x00A0 && string[strIdx] != 0x002e && string[strIdx] != 0x002c && string[strIdx] != 0x002d && string[strIdx] != 0x0027) { + && string[strIdx] != 0x0020 && string[strIdx] != 0x00A0 && string[strIdx] != 0x002e && string[strIdx] != 0x002c && string[strIdx] != 0x002d && string[strIdx] != 0x0027 + && string[strIdx] != 0x200C && string[strIdx] != 0x200D) { if (!ignoreNumbers || (ignoreNumbers && (string[strIdx] < 0x30 || string[strIdx] > 0x39))) { + uset_close(exemplarSet); return strIdx; } } @@ -755,7 +791,19 @@ findStringSetMismatch(const char *currLoc, const UChar *string, int32_t langSize uset_close(exemplarSet); return -1; } - +/* include non-invariant chars */ +static int32_t +myUCharsToChars(const UChar* us, char* cs, int32_t len){ + int32_t i=0; + for(; i< len; i++){ + if(us[i] < 0x7f){ + cs[i] = (char)us[i]; + }else{ + return -1; + } + } + return i; +} static void findSetMatch( UScriptCode *scriptCodes, int32_t scriptsLen, USet *exemplarSet, @@ -797,7 +845,7 @@ findSetMatch( UScriptCode *scriptCodes, int32_t scriptsLen, UChar32 end = 0; UChar *str = NULL; int32_t strCapacity = 0; - + strCapacity = uset_getItem(exemplarSet, i, &start, &end, str, strCapacity, &status); if(U_SUCCESS(status)){ int32_t j; @@ -809,6 +857,16 @@ findSetMatch( UScriptCode *scriptCodes, int32_t scriptsLen, } } if(existsInScript == FALSE){ + for( j = 0; j < scriptsLen; j++){ + UChar toPattern[500]={'\0'}; + char pat[500]={'\0'}; + int32_t len = uset_toPattern(scripts[j], toPattern, 500, TRUE, &status); + len = myUCharsToChars(toPattern, pat, len); + log_err("uset_indexOf(\\u%04X)=%i uset_indexOf(\\u%04X)=%i\n", start, uset_indexOf(scripts[0], start), end, uset_indexOf(scripts[0], end)); + if(len!=-1){ + log_err("Pattern: %s\n",pat); + } + } log_err("ExemplarCharacters and LocaleScript containment test failed for locale %s. \n", locale); } }else{ @@ -840,10 +898,6 @@ findSetMatch( UScriptCode *scriptCodes, int32_t scriptsLen, } static void VerifyTranslation(void) { -#if U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM == 4 - /* Disabled until the CLDR data can be fixed. */ - return; -#else UResourceBundle *root, *currentLocale; int32_t locCount = uloc_countAvailable(); int32_t locIndex; @@ -857,7 +911,6 @@ static void VerifyTranslation(void) { int32_t end; UResourceBundle *resArray; - log_err("This test fails in exhaustive mode. Please fix the CLDR data\n"); if (locCount <= 1) { log_data_err("At least root needs to be installed\n"); } @@ -1031,7 +1084,6 @@ static void VerifyTranslation(void) { } ures_close(root); -#endif } /* adjust this limit as appropriate */ @@ -1043,6 +1095,7 @@ static void TestExemplarSet(void){ UErrorCode ec = U_ZERO_ERROR; UEnumeration* avail; USet* exemplarSets[2]; + USet* unassignedSet; UScriptCode code[MAX_SCRIPTS_PER_LOCALE]; USet* codeSets[MAX_SCRIPTS_PER_LOCALE]; int32_t codeLen; @@ -1053,7 +1106,9 @@ static void TestExemplarSet(void){ int32_t strLen; UChar32 start, end; - exemplarSets[0] = exemplarSets[1] = NULL; + unassignedSet = NULL; + exemplarSets[0] = NULL; + exemplarSets[1] = NULL; for (i=0; i<MAX_SCRIPTS_PER_LOCALE; ++i) { codeSets[i] = NULL; } @@ -1063,6 +1118,10 @@ static void TestExemplarSet(void){ n = uenum_count(avail, &ec); if (!assertSuccess("uenum_count", &ec)) goto END; + u_uastrcpy(ubuf, "[:unassigned:]"); + unassignedSet = uset_openPattern(ubuf, -1, &ec); + if (!assertSuccess("uset_openPattern", &ec)) goto END; + for(i=0; i<n; i++){ const char* locale = uenum_next(avail, NULL, &ec); if (!assertSuccess("uenum_next", &ec)) goto END; @@ -1076,6 +1135,9 @@ static void TestExemplarSet(void){ exemplarSets[k] = exemplarSet; if (!assertSuccess("ulocaledata_getExemplarSet", &ec)) goto END; + if (uset_containsSome(exemplarSet, unassignedSet)) { + log_err("ExemplarSet contains unassigned characters for locale : %s\n", locale); + } codeLen = uscript_getCode(locale, code, 8, &ec); if (!assertSuccess("uscript_getCode", &ec)) goto END; @@ -1085,6 +1147,10 @@ static void TestExemplarSet(void){ } for (j=0; j<codeLen; ++j) { uprv_strcpy(cbuf, "[:"); + if(code[j]==-1){ + log_err("USCRIPT_INVALID_CODE returned for locale: %s\n", locale); + continue; + } uprv_strcat(cbuf, uscript_getShortName(code[j])); uprv_strcat(cbuf, ":]"); u_uastrcpy(ubuf, cbuf); @@ -1101,14 +1167,14 @@ static void TestExemplarSet(void){ if (!assertSuccess("uset_getItem", &ec)) goto END; if (strLen == 0) { for (j=0; j<codeLen; ++j) { - if (uset_containsRange(codeSets[j], start, end)) { + if (codeSets[j]!=NULL && uset_containsRange(codeSets[j], start, end)) { existsInScript = TRUE; break; } } } else { for (j=0; j<codeLen; ++j) { - if (uset_containsString(codeSets[j], ubuf, strLen)) { + if (codeSets[j]!=NULL && uset_containsString(codeSets[j], ubuf, strLen)) { existsInScript = TRUE; break; } @@ -1135,11 +1201,45 @@ static void TestExemplarSet(void){ uenum_close(avail); uset_close(exemplarSets[0]); uset_close(exemplarSets[1]); + uset_close(unassignedSet); for (i=0; i<MAX_SCRIPTS_PER_LOCALE; ++i) { uset_close(codeSets[i]); } } +static void TestCoverage(void){ + ULocaleDataDelimiterType types[] = { + ULOCDATA_QUOTATION_START, /* Quotation start */ + ULOCDATA_QUOTATION_END, /* Quotation end */ + ULOCDATA_ALT_QUOTATION_START, /* Alternate quotation start */ + ULOCDATA_ALT_QUOTATION_END, /* Alternate quotation end */ + ULOCDATA_DELIMITER_COUNT + }; + int i; + UBool sub; + UErrorCode status = U_ZERO_ERROR; + ULocaleData *uld = ulocdata_open(uloc_getDefault(), &status); + + if(U_FAILURE(status)){ + log_err("ulocdata_open error"); + return; + } + + + for(i = 0; i < ULOCDATA_DELIMITER_COUNT; i++){ + UChar result[32] = {0,}; + status = U_ZERO_ERROR; + ulocdata_getDelimiter(uld, types[i], result, 32, &status); + if (U_FAILURE(status)){ + log_err("ulocdata_getgetDelimiter error with type %d", types[i]); + } + } + + sub = ulocdata_getNoSubstitute(uld); + ulocdata_setNoSubstitute(uld,sub); + ulocdata_close(uld); +} + static void TestCurrencyList(void){ #if !UCONFIG_NO_FORMATTING UErrorCode errorCode = U_ZERO_ERROR; @@ -1186,4 +1286,5 @@ void addCLDRTest(TestNode** root) TESTCASE(VerifyTranslation); TESTCASE(TestExemplarSet); TESTCASE(TestCurrencyList); + TESTCASE(TestCoverage); } diff --git a/Build/source/libs/icu-xetex/test/cintltst/cloctst.c b/Build/source/libs/icu-xetex/test/cintltst/cloctst.c index 4d7bb6b2cb5..d4253384198 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cloctst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cloctst.c @@ -1,16 +1,16 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ -/******************************************************************************** +/******************************************************************************* * * File CLOCTST.C * * Modification History: * Name Description * Madhu Katragadda Ported for C API -********************************************************************************* +******************************************************************************** */ #include "cloctst.h" #include <stdlib.h> @@ -19,6 +19,7 @@ #include "cintltst.h" #include "cstring.h" #include "uparse.h" +#include "uresimp.h" #include "unicode/putil.h" #include "unicode/ubrk.h" @@ -37,6 +38,7 @@ static void TestNullDefault(void); static void TestNonexistentLanguageExemplars(void); +static void TestLanguageExemplarsFallbacks(void); void PrintDataTable(); @@ -64,7 +66,7 @@ static const char* rawData2[LOCALE_INFO_SIZE][LOCALE_SIZE] = { /* ISO-3 country */ { "USA", "FRA", "ESP", "GRC", "NOR", "CHN", "DEU", "", "JPN" }, /* LCID */ - { "409", "40c", "403", "408", "814", "804", "407", "a", "411" }, + { "409", "40c", "403", "408", "814", "804", "10407", "40a", "411" }, /* display language (English) */ { "English", "French", "Catalan", "Greek", "Norwegian", "Chinese", "German", "Spanish", "Japanese" }, @@ -82,14 +84,14 @@ static const char* rawData2[LOCALE_INFO_SIZE][LOCALE_SIZE] = { /* display language (French) */ { "anglais", "fran\\u00E7ais", "catalan", "grec", "norv\\u00E9gien", "chinois", "allemand", "espagnol", "japonais" }, /* display script code (French) */ - { "", "", "", "", "", "han simplifi\\u00E9", "", "", "" }, + { "", "", "", "", "", "id\\u00e9ogrammes han (variante simplifi\\u00e9e)", "", "", "" }, /* display country (French) */ { "\\u00C9tats-Unis", "France", "Espagne", "Gr\\u00E8ce", "Norv\\u00E8ge", "Chine", "Allemagne", "", "Japon" }, /* display variant (French) */ { "", "", "", "", "NY", "", "", "", "" }, /* display name (French) */ { "anglais (\\u00C9tats-Unis)", "fran\\u00E7ais (France)", "catalan (Espagne)", - "grec (Gr\\u00E8ce)", "norv\\u00E9gien (Norv\\u00E8ge, NY)", "chinois (han simplifi\\u00E9, Chine)", + "grec (Gr\\u00E8ce)", "norv\\u00E9gien (Norv\\u00E8ge, NY)", "chinois (id\\u00e9ogrammes han (variante simplifi\\u00e9e), Chine)", "allemand (Allemagne, Ordonnancement=Ordre de l\\u2019annuaire)", "espagnol (Ordonnancement=Ordre traditionnel)", "japonais (Japon, Calendrier=Calendrier japonais)" }, /* display language (Catalan) */ @@ -206,7 +208,6 @@ void addLocaleTest(TestNode** root) TESTCASE(TestUninstalledISO3Names); TESTCASE(TestSimpleDisplayNames); TESTCASE(TestVariantParsing); - /*TESTCASE(MoreVariants);*/ TESTCASE(TestKeywordVariants); TESTCASE(TestKeywordVariantParsing); TESTCASE(TestCanonicalization); @@ -218,7 +219,14 @@ void addLocaleTest(TestNode** root) TESTCASE(TestGetLocale); TESTCASE(TestDisplayNameWarning); TESTCASE(TestNonexistentLanguageExemplars); - TESTCASE(TestAcceptLanguage); + TESTCASE(TestLanguageExemplarsFallbacks); + TESTCASE(TestCalendar); + TESTCASE(TestDateFormat); + TESTCASE(TestCollation); + TESTCASE(TestULocale); + TESTCASE(TestUResourceBundle); + TESTCASE(TestDisplayName); + TESTCASE(TestAcceptLanguage); } @@ -925,7 +933,7 @@ static void TestISOFunctions() if(!strcmp(test,"ZR")) log_err("FAIL getISOCountries() has obsolete country code %s\n", test); } - expect=240; + expect=244; if(count!=expect) { log_err("There is an error in getISOCountries, got %d, expected %d \n", count, expect); @@ -1347,35 +1355,6 @@ static void TestObsoleteNames(void) } -static void MoreVariants(void) -{ - struct { - const char *localeID; - const char *keyword; - const char *expectedValue; - } testCases[] = { - { "de_DE_EURO@collation=PHONEBOOK", "collation", "PHONEBOOK" }, - { "es_ES.utf8@euro", "collation", ""}, - { "es_ES.hello.utf8@euro", "", "" }, - { " s pa c e d _ more spaces _ spaced variant ", "", ""} - }; - - UErrorCode status = U_ZERO_ERROR; - - int32_t i = 0; - int32_t resultLen = 0; - char buffer[256]; - - for(i = 0; i < sizeof(testCases)/sizeof(testCases[0]); i++) { - *buffer = 0; - resultLen = uloc_getName(testCases[i].localeID, buffer, 256, &status); - if(uprv_strcmp(testCases[i].expectedValue, buffer) != 0) { - log_err("Expected to extract \"%s\" from \"%s\" for keyword \"%s\". Got \"%s\" instead\n", - testCases[i].expectedValue, testCases[i].localeID, testCases[i].keyword, buffer); - } - } -} - static void TestKeywordVariants(void) { struct { @@ -1737,8 +1716,9 @@ static void TestCanonicalization(void) { "en-BOONT", "en_BOONT", "en__BOONT" }, /* registered name */ { "de-1901", "de_1901", "de__1901" }, /* registered name */ { "de-1906", "de_1906", "de__1906" }, /* registered name */ - { "sr-SP-Cyrl", "sr_SP_CYRL", "sr_Cyrl_SP" }, /* .NET name */ - { "sr-SP-Latn", "sr_SP_LATN", "sr_Latn_SP" }, /* .NET name */ + { "sr-SP-Cyrl", "sr_SP_CYRL", "sr_Cyrl_CS" }, /* .NET name */ + { "sr-SP-Latn", "sr_SP_LATN", "sr_Latn_CS" }, /* .NET name */ + { "sr_YU_CYRILLIC", "sr_YU_CYRILLIC", "sr_Cyrl_CS" }, /* Linux name */ { "uz-UZ-Cyrl", "uz_UZ_CYRL", "uz_Cyrl_UZ" }, /* .NET name */ { "uz-UZ-Latn", "uz_UZ_LATN", "uz_Latn_UZ" }, /* .NET name */ { "zh-CHS", "zh_CHS", "zh_Hans" }, /* .NET name */ @@ -1770,7 +1750,10 @@ static void TestCanonicalization(void) { "root@kw=foo", "root@kw=foo", "root@kw=foo" }, { "@calendar=gregorian", "@calendar=gregorian", "@calendar=gregorian" }, { "ja_JP@calendar=Japanese", "ja_JP@calendar=Japanese", "ja_JP@calendar=Japanese" }, - { "ja_JP", "ja_JP", "ja_JP" } + { "ja_JP", "ja_JP", "ja_JP" }, + + /* test case for "i-default" */ + { "i-default", NULL, NULL } }; static const char* label[] = { "getName", "canonicalize" }; @@ -1784,6 +1767,11 @@ static void TestCanonicalization(void) const char* expected = (j==0) ? testCases[i].getNameID : testCases[i].canonicalID; *buffer = 0; status = U_ZERO_ERROR; + + if (expected == NULL) { + expected = uloc_getDefault(); + } + /* log_verbose("testing %s -> %s\n", testCases[i], testCases[i].canonicalID); */ origResultLen = _canonicalize(j, testCases[i].localeID, NULL, 0, &status); if (status != U_BUFFER_OVERFLOW_ERROR) { @@ -2267,13 +2255,32 @@ static void TestNonexistentLanguageExemplars(void) { /* JB 4068 - Nonexistent language */ UErrorCode ec = U_ZERO_ERROR; ULocaleData *uld = ulocdata_open("qqq",&ec); - USet *nothing = ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &ec); - uset_close(nothing); - ulocdata_close(uld); if (ec != U_USING_DEFAULT_WARNING) { log_err("Exemplar set for \"qqq\", expecting U_USING_DEFAULT_WARNING, but got %s\n", u_errorName(ec)); } + uset_close(ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &ec)); + ulocdata_close(uld); +} + +static void TestLanguageExemplarsFallbacks(void) { + /* Test that en_US fallsback, but en doesn't fallback. */ + UErrorCode ec = U_ZERO_ERROR; + ULocaleData *uld = ulocdata_open("en_US",&ec); + uset_close(ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &ec)); + if (ec != U_USING_FALLBACK_WARNING) { + log_err("Exemplar set for \"en_US\", expecting U_USING_FALLBACK_WARNING, but got %s\n", + u_errorName(ec)); + } + ulocdata_close(uld); + ec = U_ZERO_ERROR; + uld = ulocdata_open("en",&ec); + uset_close(ulocdata_getExemplarSet(uld, NULL, 0, ULOCDATA_ES_STANDARD, &ec)); + if (ec != U_ZERO_ERROR) { + log_err("Exemplar set for \"en\", expecting U_ZERO_ERROR, but got %s\n", + u_errorName(ec)); + } + ulocdata_close(uld); } static void TestAcceptLanguage(void) { @@ -2337,3 +2344,280 @@ static void TestAcceptLanguage(void) { } } } + +static const char* LOCALE_ALIAS[][2] = { + {"in", "id"}, + {"in_ID", "id_ID"}, + {"iw", "he"}, + {"iw_IL", "he_IL"}, + {"ji", "yi"}, + {"en_BU", "en_MM"}, + {"en_DY", "en_BJ"}, + {"en_HV", "en_BF"}, + {"en_NH", "en_VU"}, + {"en_RH", "en_ZW"}, + {"en_TP", "en_TL"}, + {"en_ZR", "en_CD"} +}; +static UBool isLocaleAvailable(UResourceBundle* resIndex, const char* loc){ + UErrorCode status = U_ZERO_ERROR; + int32_t len = 0; + ures_getStringByKey(resIndex, loc,&len, &status); + if(U_FAILURE(status)){ + return FALSE; + } + return TRUE; +} + +static void TestCalendar() { +#if !UCONFIG_NO_FORMATTING + int i; + UErrorCode status = U_ZERO_ERROR; + UResourceBundle *resIndex = ures_open(NULL,"res_index", &status); + if(U_FAILURE(status)){ + log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status)); + return; + } + for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) { + const char* oldLoc = LOCALE_ALIAS[i][0]; + const char* newLoc = LOCALE_ALIAS[i][1]; + UCalendar* c1 = NULL; + UCalendar* c2 = NULL; + + /*Test function "getLocale(ULocale.VALID_LOCALE)"*/ + const char* l1 = ucal_getLocaleByType(c1, ULOC_VALID_LOCALE, &status); + const char* l2 = ucal_getLocaleByType(c2, ULOC_VALID_LOCALE, &status); + + if(!isLocaleAvailable(resIndex, newLoc)){ + continue; + } + c1 = ucal_open(NULL, -1, oldLoc, UCAL_GREGORIAN, &status); + c2 = ucal_open(NULL, -1, newLoc, UCAL_GREGORIAN, &status); + + if (strcmp(newLoc,l1)!=0 || strcmp(l1,l2)!=0 || status!=U_ZERO_ERROR) { + log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc); + } + log_verbose("ucal_getLocaleByType old:%s new:%s\n", l1, l2); + ucal_close(c1); + ucal_close(c2); + } + ures_close(resIndex); +#endif +} + +static void TestDateFormat() { +#if !UCONFIG_NO_FORMATTING + int i; + UErrorCode status = U_ZERO_ERROR; + UResourceBundle *resIndex = ures_open(NULL,"res_index", &status); + if(U_FAILURE(status)){ + log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status)); + return; + } + for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) { + const char* oldLoc = LOCALE_ALIAS[i][0]; + const char* newLoc = LOCALE_ALIAS[i][1]; + UDateFormat* df1 = NULL; + UDateFormat* df2 = NULL; + const char* l1 = NULL; + const char* l2 = NULL; + + if(!isLocaleAvailable(resIndex, newLoc)){ + continue; + } + df1 = udat_open(UDAT_FULL, UDAT_FULL,oldLoc, NULL, 0, NULL, -1, &status); + df2 = udat_open(UDAT_FULL, UDAT_FULL,newLoc, NULL, 0, NULL, -1, &status); + if(U_FAILURE(status)){ + log_err("Creation of date format failed %s\n", u_errorName(status)); + return; + } + /*Test function "getLocale"*/ + l1 = udat_getLocaleByType(df1, ULOC_VALID_LOCALE, &status); + l2 = udat_getLocaleByType(df2, ULOC_VALID_LOCALE, &status); + if(U_FAILURE(status)){ + log_err("Fetching the locale by type failed. %s\n", u_errorName(status)); + } + if (strcmp(newLoc,l1)!=0 || strcmp(l1,l2)!=0) { + log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc); + } + log_verbose("udat_getLocaleByType old:%s new:%s\n", l1, l2); + udat_close(df1); + udat_close(df2); + } + ures_close(resIndex); +#endif +} + +static void TestCollation() { +#if !UCONFIG_NO_COLLATION + int i; + UErrorCode status = U_ZERO_ERROR; + UResourceBundle *resIndex = ures_open(NULL,"res_index", &status); + if(U_FAILURE(status)){ + log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status)); + return; + } + for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) { + const char* oldLoc = LOCALE_ALIAS[i][0]; + const char* newLoc = LOCALE_ALIAS[i][1]; + UCollator* c1 = NULL; + UCollator* c2 = NULL; + const char* l1 = NULL; + const char* l2 = NULL; + + status = U_ZERO_ERROR; + if(!isLocaleAvailable(resIndex, newLoc)){ + continue; + } + if(U_FAILURE(status)){ + log_err("Creation of collators failed %s\n", u_errorName(status)); + return; + } + c1 = ucol_open(oldLoc, &status); + c2 = ucol_open(newLoc, &status); + l1 = ucol_getLocaleByType(c1, ULOC_VALID_LOCALE, &status); + l2 = ucol_getLocaleByType(c2, ULOC_VALID_LOCALE, &status); + if(U_FAILURE(status)){ + log_err("Fetching the locale names failed failed %s\n", u_errorName(status)); + } + if (strcmp(newLoc,l1)!=0 || strcmp(l1,l2)!=0) { + log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc); + } + log_verbose("ucol_getLocaleByType old:%s new:%s\n", l1, l2); + ucol_close(c1); + ucol_close(c2); + } + ures_close(resIndex); +#endif +} + +static void TestULocale() { + int i; + UErrorCode status = U_ZERO_ERROR; + UResourceBundle *resIndex = ures_open(NULL,"res_index", &status); + if(U_FAILURE(status)){ + log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status)); + return; + } + for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) { + const char* oldLoc = LOCALE_ALIAS[i][0]; + const char* newLoc = LOCALE_ALIAS[i][1]; + UChar name1[256], name2[256]; + char names1[256], names2[256]; + int32_t capacity = 256; + + status = U_ZERO_ERROR; + if(!isLocaleAvailable(resIndex, newLoc)){ + continue; + } + uloc_getDisplayName(oldLoc, ULOC_US, name1, capacity, &status); + if(U_FAILURE(status)){ + log_err("uloc_getDisplayName(%s) failed %s\n", oldLoc, u_errorName(status)); + } + + uloc_getDisplayName(newLoc, ULOC_US, name2, capacity, &status); + if(U_FAILURE(status)){ + log_err("uloc_getDisplayName(%s) failed %s\n", newLoc, u_errorName(status)); + } + + if (u_strcmp(name1, name2)!=0) { + log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc); + } + u_austrcpy(names1, name1); + u_austrcpy(names2, name2); + log_verbose("uloc_getDisplayName old:%s new:%s\n", names1, names2); + } + ures_close(resIndex); + +} + +static void TestUResourceBundle() { + const char* us1; + const char* us2; + + UResourceBundle* rb1 = NULL; + UResourceBundle* rb2 = NULL; + UErrorCode status = U_ZERO_ERROR; + int i; + UResourceBundle *resIndex = NULL; + if(U_FAILURE(status)){ + log_err("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status)); + return; + } + resIndex = ures_open(NULL,"res_index", &status); + for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) { + + const char* oldLoc = LOCALE_ALIAS[i][0]; + const char* newLoc = LOCALE_ALIAS[i][1]; + if(!isLocaleAvailable(resIndex, newLoc)){ + continue; + } + rb1 = ures_open(NULL, oldLoc, &status); + if (U_FAILURE(U_ZERO_ERROR)) { + log_err("ures_open(%s) failed %s\n", oldLoc, u_errorName(status)); + } + + us1 = ures_getLocale(rb1, &status); + + status = U_ZERO_ERROR; + rb2 = ures_open(NULL, newLoc, &status); + if (U_FAILURE(U_ZERO_ERROR)) { + log_err("ures_open(%s) failed %s\n", oldLoc, u_errorName(status)); + } + us2 = ures_getLocale(rb2, &status); + + if (strcmp(us1,newLoc)!=0 || strcmp(us1,us2)!=0 ) { + log_err("The locales are not equal!.Old: %s, New: %s \n", oldLoc, newLoc); + } + + log_verbose("ures_getStringByKey old:%s new:%s\n", us1, us2); + ures_close(rb1); + rb1 = NULL; + ures_close(rb2); + rb2 = NULL; + } + ures_close(resIndex); +} + +static void TestDisplayName() { + + UChar oldCountry[256] = {'\0'}; + UChar newCountry[256] = {'\0'}; + UChar oldLang[256] = {'\0'}; + UChar newLang[256] = {'\0'}; + char country[256] ={'\0'}; + char language[256] ={'\0'}; + int32_t capacity = 256; + int i =0; + int j=0; + for (i=0; i<LENGTHOF(LOCALE_ALIAS); i++) { + const char* oldLoc = LOCALE_ALIAS[i][0]; + const char* newLoc = LOCALE_ALIAS[i][1]; + UErrorCode status = U_ZERO_ERROR; + int32_t available = uloc_countAvailable(); + + for(j=0; j<available; j++){ + + const char* dispLoc = uloc_getAvailable(j); + int32_t oldCountryLen = uloc_getDisplayCountry(oldLoc,dispLoc, oldCountry, capacity, &status); + int32_t newCountryLen = uloc_getDisplayCountry(newLoc, dispLoc, newCountry, capacity, &status); + int32_t oldLangLen = uloc_getDisplayLanguage(oldLoc, dispLoc, oldLang, capacity, &status); + int32_t newLangLen = uloc_getDisplayLanguage(newLoc, dispLoc, newLang, capacity, &status ); + + int32_t countryLen = uloc_getCountry(newLoc, country, capacity, &status); + int32_t langLen = uloc_getLanguage(newLoc, language, capacity, &status); + /* there is a display name for the current country ID */ + if(countryLen != newCountryLen ){ + if(u_strncmp(oldCountry,newCountry,oldCountryLen)!=0){ + log_err("uloc_getDisplayCountry() failed for %s in display locale %s \n", oldLoc, dispLoc); + } + } + /* there is a display name for the current lang ID */ + if(langLen!=newLangLen){ + if(u_strncmp(oldLang,newLang,oldLangLen)){ + log_err("uloc_getDisplayLanguage() failed for %s in display locale %s \n", oldLoc, dispLoc); } + } + } + } +} + diff --git a/Build/source/libs/icu-xetex/test/cintltst/cloctst.h b/Build/source/libs/icu-xetex/test/cintltst/cloctst.h index b419119804f..bc098b70fb8 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cloctst.h +++ b/Build/source/libs/icu-xetex/test/cintltst/cloctst.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -61,9 +61,6 @@ static void TestDisplayNames(void); **/ static void TestVariantParsing(void); - /* Make sure we can pass "de_DE@Collation=PHONEBOOK" */ - static void MoreVariants(void); - /* Test getting keyword enumeratin */ static void TestKeywordVariants(void); @@ -99,4 +96,16 @@ static void cleanUpDataTable(void); /*static void displayDataTable(void);*/ static void TestAcceptLanguage(void); +/** + * test locale aliases +*/ +static void TestCalendar(void); +static void TestDateFormat(void); +static void TestCollation(void); +static void TestULocale(void); +static void TestUResourceBundle(void); +static void TestDisplayName(void); + +static void TestAcceptLanguage(void); + #endif diff --git a/Build/source/libs/icu-xetex/test/cintltst/cmsccoll.c b/Build/source/libs/icu-xetex/test/cintltst/cmsccoll.c index 17ebdae8997..8b193195512 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cmsccoll.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cmsccoll.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2001-2005, International Business Machines Corporation and + * Copyright (c) 2001-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************* @@ -3296,7 +3296,7 @@ static void TestNewJapanese(void) { static const char *test2[] = { "\\u306f\\u309d", /* H\\u309d */ - /*"\\u30cf\\u30fd",*/ /* K\\u30fd */ + "\\u30cf\\u30fd", /* K\\u30fd */ "\\u306f\\u306f", /* HH */ "\\u306f\\u30cf", /* HK */ "\\u30cf\\u30cf", /* KK */ @@ -3379,7 +3379,7 @@ static void TestStrCollIdenticalPrefix(void) { "ab\\ud9b0\\udc70", "ab\\ud9b0\\udc71" }; - genericRulesTestWithResult(rule, test, sizeof(test)/sizeof(test[0]), UCOL_EQUAL); + genericRulesStarterWithResult(rule, test, sizeof(test)/sizeof(test[0]), UCOL_EQUAL); } /* Contractions should have all their canonically equivalent */ /* strings included */ @@ -3398,7 +3398,7 @@ static void TestContractionClosure(void) { for(i = 0; i<(sizeof(tests)/sizeof(tests[0])); i++) { - genericRulesTestWithResult(tests[i].rules, tests[i].data, tests[i].len, UCOL_EQUAL); + genericRulesStarterWithResult(tests[i].rules, tests[i].data, tests[i].len, UCOL_EQUAL); } } @@ -3560,7 +3560,7 @@ static void TestRuleOptions(void) { }, { "&[last variable]<a &[before 3][last variable]<<<c<<<b ", - { "c", "b", "\\uD802\\uDE47", "a", "\\u02d0" }, 5 + { "c", "b", "\\uD834\\uDF71", "a", "\\u02d0" }, 5 }, { "&[first regular]<a" @@ -3570,7 +3570,7 @@ static void TestRuleOptions(void) { { "&[before 1][last regular]<b" "&[last regular]<a", - { "b", "\\uD800\\uDFCF", "a", "\\u4e00" }, 4 + { "b", "\\uD808\\uDF6E", "a", "\\u4e00" }, 4 }, { "&[before 1][first implicit]<b" @@ -4637,9 +4637,12 @@ TestThaiSortKey(void) UErrorCode status = U_ZERO_ERROR; uint8_t key[256]; int32_t keyLen = 0; + /* NOTE: there is a Thai tailoring that moves Yammakan. It should not move it, */ + /* since it stays in the same relative position. This should be addressed in CLDR */ /* UCA 4.0 uint8_t expectedKey[256] = { 0x01, 0xd9, 0xb2, 0x01, 0x05, 0x00 }; */ - /* UCA 4.1 moves Yammakan */ - uint8_t expectedKey[256] = { 0x01, 0xdb, 0x3a, 0x01, 0x05, 0x00 }; + /* UCA 4.1 uint8_t expectedKey[256] = { 0x01, 0xdb, 0x3a, 0x01, 0x05, 0x00 }; */ + /* UCA 5.0 moves Yammakan */ + uint8_t expectedKey[256] = { 0x01, 0xdc, 0xce, 0x01, 0x05, 0x00 }; UCollator *coll = ucol_open("th", &status); if(U_FAILURE(status)) { log_err("Could not open a collator, exiting (%s)\n", u_errorName(status)); @@ -4654,6 +4657,101 @@ TestThaiSortKey(void) ucol_close(coll); } +static void +TestUpperFirstQuaternary(void) +{ + const char* tests[] = { "B", "b", "Bb", "bB" }; + UColAttribute att[] = { UCOL_STRENGTH, UCOL_CASE_FIRST }; + UColAttributeValue attVals[] = { UCOL_QUATERNARY, UCOL_UPPER_FIRST }; + genericLocaleStarterWithOptions("root", tests, sizeof(tests)/sizeof(tests[0]), att, attVals, sizeof(att)/sizeof(att[0])); +} + +static void +TestJ4960(void) +{ + const char* tests[] = { "\\u00e2T", "aT" }; + UColAttribute att[] = { UCOL_STRENGTH, UCOL_CASE_LEVEL }; + UColAttributeValue attVals[] = { UCOL_PRIMARY, UCOL_ON }; + const char* tests2[] = { "a", "A" }; + const char* rule = "&[first tertiary ignorable]=A=a"; + UColAttribute att2[] = { UCOL_CASE_LEVEL }; + UColAttributeValue attVals2[] = { UCOL_ON }; + /* Test whether we correctly ignore primary ignorables on case level when */ + /* we have only primary & case level */ + genericLocaleStarterWithOptionsAndResult("root", tests, sizeof(tests)/sizeof(tests[0]), att, attVals, sizeof(att)/sizeof(att[0]), UCOL_EQUAL); + /* Test whether ICU4J will make case level for sortkeys that have primary strength */ + /* and case level */ + genericLocaleStarterWithOptions("root", tests2, sizeof(tests2)/sizeof(tests2[0]), att, attVals, sizeof(att)/sizeof(att[0])); + /* Test whether completely ignorable letters have case level info (they shouldn't) */ + genericRulesStarterWithOptionsAndResult(rule, tests2, sizeof(tests2)/sizeof(tests2[0]), att2, attVals2, sizeof(att2)/sizeof(att2[0]), UCOL_EQUAL); +} + +static void +TestJ5223(void) +{ + static const char *test = "this is a test string"; + UChar ustr[256]; + int32_t ustr_length = u_unescape(test, ustr, 256); + unsigned char sortkey[256]; + int32_t sortkey_length; + UErrorCode status = U_ZERO_ERROR; + static UCollator *coll = NULL; + coll = ucol_open("root", &status); + if(U_FAILURE(status)) { + log_err("Couldn't open UCA\n"); + return; + } + ucol_setStrength(coll, UCOL_PRIMARY); + ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_PRIMARY, &status); + ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); + if (U_FAILURE(status)) { + log_err("Failed setting atributes\n"); + return; + } + sortkey_length = ucol_getSortKey(coll, ustr, ustr_length, NULL, 0); + if (sortkey_length > 256) return; + + /* we mark the position where the null byte should be written in advance */ + sortkey[sortkey_length-1] = 0xAA; + + /* we set the buffer size one byte higher than needed */ + sortkey_length = ucol_getSortKey(coll, ustr, ustr_length, sortkey, + sortkey_length+1); + + /* no error occurs (for me) */ + if (sortkey[sortkey_length-1] == 0xAA) { + log_err("Hit bug at first try\n"); + } + + /* we mark the position where the null byte should be written again */ + sortkey[sortkey_length-1] = 0xAA; + + /* this time we set the buffer size to the exact amount needed */ + sortkey_length = ucol_getSortKey(coll, ustr, ustr_length, sortkey, + sortkey_length); + + /* now the trailing null byte is not written */ + if (sortkey[sortkey_length-1] == 0xAA) { + log_err("Hit bug at second try\n"); + } + + ucol_close(coll); +} + +/* Regression test for Thai partial sort key problem */ +static void +TestJ5232(void) +{ + const static char *test[] = { + "\\u0e40\\u0e01\\u0e47\\u0e1a\\u0e40\\u0e25\\u0e47\\u0e21", + "\\u0e40\\u0e01\\u0e47\\u0e1a\\u0e40\\u0e25\\u0e48\\u0e21" + }; + + genericLocaleStarter("th", test, sizeof(test)/sizeof(test[0])); +} + + + #define TEST(x) addTest(root, &x, "tscoll/cmsccoll/" # x) void addMiscCollTest(TestNode** root) @@ -4718,6 +4816,10 @@ void addMiscCollTest(TestNode** root) /*TEST(TestMoreBefore);*/ TEST(TestTailorNULL); TEST(TestThaiSortKey); + TEST(TestUpperFirstQuaternary); + TEST(TestJ4960); + TEST(TestJ5223); + TEST(TestJ5232); } #endif /* #if !UCONFIG_NO_COLLATION */ diff --git a/Build/source/libs/icu-xetex/test/cintltst/cmsgtst.c b/Build/source/libs/icu-xetex/test/cintltst/cmsgtst.c index 72d08cad1d8..f35a755a70c 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cmsgtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cmsgtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -42,7 +42,7 @@ static const char* const txt_testResultStrings[] = { "Quotes ', {, a 1 {0}", "Quotes ', {, a 1 {0}", "You deposited 1 times an amount of $3,456.00 on 1/12/70", - "{2,time,full}, for 3,456, 1 is 5:46:40 AM PST and full date is Monday, January 12, 1970", + "{2,time,full}, for 3,456, 1 is 5:46:40 AM PT and full date is Monday, January 12, 1970", "{1,number,percent} for 1 is 345,600%" }; @@ -257,7 +257,7 @@ static void MessageFormatTest( void ) /*test u_formatMessage() with sample patterns */ -static void TestSampleMessageFormat() +static void TestSampleMessageFormat(void) { UChar *str; UChar *result; @@ -557,7 +557,7 @@ static void TestSampleFormatAndParseWithError(void) } /* Test u_formatMessage() and u_parseMessage() , format and parse sequence and round trip */ -static void TestSampleFormatAndParse() +static void TestSampleFormatAndParse(void) { UChar *result, *tzID, *str; @@ -650,7 +650,7 @@ static void TestSampleFormatAndParse() } /* test message format with a choice option */ -static void TestMsgFormatChoice() +static void TestMsgFormatChoice(void) { UChar* str; UErrorCode status = U_ZERO_ERROR; @@ -737,7 +737,7 @@ static void TestMsgFormatChoice() } /*test u_parseMessage() with various test patterns */ -static void TestParseMessage() +static void TestParseMessage(void) { UChar pattern[100]; UChar source[100]; @@ -1033,6 +1033,19 @@ static void MessageLength(void) } } +static void TestErrorChaining(void) { + UErrorCode status = U_USELESS_COLLATOR_ERROR; + + umsg_open(NULL, 0, NULL, NULL, &status); + umsg_applyPattern(NULL, NULL, 0, NULL, &status); + umsg_clone(NULL, &status); + umsg_close(NULL); + + /* All of this code should have done nothing. */ + if (status != U_USELESS_COLLATOR_ERROR) { + log_err("Status got changed to %s\n", u_errorName(status)); + } +} void addMsgForTest(TestNode** root); @@ -1050,6 +1063,7 @@ void addMsgForTest(TestNode** root) addTest(root, &TestParseMessageWithValist, "tsformat/cmsgtst/TestParseMessageWithValist"); addTest(root, &TestJ904, "tsformat/cmsgtst/TestJ904"); addTest(root, &MessageLength, "tsformat/cmsgtst/MessageLength"); + addTest(root, &TestErrorChaining, "tsformat/cmsgtst/TestErrorChaining"); } #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c b/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c index 8b1f114c18b..24982323ade 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ********************************************************************/ /******************************************************************************* @@ -194,42 +194,44 @@ static void TestExponential(void) double a; UErrorCode status = U_ZERO_ERROR; #ifdef OS390 - double val[] = { 0.01234, 123456789, 1.23e75, -3.141592653e-78 }; + static const double val[] = { 0.01234, 123456789, 1.23e75, -3.141592653e-78 }; #else - double val[] = { 0.01234, 123456789, 1.23e300, -3.141592653e-271 }; + static const double val[] = { 0.01234, 123456789, 1.23e300, -3.141592653e-271 }; #endif - const char* pat[] = { "0.####E0", "00.000E00", "##0.######E000", "0.###E0;[0.###E0]" }; - int32_t lval[] = { 0, -1, 1, 123456789 }; + static const char* pat[] = { "0.####E0", "00.000E00", "##0.######E000", "0.###E0;[0.###E0]" }; + static const int32_t lval[] = { 0, -1, 1, 123456789 }; - const char* valFormat[] = + static const char* valFormat[] = { "1.234E-2", "1.2346E8", "1.23E300", "-3.1416E-271", - "12.340E-03", "12.346E07", "12.300E299", "-31.416E-272", - "12.34E-003", "123.4568E006", "1.23E300", "-314.1593E-273", - "1.234E-2", "1.235E8", "1.23E300", "[3.142E-271]" + "12.340E-03", "12.346E07", "12.300E299", "-31.416E-272", + "12.34E-003", "123.4568E006", "1.23E300", "-314.1593E-273", + "1.234E-2", "1.235E8", "1.23E300", "[3.142E-271]" }; - const char* lvalFormat[] = + static const char* lvalFormat[] = { "0E0", "-1E0", "1E0", "1.2346E8", - "00.000E00", "-10.000E-01", "10.000E-01", "12.346E07", - "0E000", "-1E000", "1E000", "123.4568E006", - "0E0", "[1E0]", "1E0", "1.235E8" + "00.000E00", "-10.000E-01", "10.000E-01", "12.346E07", + "0E000", "-1E000", "1E000", "123.4568E006", + "0E0", "[1E0]", "1E0", "1.235E8" }; - double valParse[] = + static const double valParse[] = { #ifdef OS390 0.01234, 123460000, 1.23E75, -3.1416E-78, - 0.01234, 123460000, 1.23E75, -3.1416E-78, - 0.01234, 123456800, 1.23E75, -3.141593E-78, - 0.01234, 123500000, 1.23E75, -3.142E-78 + 0.01234, 123460000, 1.23E75, -3.1416E-78, + 0.01234, 123456800, 1.23E75, -3.141593E-78, + 0.01234, 123500000, 1.23E75, -3.142E-78 #else - 0.01234, 123460000, 1.23E300, -3.1416E-271, - 0.01234, 123460000, 1.23E300, -3.1416E-271, - 0.01234, 123456800, 1.23E300, -3.141593E-271, - 0.01234, 123500000, 1.23E300, -3.142E-271 + /* We define the whole IEEE 754 number in the 4th column because + Visual Age 7 has a bug in rounding numbers. */ + 0.01234, 123460000, 1.23E300, -3.1415999999999999E-271, + 0.01234, 123460000, 1.23E300, -3.1415999999999999E-271, + 0.01234, 123456800, 1.23E300, -3.1415929999999999E-271, + 0.01234, 123500000, 1.23E300, -3.1420000000000001E-271 #endif }; - int32_t lvalParse[] = + static const int32_t lvalParse[] = { 0, -1, 1, 123460000, 0, -1, 1, 123460000, @@ -465,7 +467,7 @@ static void TestCurrencyPreEuro(void) }; const char* result[]={ - "\\u20A7 2", "2 F", "\\u00A31.50", "1,50 mk", "1,50 F", "\\u20A4 2", + "\\u20A7 2", "2 F", "\\u00A31.50", "1,50 mk", "2 F", "\\u20A4 2", "1$50 Esc.", "\\u00F6S 1,50", "1,50 \\u0394\\u03C1\\u03C7", "2 \\u20A7", "1,50 FB", "\\u00a31.50", "1,50 BF", "1,50 DM", "1,50 BF", "\\u20A7 2", "1,50 F", "\\u20A7 2", "fl 1,50" diff --git a/Build/source/libs/icu-xetex/test/cintltst/cnumtst.c b/Build/source/libs/icu-xetex/test/cintltst/cnumtst.c index a5b867cc47e..cc366b9cce6 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cnumtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cnumtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -44,7 +44,7 @@ void addNumForTest(TestNode** root) TESTCASE(TestNumberFormatPadding); TESTCASE(TestInt64Format); TESTCASE(TestNonExistentCurrency); - /*TESTCASE(TestCurrencyRegression);*/ + TESTCASE(TestCurrencyRegression); TESTCASE(TestRBNFFormat); } @@ -97,7 +97,7 @@ static void TestNumberFormat() int32_t resultlength; int32_t resultlengthneeded; int32_t parsepos; - double d1; + double d1 = -1.0; int32_t l1; double d = -10456.37; double a = 1234.56, a1 = 1235.0; @@ -248,7 +248,7 @@ free(result); { log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status)); } - if(u_strcmp(result, temp1)==0) + if(result && u_strcmp(result, temp1)==0) log_verbose("Pass: Number Formatting using unum_formatDouble() Successful\n"); else log_err("FAIL: Error in number formatting using unum_formatDouble()\n"); @@ -262,10 +262,14 @@ free(result); /* Testing unum_parse() and unum_parseDouble() */ log_verbose("\nTesting unum_parseDouble()\n"); /* for (i = 0; i < 100000; i++)*/ + if (result != NULL) { parsepos=0; d1=unum_parseDouble(cur_def, result, u_strlen(result), &parsepos, &status); } + else { + log_err("result is NULL\n"); + } if(U_FAILURE(status)) { log_err("parse failed. The error is : %s\n", myErrorName(status)); @@ -305,26 +309,31 @@ free(result); if (pos2.beginIndex == 1 && pos2.endIndex == 6) { log_verbose("Pass: Complete number formatting using unum_format() successful\n"); } else { - log_err("Fail: Error in complete number Formatting using unum_formatDouble()\nGot: b=%d end=%d\nExpected: b=1 end=6", + log_err("Fail: Error in complete number Formatting using unum_formatDouble()\nGot: b=%d end=%d\nExpected: b=1 end=6\n", pos1.beginIndex, pos1.endIndex); } log_verbose("\nTesting unum_parseDoubleCurrency\n"); parsepos=0; - d1=unum_parseDoubleCurrency(cur_def, result, u_strlen(result), &parsepos, temp2, &status); - if (U_FAILURE(status)) { - log_err("parse failed. The error is : %s\n", myErrorName(status)); - } - /* Note: a==1234.56, but on parse expect a1=1235.0 */ - if (d1!=a1) { - log_err("Fail: Error in parsing currency, got %f, expected %f\n", d1, a1); - } else { - log_verbose("Pass: parsed currency ammount successfully\n"); + if (result == NULL) { + log_err("result is NULL\n"); } - if (u_strcmp(temp2, temp)==0) { - log_verbose("Pass: parsed correct currency\n"); - } else { - log_err("Fail: parsed incorrect currency\n"); + else { + d1=unum_parseDoubleCurrency(cur_def, result, u_strlen(result), &parsepos, temp2, &status); + if (U_FAILURE(status)) { + log_err("parse failed. The error is : %s\n", myErrorName(status)); + } + /* Note: a==1234.56, but on parse expect a1=1235.0 */ + if (d1!=a1) { + log_err("Fail: Error in parsing currency, got %f, expected %f\n", d1, a1); + } else { + log_verbose("Pass: parsed currency ammount successfully\n"); + } + if (u_strcmp(temp2, temp)==0) { + log_verbose("Pass: parsed correct currency\n"); + } else { + log_err("Fail: parsed incorrect currency\n"); + } } free(result); @@ -1287,7 +1296,7 @@ static void TestRBNFFormat() { } } -static void TestCurrencyRegression() { +static void TestCurrencyRegression(void) { /* I've found a case where unum_parseDoubleCurrency is not doing what I expect. The value I pass in is $1234567890q123460000.00 and this @@ -1334,7 +1343,7 @@ their data! u_austrcpy(acurrency, currency); - if(U_SUCCESS(status) || (pos != expected)) { + if(U_FAILURE(status) || (pos != expected)) { log_err("unum_parseDoubleCurrency should have failed with pos %d, but gave: value %.9f, err %s, pos=%d, currency [%s]\n", expected, d, u_errorName(status), pos, acurrency); } else { diff --git a/Build/source/libs/icu-xetex/test/cintltst/crestst.c b/Build/source/libs/icu-xetex/test/cintltst/crestst.c index b6cec878f69..dce4e10fd6a 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/crestst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/crestst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************* @@ -459,7 +459,7 @@ static void TestFallback() static void TestOpenDirect(void) { - UResourceBundle *idna_rules, *item; + UResourceBundle *idna_rules, *casing, *te_IN, *ne, *item; UErrorCode errorCode; /* @@ -468,7 +468,7 @@ TestOpenDirect(void) { * from root or similar */ errorCode=U_ZERO_ERROR; - idna_rules=ures_openDirect("testdata", "idna_rules", &errorCode); + idna_rules=ures_openDirect(loadTestData(&errorCode), "idna_rules", &errorCode); if(U_FAILURE(errorCode)) { log_err("ures_openDirect(\"idna_rules\") failed: %s\n", u_errorName(errorCode)); return; @@ -489,7 +489,7 @@ TestOpenDirect(void) { } /* try an item in root, must fail */ - item=ures_getByKey(idna_rules, "Languages", NULL, &errorCode); + item=ures_getByKey(idna_rules, "ShortLanguage", NULL, &errorCode); if(U_FAILURE(errorCode)) { errorCode=U_ZERO_ERROR; } else { @@ -527,6 +527,80 @@ TestOpenDirect(void) { return; } ures_close(idna_rules); + + /* + * ICU 3.6 has new resource bundle syntax and data for bundles that do not + * participate in locale fallback. Now, + * - ures_open() works like ures_openDirect() on a bundle with a top-level + * type of ":table(nofallback)" _if_ the bundle exists + * - ures_open() will continue to find a root bundle if the requested one + * does not exist, unlike ures_openDirect() + * + * Test with a different bundle than above to avoid confusion in the cache. + */ + + /* + * verify that ures_open("casing"), which now has a nofallback declaration, + * does not enable fallbacks + */ + errorCode=U_ZERO_ERROR; + casing=ures_open("testdata", "casing", &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ures_open(\"casing\") failed: %s\n", u_errorName(errorCode)); + return; + } + + errorCode=U_ZERO_ERROR; + item=ures_getByKey(casing, "Info", NULL, &errorCode); + if(U_FAILURE(errorCode)) { + log_err("casing.getByKey(Info) failed - %s\n", u_errorName(errorCode)); + } else { + ures_close(item); + } + + errorCode=U_ZERO_ERROR; + item=ures_getByKey(casing, "ShortLanguage", NULL, &errorCode); + if(U_SUCCESS(errorCode)) { + log_err("casing.getByKey(root key) succeeded despite nofallback declaration - %s\n", u_errorName(errorCode)); + ures_close(item); + } + ures_close(casing); + + /* + * verify that ures_open("ne") finds the root bundle but + * ures_openDirect("ne") does not + */ + errorCode=U_ZERO_ERROR; + ne=ures_open("testdata", "ne", &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ures_open(\"ne\") failed (expected to get root): %s\n", u_errorName(errorCode)); + } + if(errorCode!=U_USING_DEFAULT_WARNING || 0!=uprv_strcmp("root", ures_getLocale(ne, &errorCode))) { + log_err("ures_open(\"ne\") found something other than \"root\" - %s\n", u_errorName(errorCode)); + } + ures_close(ne); + + errorCode=U_ZERO_ERROR; + ne=ures_openDirect("testdata", "ne", &errorCode); + if(U_SUCCESS(errorCode)) { + log_err("ures_openDirect(\"ne\") succeeded unexpectedly\n"); + ures_close(ne); + } + + /* verify that ures_openDirect("te_IN") does not enable fallbacks */ + errorCode=U_ZERO_ERROR; + te_IN=ures_openDirect("testdata", "te_IN", &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ures_open(\"te_IN\") failed: %s\n", u_errorName(errorCode)); + return; + } + errorCode=U_ZERO_ERROR; + item=ures_getByKey(te_IN, "ShortLanguage", NULL, &errorCode); + if(U_SUCCESS(errorCode)) { + log_err("te_IN.getByKey(root key) succeeded despite use of ures_openDirect() - %s\n", u_errorName(errorCode)); + ures_close(item); + } + ures_close(te_IN); } static int32_t diff --git a/Build/source/libs/icu-xetex/test/cintltst/creststn.c b/Build/source/libs/icu-xetex/test/cintltst/creststn.c index a79fc6232c0..f2cfa9cd727 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/creststn.c +++ b/Build/source/libs/icu-xetex/test/cintltst/creststn.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -25,6 +25,7 @@ #include "cstring.h" #include "unicode/uchar.h" #include "ucol_imp.h" /* for U_ICUDATA_COLL */ +#include "ubrkimpl.h" /* for U_ICUDATA_BRKITR */ #define RESTEST_HEAP_CHECK 0 #include "unicode/uloc.h" @@ -175,6 +176,8 @@ static void TestGetKeywordValues(void); static void TestGetFunctionalEquivalent(void); static void TestCLDRStyleAliases(void); static void TestFallbackCodes(void); +static void TestGetUTF8String(void); + /***************************************************************************************/ /* Array of our test objects */ @@ -184,7 +187,7 @@ void addNEWResourceBundleTest(TestNode** root) addTest(root, &TestErrorCodes, "tsutil/creststn/TestErrorCodes"); addTest(root, &TestEmptyBundle, "tsutil/creststn/TestEmptyBundle"); addTest(root, &TestConstruction1, "tsutil/creststn/TestConstruction1"); - addTest(root, &TestResourceBundles, "tsutil/creststn/TestResourceBundle"); + addTest(root, &TestResourceBundles, "tsutil/creststn/TestResourceBundles"); addTest(root, &TestFallback, "tsutil/creststn/TestFallback"); addTest(root, &TestGetVersion, "tsutil/creststn/TestGetVersion"); addTest(root, &TestGetVersionColl, "tsutil/creststn/TestGetVersionColl"); @@ -203,6 +206,8 @@ void addNEWResourceBundleTest(TestNode** root) addTest(root, &TestXPath, "tsutil/creststn/TestXPath"); addTest(root, &TestCLDRStyleAliases, "tsutil/creststn/TestCLDRStyleAliases"); addTest(root, &TestFallbackCodes, "tsutil/creststn/TestFallbackCodes"); + addTest(root, &TestStackReuse, "tsutil/creststn/TestStackReuse"); + addTest(root, &TestGetUTF8String, "tsutil/creststn/TestGetUTF8String"); } @@ -414,7 +419,7 @@ static void TestDecodedBundle(){ int32_t num =0; const char *testdatapath = loadTestData(&error); resB = ures_open(testdatapath, "iscii", &error); - srcFromRes=ures_getStringByKey(resB,"str",&len,&error); + srcFromRes=tres_getString(resB,-1,"str",&len,&error); if(U_FAILURE(error)){ #if UCONFIG_NO_LEGACY_CONVERSION log_info("Couldn't load iscii.bin from test data bundle, (because UCONFIG_NO_LEGACY_CONVERSION is turned on)\n"); @@ -466,7 +471,7 @@ static void TestNewTypes() { theBundle = ures_open(testdatapath, "testtypes", &status); - empty = ures_getStringByKey(theBundle, "emptystring", &len, &status); + empty = tres_getString(theBundle, -1, "emptystring", &len, &status); if(empty && (*empty != 0 || len != 0)) { log_err("Empty string returned invalid value\n"); } @@ -483,7 +488,7 @@ static void TestNewTypes() { res = ures_getByKey(theBundle, "zerotest", res, &status); CONFIRM_ErrorCode(status, U_ZERO_ERROR); CONFIRM_INT_EQ(ures_getType(res), URES_STRING); - zeroString=ures_getString(res, &len, &status); + zeroString=tres_getString(res, -1, NULL, &len, &status); if(U_SUCCESS(status)){ CONFIRM_ErrorCode(status, U_ZERO_ERROR); CONFIRM_INT_EQ(len, 7); @@ -569,7 +574,7 @@ static void TestNewTypes() { /* this tests if escapes are preserved or not */ { - const UChar* str = ures_getStringByKey(theBundle,"testescape",&len,&status); + const UChar* str = tres_getString(theBundle,-1,"testescape",&len,&status); CONFIRM_ErrorCode(status, U_ZERO_ERROR); if(U_SUCCESS(status)){ u_charsToUChars(expect,uExpect,(int32_t)strlen(expect)+1); @@ -608,7 +613,7 @@ static void TestNewTypes() { patternLen = (int32_t)uprv_strlen(pattern); expectedEscaped = (UChar*)malloc(U_SIZEOF_UCHAR * patternLen); - got = ures_getStringByKey(theBundle,"test_unescaping",&len,&status); + got = tres_getString(theBundle,-1,"test_unescaping",&len,&status); expectedLen = u_unescape(pattern,expectedEscaped,patternLen); if(got==NULL || u_strncmp(expectedEscaped,got,expectedLen)!=0 || expectedLen != len){ log_err("genrb failed to unescape string\n"); @@ -625,7 +630,7 @@ static void TestNewTypes() { } /* test for jitterbug#1435 */ { - const UChar* str = ures_getStringByKey(theBundle,"test_underscores",&len,&status); + const UChar* str = tres_getString(theBundle,-1,"test_underscores",&len,&status); expect ="test message ...."; u_charsToUChars(expect,uExpect,(int32_t)strlen(expect)+1); CONFIRM_ErrorCode(status, U_ZERO_ERROR); @@ -634,6 +639,7 @@ static void TestNewTypes() { } } /* test for jitterbug#2626 */ +#if !UCONFIG_NO_COLLATION { UResourceBundle* resB = NULL; const UChar* str = NULL; @@ -642,7 +648,7 @@ static void TestNewTypes() { status = U_ZERO_ERROR; resB = ures_getByKey(theBundle, "collations", resB, &status); resB = ures_getByKey(resB, "standard", resB, &status); - str = ures_getStringByKey(resB,"Sequence",&strLength,&status); + str = tres_getString(resB,-1,"Sequence",&strLength,&status); if(!str || U_FAILURE(status)) { log_data_err("Could not load collations from theBundle: %s\n", u_errorName(status)); } else if(u_strcmp(my,str) != 0){ @@ -650,6 +656,7 @@ static void TestNewTypes() { } ures_close(resB); } +#endif { const char *sourcePath = ctest_dataSrcDir(); int32_t srcPathLen = (int32_t)strlen(sourcePath); @@ -665,7 +672,7 @@ static void TestNewTypes() { status = U_ZERO_ERROR; { int32_t strLen =0; - const UChar* str = ures_getStringByKey(theBundle, "testincludeUTF",&strLen,&status); + const UChar* str = tres_getString(theBundle, -1, "testincludeUTF",&strLen,&status); strcpy(path, "riwords.txt"); path[strlen("riwords.txt")]=0; if(U_FAILURE(status)){ @@ -702,7 +709,7 @@ static void TestNewTypes() { status = U_ZERO_ERROR; { int32_t strLen =0; - const UChar* str = ures_getStringByKey(theBundle, "testinclude",&strLen,&status); + const UChar* str = tres_getString(theBundle, -1, "testinclude",&strLen,&status); strcpy(path, "translit_rules.txt"); path[strlen("translit_rules.txt")]=0; @@ -775,7 +782,7 @@ static void TestEmptyTypes() { res = ures_getByKey(theBundle, "emptyexplicitstring", res, &status); CONFIRM_ErrorCode(status, U_ZERO_ERROR); CONFIRM_INT_EQ(ures_getType(res), URES_STRING); - zeroString=ures_getString(res, &len, &status); + zeroString=tres_getString(res, -1, NULL, &len, &status); if(U_SUCCESS(status)){ CONFIRM_ErrorCode(status, U_ZERO_ERROR); CONFIRM_INT_EQ(len, 0); @@ -790,7 +797,7 @@ static void TestEmptyTypes() { res = ures_getByKey(theBundle, "emptystring", res, &status); CONFIRM_ErrorCode(status, U_ZERO_ERROR); CONFIRM_INT_EQ(ures_getType(res), URES_STRING); - zeroString=ures_getString(res, &len, &status); + zeroString=tres_getString(res, -1, NULL, &len, &status); if(U_SUCCESS(status)){ CONFIRM_ErrorCode(status, U_ZERO_ERROR); CONFIRM_INT_EQ(len, 0); @@ -973,6 +980,7 @@ static void TestAPI() { const char* testdatapath; UChar* utestdatapath=NULL; char convOutput[256]; + UChar largeBuffer[1025]; UResourceBundle *teRes = NULL; UResourceBundle *teFillin=NULL; UResourceBundle *teFillin2=NULL; @@ -1000,8 +1008,18 @@ static void TestAPI() { } #endif + u_memset(largeBuffer, 0x0030, sizeof(largeBuffer)/sizeof(largeBuffer[0])); + largeBuffer[sizeof(largeBuffer)/sizeof(largeBuffer[0])-1] = 0; + /*Test ures_openU */ + status = U_ZERO_ERROR; + ures_close(ures_openU(largeBuffer, "root", &status)); + if(status != U_ILLEGAL_ARGUMENT_ERROR){ + log_err("ERROR: ures_openU() worked when the path is very large. It returned %s\n", myErrorName(status)); + } + + status = U_ZERO_ERROR; ures_close(ures_openU(NULL, "root", &status)); if(U_FAILURE(status)){ log_err("ERROR: ures_openU() failed path = NULL with %s\n", myErrorName(status)); @@ -1056,7 +1074,7 @@ static void TestAPI() { if(U_FAILURE(status)){ log_err("ERROR: ures_getByIndex on string resource failed\n"); } - if(strcmp(u_austrcpy(convOutput, ures_getString(teFillin2, &len, &status)), "TE") != 0){ + if(strcmp(u_austrcpy(convOutput, tres_getString(teFillin2, -1, NULL, &len, &status)), "TE") != 0){ status=U_ZERO_ERROR; log_err("ERROR: ures_getByIndex on string resource fetched the key=%s, expected \"TE\" \n", austrdup(ures_getString(teFillin2, &len, &status))); } @@ -1155,8 +1173,8 @@ static void TestErrorConditions(){ log_verbose("Testing ures_openFillIn with UResourceBundle = NULL.....\n"); status=U_ZERO_ERROR; ures_openFillIn(NULL, testdatapath, "te", &status); - if(status != U_INTERNAL_PROGRAM_ERROR){ - log_err("ERROR: ures_openFillIn with UResourceBundle= NULL should fail. Expected U_INTERNAL_PROGRAM_ERROR, Got: %s\n", + if(status != U_ILLEGAL_ARGUMENT_ERROR){ + log_err("ERROR: ures_openFillIn with UResourceBundle= NULL should fail. Expected U_ILLEGAL_ARGUMENT_ERROR, Got: %s\n", myErrorName(status)); } /*Test ures_getLocale() with status != U_ZERO_ERROR*/ @@ -1409,7 +1427,7 @@ static void TestGetVersionColl(){ return; } /* test NUL termination of UCARules */ - rules = ures_getStringByKey(resB,"UCARules",&len, &status); + rules = tres_getString(resB,-1,"UCARules",&len, &status); if(!rules || U_FAILURE(status)) { log_data_err("Could not load UCARules for locale %s\n", locName); continue; @@ -1502,8 +1520,8 @@ static void TestConstruction1() log_err("construction of %s did not succeed : %s \n", locale, myErrorName(status)); return; } - result1= ures_getStringByKey(test1, "string_in_Root_te_te_IN", &len1, &err); - result2= ures_getStringByKey(test2, "string_in_Root_te_te_IN", &len2, &err); + result1= tres_getString(test1, -1, "string_in_Root_te_te_IN", &len1, &err); + result2= tres_getString(test2, -1, "string_in_Root_te_te_IN", &len2, &err); if (U_FAILURE(err) || len1==0 || len2==0) { log_err("Something threw an error in TestConstruction(): %s\n", myErrorName(status)); return; @@ -1670,7 +1688,7 @@ static UBool testTag(const char* frag, status = U_ZERO_ERROR; len=0; - string=ures_getStringByKey(theBundle, tag, &len, &status); + string=tres_getString(theBundle, -1, tag, &len, &status); if(U_SUCCESS(status)) { expected_string=(UChar*)malloc(sizeof(UChar)*(u_strlen(base) + 4)); u_strcpy(expected_string,base); @@ -1716,7 +1734,7 @@ static UBool testTag(const char* frag, u_strcat(expected_string, element); arrayItem1=ures_getNextResource(array, arrayItem1, &status); if(U_SUCCESS(status)){ - CONFIRM_EQ(ures_getString(arrayItem1, &len, &status),expected_string); + CONFIRM_EQ(tres_getString(arrayItem1, -1, NULL, &len, &status),expected_string); } } @@ -1808,7 +1826,7 @@ static UBool testTag(const char* frag, u_strcat(expected_string, element); arrayItem1=ures_getNextResource(tableRow, arrayItem1, &status); if(U_SUCCESS(status)){ - const UChar *stringValue=ures_getString(arrayItem1, &len, &status); + const UChar *stringValue=tres_getString(arrayItem1, -1, NULL, &len, &status); CONFIRM_EQ(stringValue, expected_string); } } @@ -1925,7 +1943,7 @@ static UBool testTag(const char* frag, }else{ record_fail(); } - t=(UChar*)ures_getString(tagelement, &len, &status); + t=(UChar*)tres_getString(tagelement, -1, NULL, &len, &status); if(!U_FAILURE(status)){ string=t; } @@ -1994,11 +2012,11 @@ static void TestFallback() /* clear it out.. just do some calls to get the gears turning */ - junk = ures_getStringByKey(fr_FR, "LocaleID", &resultLen, &status); + junk = tres_getString(fr_FR, -1, "LocaleID", &resultLen, &status); status = U_ZERO_ERROR; - junk = ures_getStringByKey(fr_FR, "LocaleString", &resultLen, &status); + junk = tres_getString(fr_FR, -1, "LocaleString", &resultLen, &status); status = U_ZERO_ERROR; - junk = ures_getStringByKey(fr_FR, "LocaleID", &resultLen, &status); + junk = tres_getString(fr_FR, -1, "LocaleID", &resultLen, &status); status = U_ZERO_ERROR; /* OK first one. This should be a Default value. */ @@ -2013,7 +2031,7 @@ static void TestFallback() ures_close(subResource); /* and this is a Fallback, to fr */ - junk = ures_getStringByKey(fr_FR, "Countries", &resultLen, &status); + junk = tres_getString(fr_FR, -1, "Countries", &resultLen, &status); if(status != U_USING_FALLBACK_WARNING) { log_data_err("Expected U_USING_FALLBACK_ERROR when trying to get Countries from fr_FR, got %d\n", @@ -2030,18 +2048,20 @@ static void TestFallback() UResourceBundle* myResB = ures_open(NULL,"no_NO_NY",&err); UResourceBundle* resLocID = ures_getByKey(myResB, "Version", NULL, &err); UResourceBundle* tResB; - static const UChar versionStr[] = { 0x0031, 0x002E, 0x0032, 0x0037, 0x0000}; + const UChar* version = NULL; + static const UChar versionStr[] = { 0x0031, 0x002E, 0x0033, 0x0037, 0x0000}; if(err != U_ZERO_ERROR){ log_data_err("Expected U_ZERO_ERROR when trying to test no_NO_NY aliased to nn_NO for Version err=%s\n",u_errorName(err)); return; } - if(u_strcmp(ures_getString(resLocID, &resultLen, &err), versionStr) != 0){ + version = tres_getString(resLocID, -1, NULL, &resultLen, &err); + if(u_strcmp(version, versionStr) != 0){ log_data_err("ures_getString(resLocID, &resultLen, &err) returned an unexpected version value\n"); } - tResB = ures_getByKey(myResB, "calendar", NULL, &err); + tResB = ures_getByKey(myResB, "zoneStrings", NULL, &err); if(err != U_USING_FALLBACK_WARNING){ - log_err("Expected U_USING_FALLBACK_ERROR when trying to test no_NO_NY aliased with nn_NO_NY for calendar err=%s\n",u_errorName(err)); + log_err("Expected U_USING_FALLBACK_ERROR when trying to test no_NO_NY aliased with nn_NO_NY for zoneStrings err=%s\n",u_errorName(err)); } ures_close(resLocID); ures_close(myResB); @@ -2064,8 +2084,8 @@ static void TestResourceLevelAliasing(void) { UResourceBundle *en = NULL, *uk = NULL, *testtypes = NULL; const char* testdatapath = NULL; const UChar *string = NULL, *sequence = NULL; - const uint8_t *binary = NULL, *binSequence = NULL; - int32_t strLen = 0, seqLen = 0, binLen = 0, binSeqLen = 0; + /*const uint8_t *binary = NULL, *binSequence = NULL;*/ + int32_t strLen = 0, seqLen = 0;/*, binLen = 0, binSeqLen = 0;*/ char buffer[100]; char *s; @@ -2114,16 +2134,16 @@ static void TestResourceLevelAliasing(void) { goto cleanup; } - sequence = ures_getString(uk, &seqLen, &status); + sequence = tres_getString(uk, -1, NULL, &seqLen, &status); tb = ures_getByKey(aliasB, "referencingalias", tb, &status); - string = ures_getString(tb, &strLen, &status); + string = tres_getString(tb, -1, NULL, &strLen, &status); if(seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) { log_err("Referencing alias didn't get the right string\n"); } - string = ures_getStringByKey(aliasB, "referencingalias", &strLen, &status); + string = tres_getString(aliasB, -1, "referencingalias", &strLen, &status); if(seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) { log_err("Referencing alias didn't get the right string\n"); } @@ -2133,7 +2153,7 @@ static void TestResourceLevelAliasing(void) { checkStatus(__LINE__, U_ZERO_ERROR, status); tb = ures_getByIndex(tb, 2, tb, &status); checkStatus(__LINE__, U_ZERO_ERROR, status); - string = ures_getString(tb, &strLen, &status); + string = tres_getString(tb, -1, NULL, &strLen, &status); checkStatus(__LINE__, U_ZERO_ERROR, status); if(U_FAILURE(status)) { @@ -2142,28 +2162,34 @@ static void TestResourceLevelAliasing(void) { log_err("Referencing alias didn't get the right string\n"); } - /* check whether the binary collation data is properly referenced by an alias */ - uk = ures_findResource("th/BreakDictionaryData", uk, &status); - binSequence = ures_getBinary(uk, &binSeqLen, &status); - - tb = ures_getByKey(aliasB, "BreakDictionaryData", tb, &status); - binary = ures_getBinary(tb, &binLen, &status); - - if(U_FAILURE(status)) { - log_err("%s trying to read binary BreakDictionaryData\n"); - } else if(binSeqLen != binLen || memcmp(binSequence, binary, binSeqLen) != 0) { - log_err("Referencing alias didn't get the right data\n"); + + { + UResourceBundle* ja = ures_open(U_ICUDATA_BRKITR,"ja", &status); + const UChar *got = NULL, *exp=NULL; + int32_t gotLen = 0, expLen=0; + ja = ures_getByKey(ja, "boundaries", ja, &status); + exp = tres_getString(ja, -1, "word", &expLen, &status); + + tb = ures_getByKey(aliasB, "boundaries", tb, &status); + got = tres_getString(tb, -1, "word", &gotLen, &status); + + if(U_FAILURE(status)) { + log_err("%s trying to read str boundaries\n"); + } else if(gotLen != expLen || u_strncmp(exp, got, gotLen) != 0) { + log_err("Referencing alias didn't get the right data\n"); + } + ures_close(ja); + status = U_ZERO_ERROR; } - /* simple alias */ testtypes = ures_open(testdatapath, "testtypes", &status); strcpy(buffer, "menu/file/open"); s = buffer; uk = ures_findSubResource(testtypes, s, uk, &status); - sequence = ures_getString(uk, &seqLen, &status); + sequence = tres_getString(uk, -1, NULL, &seqLen, &status); tb = ures_getByKey(aliasB, "simplealias", tb, &status); - string = ures_getString(tb, &strLen, &status); + string = tres_getString(tb, -1, NULL, &strLen, &status); if(U_FAILURE(status) || seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) { log_err("Referencing alias didn't get the right string\n"); @@ -2173,10 +2199,10 @@ static void TestResourceLevelAliasing(void) { tb = ures_getByKey(aliasB, "zoneTests", tb, &status); tb = ures_getByKey(tb, "zoneAlias2", tb, &status); - string = ures_getString(tb, &strLen, &status); + string = tres_getString(tb, -1, NULL, &strLen, &status); en = ures_findResource("en/zoneStrings/3/0", en, &status); - sequence = ures_getString(en, &seqLen, &status); + sequence = tres_getString(en, -1, NULL, &seqLen, &status); if(U_FAILURE(status) || seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) { log_err("Referencing alias didn't get the right string\n"); @@ -2207,23 +2233,35 @@ static void TestResourceLevelAliasing(void) { log_err("Couldn't get testGetStringByKeyAliasing resource\n"); } for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) { - result = ures_getStringByKey(tb, keys[i], &resultLen, &status); + result = tres_getString(tb, -1, keys[i], &resultLen, &status); + if(U_FAILURE(status)){ + log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status)); + continue; + } uBufferLen = u_unescape(strings[i], uBuffer, 256); if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { log_err("Didn't get correct string while accesing alias table by key (%s)\n", keys[i]); } } for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) { - result = ures_getStringByIndex(tb, i, &resultLen, &status); + result = tres_getString(tb, i, NULL, &resultLen, &status); + if(U_FAILURE(status)){ + log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status)); + continue; + } uBufferLen = u_unescape(strings[i], uBuffer, 256); - if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { + if(result==NULL || resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { log_err("Didn't get correct string while accesing alias table by index (%s)\n", strings[i]); } } for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) { result = ures_getNextString(tb, &resultLen, &key, &status); + if(U_FAILURE(status)){ + log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status)); + continue; + } uBufferLen = u_unescape(strings[i], uBuffer, 256); - if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { + if(result==NULL || resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { log_err("Didn't get correct string while iterating over alias table (%s)\n", strings[i]); } } @@ -2232,20 +2270,35 @@ static void TestResourceLevelAliasing(void) { log_err("Couldn't get testGetStringByIndexAliasing resource\n"); } for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) { - result = ures_getStringByIndex(tb, i, &resultLen, &status); + result = tres_getString(tb, i, NULL, &resultLen, &status); + if(U_FAILURE(status)){ + log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status)); + continue; + } uBufferLen = u_unescape(strings[i], uBuffer, 256); - if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { + if(result==NULL || resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { log_err("Didn't get correct string while accesing alias by index in an array (%s)\n", strings[i]); } } for(i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) { result = ures_getNextString(tb, &resultLen, &key, &status); + if(U_FAILURE(status)){ + log_err("Fetching the resource with key %s failed. Error: %s\n", keys[i], u_errorName(status)); + continue; + } uBufferLen = u_unescape(strings[i], uBuffer, 256); - if(resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { + if(result==NULL || resultLen != uBufferLen || u_strncmp(result, uBuffer, resultLen) != 0) { log_err("Didn't get correct string while iterating over aliases in an array (%s)\n", strings[i]); } } } + tb = ures_getByKey(aliasB, "testAliasToTree", tb, &status); + if(U_FAILURE(status)){ + log_err("Fetching the resource with key \"testAliasToTree\" failed. Error: %s\n", u_errorName(status)); + } + if (strcmp(ures_getKey(tb), "collations") != 0) { + log_err("ures_getKey(aliasB) unexpectedly returned %s instead of \"collations\"\n", ures_getKey(tb)); + } cleanup: ures_close(aliasB); ures_close(tb); @@ -2261,8 +2314,13 @@ static void TestDirectAccess(void) { char buffer[100]; char *s; + /*const char* testdatapath=loadTestData(&status); + if(U_FAILURE(status)){ + log_err("Could not load testdata.dat %s \n",myErrorName(status)); + return; + }*/ - t = ures_findResource("en/zoneStrings/3/2", t, &status); + t = ures_findResource("/testdata/te/zoneStrings/3/2", t, &status); if(U_FAILURE(status)) { log_err("Couldn't access indexed resource, error %s\n", u_errorName(status)); status = U_ZERO_ERROR; @@ -2272,7 +2330,7 @@ static void TestDirectAccess(void) { log_err("Got a strange key, expected NULL, got %s\n", key); } } - t = ures_findResource("en/zoneStrings/3", t, &status); + t = ures_findResource("en/calendar/gregorian/DateTimePatterns/3", t, &status); if(U_FAILURE(status)) { log_err("Couldn't access indexed resource, error %s\n", u_errorName(status)); status = U_ZERO_ERROR; @@ -2316,7 +2374,7 @@ static void TestDirectAccess(void) { } } - t = ures_findResource("root/calendar/islamic-civil/DateTimePatterns", t, &status); + t = ures_findResource("root/calendar/islamic-civil/DateTime", t, &status); if(U_SUCCESS(status)) { log_err("This resource does not exist. How did it get here?\n"); } @@ -2333,7 +2391,7 @@ static void TestDirectAccess(void) { t2 = ures_open(NULL, "he", &status); t2 = ures_getByKeyWithFallback(t2, "calendar", t2, &status); t2 = ures_getByKeyWithFallback(t2, "islamic-civil", t2, &status); - t2 = ures_getByKeyWithFallback(t2, "DateTimePatterns", t2, &status); + t2 = ures_getByKeyWithFallback(t2, "DateTime", t2, &status); if(U_SUCCESS(status)) { log_err("This resource does not exist. How did it get here?\n"); } @@ -2354,7 +2412,7 @@ static void TestDirectAccess(void) { t2 = ures_open(NULL, "root", &status); t2 = ures_getByKeyWithFallback(t2, "calendar", t2, &status); t2 = ures_getByKeyWithFallback(t2, "islamic-civil", t2, &status); - t2 = ures_getByKeyWithFallback(t2, "DateTimePatterns", t2, &status); + t2 = ures_getByKeyWithFallback(t2, "DateTime", t2, &status); if(U_SUCCESS(status)) { log_err("This resource does not exist. How did it get here?\n"); } @@ -2458,10 +2516,10 @@ static void TestGetFunctionalEquivalentOf(const char *path, const char *resName, log_verbose("got: %c %s\n", expectAvail?'t':'f',equivLocale); if((gotAvail != expectAvail) || strcmp(equivLocale, expectLocale)) { - log_err("FAIL: got avail=%c, loc=%s but expected #%d: %c\t%s\t-> loc=%s\n", - gotAvail?'t':'f', equivLocale, - i/3, - expectAvail?'t':'f', inLocale, expectLocale); + log_err("FAIL: got avail=%c, loc=%s but expected #%d: %c\t%s\t-> loc=%s\n", + gotAvail?'t':'f', equivLocale, + i/3, + expectAvail?'t':'f', inLocale, expectLocale); } } @@ -2508,8 +2566,8 @@ static void TestGetFunctionalEquivalent(void) { static const char *calCases[] = { /* avail locale equiv */ - "t", "en_US", "en@calendar=gregorian", - "f", "ja_JP_TOKYO", "ja@calendar=gregorian", + "t", "en_US_POSIX", "en_US@calendar=gregorian", + "f", "ja_JP_TOKYO", "ja_JP@calendar=gregorian", "f", "ja_JP_TOKYO@calendar=japanese", "ja@calendar=japanese", "t", "sr@calendar=gregorian", "sr@calendar=gregorian", "t", "en", "en@calendar=gregorian", @@ -2572,7 +2630,7 @@ static void TestXPath(void) { return; } - result = ures_getString(alias, &len, &status); + result = tres_getString(alias, -1, NULL, &len, &status); if(U_FAILURE(status) || result == NULL || u_strcmp(result, expResult)) { log_err("Couldn't get correct string value (%s)\n", myErrorName(status)); } @@ -2584,7 +2642,7 @@ static void TestXPath(void) { return; } - result = ures_getString(alias, &len, &status); + result = tres_getString(alias, -1, NULL, &len, &status); if(U_FAILURE(status) || result == NULL || u_strcmp(result, expResult)) { log_err("Couldn't get correct string value (%s)\n", myErrorName(status)); } @@ -2596,7 +2654,7 @@ static void TestXPath(void) { return; } - result = ures_getString(alias, &len, &status); + result = tres_getString(alias, -1, NULL, &len, &status); if(U_FAILURE(status) || result == NULL || u_strcmp(result, expResult)) { log_err("Couldn't get correct string value (%s)\n", myErrorName(status)); } @@ -2636,7 +2694,7 @@ static void TestCLDRStyleAliases(void) { resource[2]=0; /* instead of sprintf(resource, "a%i", i); */ a = ures_getByKeyWithFallback(alias, resource, a, &status); - result = ures_getString(a, &len, &status); + result = tres_getString(a, -1, NULL, &len, &status); u_charsToUChars(expects[i], expected, strlen(expects[i])+1); if(U_FAILURE(status) || !result || u_strcmp(result, expected)) { log_err("CLDR style aliases failed resource with name \"%s\" resource, exp %s, got %S (%s)\n", resource, expects[i], result, myErrorName(status)); @@ -2685,3 +2743,187 @@ static void TestFallbackCodes(void) { ures_close(r); ures_close(res); } + +/* This test will crash if this doesn't work. Results don't need testing. */ +static void TestStackReuse(void) { + UResourceBundle table; + UErrorCode errorCode = U_ZERO_ERROR; + UResourceBundle *rb = ures_open(NULL, "en_US", &errorCode); + + if(U_FAILURE(errorCode)) { + log_err("Could not load en_US locale. status=%s\n",myErrorName(errorCode)); + return; + } + ures_initStackObject(&table); + ures_getByKeyWithFallback(rb, "Types", &table, &errorCode); + ures_getByKeyWithFallback(&table, "collation", &table, &errorCode); + ures_close(rb); + ures_close(&table); +} + +/* Test ures_getUTF8StringXYZ() --------------------------------------------- */ + +/* + * Replace most ures_getStringXYZ() with this function which wraps the + * desired call and also calls the UTF-8 variant and checks that it works. + */ +extern const UChar * +tres_getString(const UResourceBundle *resB, + int32_t index, const char *key, + int32_t *length, + UErrorCode *status) { + char buffer8[16]; + char *p8; + const UChar *s16; + const char *s8; + UChar32 c16, c8; + int32_t length16, length8, i16, i8; + UBool forceCopy; + + if(length == NULL) { + length = &length16; + } + if(index >= 0) { + s16 = ures_getStringByIndex(resB, index, length, status); + } else if(key != NULL) { + s16 = ures_getStringByKey(resB, key, length, status); + } else { + s16 = ures_getString(resB, length, status); + } + if(U_FAILURE(*status)) { + return s16; + } + length16 = *length; + + /* try the UTF-8 variant of ures_getStringXYZ() */ + for(forceCopy = FALSE; forceCopy <= TRUE; ++forceCopy) { + p8 = buffer8; + length8 = (int32_t)sizeof(buffer8); + if(index >= 0) { + s8 = ures_getUTF8StringByIndex(resB, index, p8, &length8, forceCopy, status); + } else if(key != NULL) { + s8 = ures_getUTF8StringByKey(resB, key, p8, &length8, forceCopy, status); + } else { + s8 = ures_getUTF8String(resB, p8, &length8, forceCopy, status); + } + if(*status == U_INVALID_CHAR_FOUND) { + /* the UTF-16 string contains an unpaired surrogate, can't test UTF-8 variant */ + return s16; + } + if(*status == U_BUFFER_OVERFLOW_ERROR) { + *status = U_ZERO_ERROR; + p8 = (char *)malloc(++length8); + if(p8 == NULL) { + return s16; + } + if(index >= 0) { + s8 = ures_getUTF8StringByIndex(resB, index, p8, &length8, forceCopy, status); + } else if(key != NULL) { + s8 = ures_getUTF8StringByKey(resB, key, p8, &length8, forceCopy, status); + } else { + s8 = ures_getUTF8String(resB, p8, &length8, forceCopy, status); + } + } + if(U_FAILURE(*status)) { + /* something unexpected happened */ + if(p8 != buffer8) { + free(p8); + } + return s16; + } + + if(forceCopy && s8 != p8) { + log_err("ures_getUTF8String(%p, %ld, '%s') did not write the string to dest\n", + resB, (long)index, key); + } + + /* verify NUL-termination */ + if((p8 != buffer8 || length8 < sizeof(buffer8)) && s8[length8] != 0) { + log_err("ures_getUTF8String(%p, %ld, '%s') did not NUL-terminate\n", + resB, (long)index, key); + } + /* verify correct string */ + i16 = i8 = 0; + while(i16 < length16 && i8 < length8) { + U16_NEXT(s16, i16, length16, c16); + U8_NEXT(s8, i8, length8, c8); + if(c16 != c8) { + log_err("ures_getUTF8String(%p, %ld, '%s') got a bad string, c16=U+%04lx!=U+%04lx=c8 before i16=%ld\n", + resB, (long)index, key, (long)c16, (long)c8, (long)i16); + } + } + /* verify correct length */ + if(i16 < length16) { + log_err("ures_getUTF8String(%p, %ld, '%s') UTF-8 string too short, length8=%ld, length16=%ld\n", + resB, (long)index, key, (long)length8, (long)length16); + } + if(i8 < length8) { + log_err("ures_getUTF8String(%p, %ld, '%s') UTF-8 string too long, length8=%ld, length16=%ld\n", + resB, (long)index, key, (long)length8, (long)length16); + } + + /* clean up */ + if(p8 != buffer8) { + free(p8); + } + } + return s16; +} + +/* + * API tests for ures_getUTF8String(). + * Most cases are handled by tres_getString(), which leaves argument checking + * to be tested here. + * Since the variants share most of their implementation, we only need to test + * one of them. + * We also need not test for checking arguments which will be checked by the + * UTF-16 ures_getStringXYZ() that are called internally. + */ +static void +TestGetUTF8String() { + UResourceBundle *res; + const char *testdatapath; + char buffer8[16]; + const char *s8; + int32_t length8; + UErrorCode status; + + status = U_ZERO_ERROR; + testdatapath = loadTestData(&status); + if(U_FAILURE(status)) { + log_err("Could not load testdata.dat - %s\n", u_errorName(status)); + return; + } + + res = ures_open(testdatapath, "", &status); + if(U_FAILURE(status)) { + log_err("Unable to ures_open(testdata, \"\") - %s\n", u_errorName(status)); + return; + } + + /* one good call */ + status = U_ZERO_ERROR; + length8 = (int32_t)sizeof(buffer8); + s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", buffer8, &length8, FALSE, &status); + if(status != U_ZERO_ERROR) { + log_err("ures_getUTF8StringByKey(testdata/root string) malfunctioned - %s\n", u_errorName(status)); + } + + /* negative capacity */ + status = U_ZERO_ERROR; + length8 = -1; + s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", buffer8, &length8, FALSE, &status); + if(status != U_ILLEGAL_ARGUMENT_ERROR) { + log_err("ures_getUTF8StringByKey(capacity<0) malfunctioned - %s\n", u_errorName(status)); + } + + /* capacity>0 but dest=NULL */ + status = U_ZERO_ERROR; + length8 = (int32_t)sizeof(buffer8); + s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", NULL, &length8, FALSE, &status); + if(status != U_ILLEGAL_ARGUMENT_ERROR) { + log_err("ures_getUTF8StringByKey(dest=NULL capacity>0) malfunctioned - %s\n", u_errorName(status)); + } + + ures_close(res); +} diff --git a/Build/source/libs/icu-xetex/test/cintltst/creststn.h b/Build/source/libs/icu-xetex/test/cintltst/creststn.h index 9b3ac947cc2..f6becdb979c 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/creststn.h +++ b/Build/source/libs/icu-xetex/test/cintltst/creststn.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /*************************************************************************** @@ -18,8 +18,17 @@ /* C TEST FOR NEW RESOURCEBUNDLE API*/ #include "cintltst.h" - - +/* + * Test wrapper for ures_getStringXYZ(), for testing other variants of + * these functions as well. + * If index>=0, calls ures_getStringByIndex(). + * If key!=NULL, calls ures_getStringByKey(). + */ +extern const UChar * +tres_getString(const UResourceBundle *resB, + int32_t index, const char *key, + int32_t *length, + UErrorCode *status); void addNEWResourceBundleTest(TestNode**); @@ -62,6 +71,8 @@ static void TestJB3763(void); static void TestXPath(void); +static void TestStackReuse(void); + /** * extensive subtests called by TestResourceBundles **/ diff --git a/Build/source/libs/icu-xetex/test/cintltst/cstrcase.c b/Build/source/libs/icu-xetex/test/cintltst/cstrcase.c index 0c98763f940..cdbb85350f1 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cstrcase.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cstrcase.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2002-2005, International Business Machines +* Copyright (C) 2002-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -25,12 +25,11 @@ #include "unicode/ucasemap.h" #include "cmemory.h" #include "cintltst.h" -#include "cucdtst.h" /* test string case mapping functions --------------------------------------- */ -U_CFUNC void -TestCaseLower() { +static void +TestCaseLower(void) { static const UChar beforeLower[]= { 0x61, 0x42, 0x49, 0x3a3, 0xdf, 0x3a3, 0x2f, 0xd93f, 0xdfff }, @@ -127,8 +126,8 @@ buffer[length]==0 ? "yes" : "no", } } -U_CFUNC void -TestCaseUpper() { +static void +TestCaseUpper(void) { static const UChar beforeUpper[]= { 0x61, 0x42, 0x69, 0x3c2, 0xdf, 0x3c3, 0x2f, 0xfb03, 0xd93f, 0xdfff }, @@ -223,8 +222,8 @@ TestCaseUpper() { #if !UCONFIG_NO_BREAK_ITERATION -U_CFUNC void -TestCaseTitle() { +static void +TestCaseTitle(void) { static const UChar beforeTitle[]= { 0x61, 0x42, 0x20, 0x69, 0x3c2, 0x20, 0xdf, 0x3c3, 0x2f, 0xfb03, 0xd93f, 0xdfff }, @@ -331,8 +330,8 @@ TestCaseTitle() { /* test case folding and case-insensitive string compare -------------------- */ -U_CFUNC void -TestCaseFolding() { +static void +TestCaseFolding(void) { /* * CaseFolding.txt says about i and its cousins: * 0049; C; 0069; # LATIN CAPITAL LETTER I @@ -557,8 +556,8 @@ TestCaseFolding() { } } -U_CFUNC void -TestCaseCompare() { +static void +TestCaseCompare(void) { static const UChar mixed[]= { 0x61, 0x42, 0x131, 0x3a3, 0xdf, 0xfb03, 0xd93f, 0xdfff, 0 }, @@ -653,8 +652,8 @@ TestCaseCompare() { * test cases for actual case mappings using UCaseMap see * intltest utility/UnicodeStringTest/StringCaseTest/TestCasing */ -U_CFUNC void -TestUCaseMap() { +static void +TestUCaseMap(void) { static const char aBc[] ={ 0x61, 0x42, 0x63, 0 }, abc[] ={ 0x61, 0x62, 0x63, 0 }, @@ -779,3 +778,17 @@ TestUCaseMap() { ucasemap_close(csm); } + +void addCaseTest(TestNode** root); + +void addCaseTest(TestNode** root) { + /* cstrcase.c functions, declared in cucdtst.h */ + addTest(root, &TestCaseLower, "tsutil/cstrcase/TestCaseLower"); + addTest(root, &TestCaseUpper, "tsutil/cstrcase/TestCaseUpper"); +#if !UCONFIG_NO_BREAK_ITERATION + addTest(root, &TestCaseTitle, "tsutil/cstrcase/TestCaseTitle"); +#endif + addTest(root, &TestCaseFolding, "tsutil/cstrcase/TestCaseFolding"); + addTest(root, &TestCaseCompare, "tsutil/cstrcase/TestCaseCompare"); + addTest(root, &TestUCaseMap, "tsutil/cstrcase/TestUCaseMap"); +} diff --git a/Build/source/libs/icu-xetex/test/cintltst/cucdapi.c b/Build/source/libs/icu-xetex/test/cintltst/cucdapi.c index 01a94bb6148..4a919c40e94 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cucdapi.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cucdapi.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -11,6 +11,8 @@ #include "cintltst.h" #include "cucdapi.h" +#define ARRAY_SIZE(array) (int32_t)(sizeof array / sizeof array[0]) + void TestUScriptCodeAPI(){ int i =0; int numErrors =0; @@ -194,7 +196,7 @@ void TestUScriptCodeAPI(){ 0x0001D1AA, /* USCRIPT_INHERITED*/ 0x00020000, /* USCRIPT_HAN*/ 0x00000D02, /* USCRIPT_MALAYALAM*/ - 0x00000D00, /* USCRIPT_COMMON */ + 0x00000D00, /* USCRIPT_UNKNOWN (new Zzzz value in Unicode 5.0) */ 0x00000000, /* USCRIPT_COMMON*/ 0x0001D169, /* USCRIPT_INHERITED*/ 0x0001D182, /* USCRIPT_INHERITED*/ @@ -221,7 +223,7 @@ void TestUScriptCodeAPI(){ USCRIPT_INHERITED, USCRIPT_HAN , USCRIPT_MALAYALAM, - USCRIPT_COMMON, + USCRIPT_UNKNOWN, USCRIPT_COMMON, USCRIPT_INHERITED , USCRIPT_INHERITED , @@ -283,10 +285,59 @@ void TestUScriptCodeAPI(){ for(i=0; (UScriptCode)i< USCRIPT_CODE_LIMIT; i++){ const char* name = uscript_getName((UScriptCode)i); if(name==NULL || strcmp(name,"")==0){ - log_err("uscript_getName failed for code : %i\n",i); + log_err("uscript_getName failed for code %i: name is NULL or \"\"\n",i); } } } - + { + /* + * These script codes were originally added to ICU pre-3.6, so that ICU would + * have all ISO 15924 script codes. ICU was then based on Unicode 4.1. + * These script codes were added with only short names because we don't + * want to invent long names ourselves. + * Unicode 5 and later encode some of these scripts and give them long names. + * Whenever this happens, the long script names here need to be updated. + */ + static const char* expectedLong[] = { + "Balinese", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp", + "Geok", "Hans", "Hant", "Hmng", "Hung", "Inds", "Java", "Kali", "Latf", "Latg", + "Lepc", "Lina", "Mand", "Maya", "Mero", "Nko", "Orkh", "Perm", "Phags_Pa", "Phoenician", + "Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Cuneiform", + "Zxxx", "Unknown", + }; + static const char* expectedShort[] = { + "Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp", + "Geok", "Hans", "Hant", "Hmng", "Hung", "Inds", "Java", "Kali", "Latf", "Latg", + "Lepc", "Lina", "Mand", "Maya", "Mero", "Nkoo", "Orkh", "Perm", "Phag", "Phnx", + "Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Xsux", + "Zxxx", "Zzzz", + }; + int32_t j = 0; + for(i=USCRIPT_BALINESE; (UScriptCode)i<USCRIPT_CODE_LIMIT; i++, j++){ + const char* name = uscript_getName((UScriptCode)i); + if(name==NULL || strcmp(name,expectedLong[j])!=0){ + log_err("uscript_getName failed for code %i: %s!=%s\n", i, name, expectedLong[j]); + } + name = uscript_getShortName((UScriptCode)i); + if(name==NULL || strcmp(name,expectedShort[j])!=0){ + log_err("uscript_getShortName failed for code %i: %s!=%s\n", i, name, expectedShort[j]); + } + } + for(i=0; i<ARRAY_SIZE(expectedLong); i++){ + UScriptCode fillIn[5] = {USCRIPT_INVALID_CODE}; + UErrorCode status = U_ZERO_ERROR; + int32_t len = 0; + len = uscript_getCode(expectedShort[i], fillIn, ARRAY_SIZE(fillIn), &status); + if(U_FAILURE(status)){ + log_err("uscript_getCode failed for script name %s. Error: %s\n",expectedShort[i], u_errorName(status)); + } + if(len>1){ + log_err("uscript_getCode did not return expected number of codes for script %s. EXPECTED: 1 GOT: %i\n", expectedShort[i], len); + } + if(fillIn[0]!= (UScriptCode)(USCRIPT_BALINESE+i)){ + log_err("uscript_getCode did not return expected code for script %s. EXPECTED: %i GOT: %i\n", expectedShort[i], (USCRIPT_BALINESE+i), fillIn[0] ); + } + } + } } diff --git a/Build/source/libs/icu-xetex/test/cintltst/cucdtst.c b/Build/source/libs/icu-xetex/test/cintltst/cucdtst.c index 67ab67a76d3..0aa15affa92 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cucdtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cucdtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -211,7 +211,8 @@ Checks LetterLike Symbols which were previously a source of confusion */ for (i=0x2100;i<0x2138;i++) { - if(i!=0x2126 && i!=0x212a && i!=0x212b) + /* Unicode 5.0 adds lowercase U+214E (TURNED SMALL F) to U+2132 (TURNED CAPITAL F) */ + if(i!=0x2126 && i!=0x212a && i!=0x212b && i!=0x2132) { if (i != (int)u_tolower(i)) /* itself */ log_err("Failed case conversion with itself: U+%04x\n", i); @@ -324,57 +325,77 @@ Checks LetterLike Symbols which were previously a source of confusion } } -/* compare two sets, which is not easy with the current (ICU 2.4) C API... */ - +/* compare two sets and verify that their difference or intersection is empty */ static UBool showADiffB(const USet *a, const USet *b, const char *a_name, const char *b_name, UBool expect, UBool diffIsError) { + USet *aa; int32_t i, start, end, length; - UBool equal; UErrorCode errorCode; + /* + * expect: + * TRUE -> a-b should be empty, that is, b should contain all of a + * FALSE -> a&b should be empty, that is, a should contain none of b (and vice versa) + */ + if(expect ? uset_containsAll(b, a) : uset_containsNone(a, b)) { + return TRUE; + } + + /* clone a to aa because a is const */ + aa=uset_open(1, 0); + if(aa==NULL) { + /* unusual problem - out of memory? */ + return FALSE; + } + uset_addAll(aa, a); + + /* compute the set in question */ + if(expect) { + /* a-b */ + uset_removeAll(aa, b); + } else { + /* a&b */ + uset_retainAll(aa, b); + } + + /* aa is not empty because of the initial tests above; show its contents */ errorCode=U_ZERO_ERROR; - equal=TRUE; i=0; for(;;) { - length=uset_getItem(a, i, &start, &end, NULL, 0, &errorCode); + length=uset_getItem(aa, i, &start, &end, NULL, 0, &errorCode); if(errorCode==U_INDEX_OUTOFBOUNDS_ERROR) { - return equal; /* done */ + break; /* done */ } if(U_FAILURE(errorCode)) { - log_err("error comparing %s with %s at item %d: %s\n", + log_err("error comparing %s with %s at difference item %d: %s\n", a_name, b_name, i, u_errorName(errorCode)); - return FALSE; + break; } if(length!=0) { - return equal; /* done with code points, got a string or -1 */ + break; /* done with code points, got a string or -1 */ } - if(expect!=uset_containsRange(b, start, end)) { - equal=FALSE; - while(start<=end) { - if(expect!=uset_contains(b, start)) { - if(diffIsError) { - if(expect) { - log_err("error: %s contains U+%04x but %s does not\n", a_name, start, b_name); - } else { - log_err("error: %s and %s both contain U+%04x but should not intersect\n", a_name, b_name, start); - } - } else { - if(expect) { - log_verbose("info: %s contains U+%04x but %s does not\n", a_name, start, b_name); - } else { - log_verbose("info: %s and %s both contain U+%04x but should not intersect\n", a_name, b_name, start); - } - } - } - ++start; + if(diffIsError) { + if(expect) { + log_err("error: %s contains U+%04x..U+%04x but %s does not\n", a_name, start, end, b_name); + } else { + log_err("error: %s and %s both contain U+%04x..U+%04x but should not intersect\n", a_name, b_name, start, end); + } + } else { + if(expect) { + log_verbose("info: %s contains U+%04x..U+%04x but %s does not\n", a_name, start, end, b_name); + } else { + log_verbose("info: %s and %s both contain U+%04x..U+%04x but should not intersect\n", a_name, b_name, start, end); } } ++i; } + + uset_close(aa); + return FALSE; } static UBool @@ -395,8 +416,12 @@ static UBool compareUSets(const USet *a, const USet *b, const char *a_name, const char *b_name, UBool diffIsError) { + /* + * Use an arithmetic & not a logical && so that both branches + * are always taken and all differences are shown. + */ return - showAMinusB(a, b, a_name, b_name, diffIsError) && + showAMinusB(a, b, a_name, b_name, diffIsError) & showAMinusB(b, a, b_name, a_name, diffIsError); } @@ -1810,18 +1835,18 @@ TestMirroring() { errorCode=U_ZERO_ERROR; set=uset_openPattern(mirroredPattern, 17, &errorCode); - if (U_FAILURE(errorCode)) { - log_data_err("uset_openPattern(mirroredPattern, 17, &errorCode) failed!"); - } else { - for(i=0; 0==uset_getItem(set, i, &start, &end, NULL, 0, &errorCode); ++i) { - do { - c2=u_charMirror(start); - c3=u_charMirror(c2); - if(c3!=start) { - log_err("u_charMirror() does not roundtrip: U+%04lx->U+%04lx->U+%04lx\n", (long)start, (long)c2, (long)c3); - } - } while(++start<=end); - } + if (U_FAILURE(errorCode)) { + log_data_err("uset_openPattern(mirroredPattern, 17, &errorCode) failed!"); + } else { + for(i=0; 0==uset_getItem(set, i, &start, &end, NULL, 0, &errorCode); ++i) { + do { + c2=u_charMirror(start); + c3=u_charMirror(c2); + if(c3!=start) { + log_err("u_charMirror() does not roundtrip: U+%04lx->U+%04lx->U+%04lx\n", (long)start, (long)c2, (long)c3); + } + } while(++start<=end); + } } uset_close(set); @@ -2229,7 +2254,8 @@ TestAdditionalProperties() { { 0x0590, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, { 0x05cf, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, { 0x05ed, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, - { 0x07f2, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, + { 0x07f2, UCHAR_BIDI_CLASS, U_DIR_NON_SPACING_MARK }, /* Nko, new in Unicode 5.0 */ + { 0x07fe, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, /* unassigned R */ { 0x08ba, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, { 0xfb37, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, { 0xfb42, UCHAR_BIDI_CLASS, U_RIGHT_TO_LEFT }, @@ -2447,21 +2473,60 @@ TestAdditionalProperties() { ) { log_err("error: u_getIntPropertyMinValue() wrong\n"); } - - if( u_getIntPropertyMaxValue(UCHAR_DASH)!=1 || - u_getIntPropertyMaxValue(UCHAR_ID_CONTINUE)!=1 || - u_getIntPropertyMaxValue(UCHAR_BINARY_LIMIT-1)!=1 || - u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)!=(int32_t)U_CHAR_DIRECTION_COUNT-1 || - u_getIntPropertyMaxValue(UCHAR_BLOCK)!=(int32_t)UBLOCK_COUNT-1 || - u_getIntPropertyMaxValue(UCHAR_LINE_BREAK)!=(int32_t)U_LB_COUNT-1 || - u_getIntPropertyMaxValue(UCHAR_SCRIPT)!=(int32_t)USCRIPT_CODE_LIMIT-1 || - u_getIntPropertyMaxValue(0x2345)!=-1 /*JB#2410*/ || - u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE) != (int32_t) (U_DT_COUNT - 1) || - u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP) != (int32_t) (U_JG_COUNT -1) || - u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE) != (int32_t) (U_JT_COUNT -1) || - u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH) != (int32_t) (U_EA_COUNT -1) - ) { - log_err("error: u_getIntPropertyMaxValue() wrong\n"); + if( u_getIntPropertyMaxValue(UCHAR_DASH)!=1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_DASH) wrong\n"); + } + if( u_getIntPropertyMaxValue(UCHAR_ID_CONTINUE)!=1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_ID_CONTINUE) wrong\n"); + } + if( u_getIntPropertyMaxValue(UCHAR_BINARY_LIMIT-1)!=1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_BINARY_LIMIT-1) wrong\n"); + } + if( u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)!=(int32_t)U_CHAR_DIRECTION_COUNT-1 ) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS) wrong\n"); + } + if( u_getIntPropertyMaxValue(UCHAR_BLOCK)!=(int32_t)UBLOCK_COUNT-1 ) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_BLOCK) wrong\n"); + } + if(u_getIntPropertyMaxValue(UCHAR_LINE_BREAK)!=(int32_t)U_LB_COUNT-1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_LINE_BREAK) wrong\n"); + } + if(u_getIntPropertyMaxValue(UCHAR_SCRIPT)!=(int32_t)USCRIPT_CODE_LIMIT-1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_SCRIPT) wrong\n"); + } + if(u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE)!=(int32_t)U_NT_COUNT-1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE) wrong\n"); + } + if(u_getIntPropertyMaxValue(UCHAR_GENERAL_CATEGORY)!=(int32_t)U_CHAR_CATEGORY_COUNT-1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_GENERAL_CATEGORY) wrong\n"); + } + if(u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE)!=(int32_t)U_HST_COUNT-1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE) wrong\n"); + } + if(u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK)!=(int32_t)U_GCB_COUNT-1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK) wrong\n"); + } + if(u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK)!=(int32_t)U_SB_COUNT-1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK) wrong\n"); + } + if(u_getIntPropertyMaxValue(UCHAR_WORD_BREAK)!=(int32_t)U_WB_COUNT-1) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_WORD_BREAK) wrong\n"); + } + /*JB#2410*/ + if( u_getIntPropertyMaxValue(0x2345)!=-1) { + log_err("error: u_getIntPropertyMaxValue(0x2345) wrong\n"); + } + if( u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE) != (int32_t) (U_DT_COUNT - 1)) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE) wrong\n"); + } + if( u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP) != (int32_t) (U_JG_COUNT -1)) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP) wrong\n"); + } + if( u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE) != (int32_t) (U_JT_COUNT -1)) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE) wrong\n"); + } + if( u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH) != (int32_t) (U_EA_COUNT -1)) { + log_err("error: u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH) wrong\n"); } /* test u_hasBinaryProperty() and u_getIntPropertyValue() */ @@ -2722,7 +2787,7 @@ TestPropertyValues(void) { max); } - /* Script should return 0 for an invalid code point. */ + /* Script should return USCRIPT_INVALID_CODE for an invalid code point. */ for (i=0; i<2; ++i) { int32_t script; const char* desc; @@ -2742,7 +2807,7 @@ TestPropertyValues(void) { } /* We don't explicitly test ec. It should be U_FAILURE but it isn't documented as such. */ - if (script != 0) { + if (script != (int32_t)USCRIPT_INVALID_CODE) { log_err("FAIL: %s = %d, exp. 0\n", desc, script); } @@ -2784,12 +2849,28 @@ TestConsistency() { U_STRING_DECL(formatPattern, "[:Cf:]", 6); U_STRING_DECL(alphaPattern, "[:Alphabetic:]", 14); + U_STRING_DECL(mathBlocksPattern, + "[[:block=Mathematical Operators:][:block=Miscellaneous Mathematical Symbols-A:][:block=Miscellaneous Mathematical Symbols-B:][:block=Supplemental Mathematical Operators:][:block=Mathematical Alphanumeric Symbols:]]", + 1+32+46+46+45+43+1+1); /* +1 for NUL */ + U_STRING_DECL(mathPattern, "[:Math:]", 8); + U_STRING_DECL(unassignedPattern, "[:Cn:]", 6); + U_STRING_DECL(unknownPattern, "[:sc=Unknown:]", 14); + U_STRING_DECL(reservedPattern, "[[:Cn:][:Co:][:Cs:]]", 20); + U_STRING_INIT(hyphenPattern, "[:Hyphen:]", 10); U_STRING_INIT(dashPattern, "[:Dash:]", 8); U_STRING_INIT(lowerPattern, "[:Lowercase:]", 13); U_STRING_INIT(formatPattern, "[:Cf:]", 6); U_STRING_INIT(alphaPattern, "[:Alphabetic:]", 14); + U_STRING_INIT(mathBlocksPattern, + "[[:block=Mathematical Operators:][:block=Miscellaneous Mathematical Symbols-A:][:block=Miscellaneous Mathematical Symbols-B:][:block=Supplemental Mathematical Operators:][:block=Mathematical Alphanumeric Symbols:]]", + 1+32+46+46+45+43+1+1); /* +1 for NUL */ + U_STRING_INIT(mathPattern, "[:Math:]", 8); + U_STRING_INIT(unassignedPattern, "[:Cn:]", 6); + U_STRING_INIT(unknownPattern, "[:sc=Unknown:]", 14); + U_STRING_INIT(reservedPattern, "[[:Cn:][:Co:][:Cs:]]", 20); + /* * It used to be that UCD.html and its precursors said * "Those dashes used to mark connections between pieces of words, @@ -2909,6 +2990,39 @@ TestConsistency() { uset_close(set2); #endif + + /* verify that all assigned characters in Math blocks are exactly Math characters */ + errorCode=U_ZERO_ERROR; + set1=uset_openPattern(mathBlocksPattern, -1, &errorCode); + set2=uset_openPattern(mathPattern, 8, &errorCode); + set3=uset_openPattern(unassignedPattern, 6, &errorCode); + if(U_SUCCESS(errorCode)) { + uset_retainAll(set2, set1); /* [math blocks]&[:Math:] */ + uset_complement(set3); /* assigned characters */ + uset_retainAll(set1, set3); /* [math blocks]&[assigned] */ + compareUSets(set1, set2, + "[assigned Math block chars]", "[math blocks]&[:Math:]", + TRUE); + } else { + log_err("error opening [math blocks] or [:Math:] or [:Cn:] - %s\n", u_errorName(errorCode)); + } + uset_close(set1); + uset_close(set2); + uset_close(set3); + + /* new in Unicode 5.0: exactly all unassigned+PUA+surrogate code points have script=Unknown */ + errorCode=U_ZERO_ERROR; + set1=uset_openPattern(unknownPattern, 14, &errorCode); + set2=uset_openPattern(reservedPattern, 20, &errorCode); + if(U_SUCCESS(errorCode)) { + compareUSets(set1, set2, + "[:sc=Unknown:]", "[[:Cn:][:Co:][:Cs:]]", + TRUE); + } else { + log_err("error opening [:sc=Unknown:] or [[:Cn:][:Co:][:Cs:]] - %s\n", u_errorName(errorCode)); + } + uset_close(set1); + uset_close(set2); } /* diff --git a/Build/source/libs/icu-xetex/test/cintltst/cucdtst.h b/Build/source/libs/icu-xetex/test/cintltst/cucdtst.h deleted file mode 100644 index ef3a68c53bc..00000000000 --- a/Build/source/libs/icu-xetex/test/cintltst/cucdtst.h +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************** - * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and - * others. All Rights Reserved. - ********************************************************************/ -/******************************************************************************** -* -* File CUCDTST.H -* -* Modification History: -* Name Description -* Madhu Katragadda Converted to C, added tests for string functions -********************************************************************************* -*/ -/* C API TEST For Unicode */ - -#ifndef _CUCDTST -#define _CUCDTST - -/* cstrcase.c */ -U_CFUNC void TestCaseLower(void); -U_CFUNC void TestCaseUpper(void); -U_CFUNC void TestCaseTitle(void); -U_CFUNC void TestCaseFolding(void); -U_CFUNC void TestCaseCompare(void); -U_CFUNC void TestUCaseMap(void); - -#endif diff --git a/Build/source/libs/icu-xetex/test/cintltst/currtest.c b/Build/source/libs/icu-xetex/test/cintltst/currtest.c index dd67ca2aa0d..93bbee0afa1 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/currtest.c +++ b/Build/source/libs/icu-xetex/test/cintltst/currtest.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2005-2005, International Business Machines Corporation and + * Copyright (c) 2005-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ #include "unicode/utypes.h" @@ -119,7 +119,7 @@ static int32_t checkItemCount(uint32_t currencyType) { originalCount = uenum_count(en, &status); for (count=0;;count++) { const char *str = uenum_next(en, &len, &status); - if (U_FAILURE(status) || len != expectedLen || strlen(str) != expectedLen) { + if (str == NULL || len != expectedLen || strlen(str) != expectedLen) { break; } } @@ -128,6 +128,9 @@ static int32_t checkItemCount(uint32_t currencyType) { log_err("Error: uenum_count returned the wrong value (type = 0x%X). Got: %d Expected %d\n", currencyType, count, originalCount); } + if (U_FAILURE(status)) { + log_err("Error: uenum_next got an error: %s\n", u_errorName(status)); + } uenum_close(en); return count; } diff --git a/Build/source/libs/icu-xetex/test/cintltst/custrtrn.c b/Build/source/libs/icu-xetex/test/cintltst/custrtrn.c index e08632abe8d..0335a005575 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/custrtrn.c +++ b/Build/source/libs/icu-xetex/test/cintltst/custrtrn.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2001-2005, International Business Machines Corporation and + * Copyright (c) 2001-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -22,6 +22,8 @@ #include "unicode/ures.h" #include "ustr_imp.h" #include "cintltst.h" +#include "cmemory.h" +#include "cstring.h" #include "cwchar.h" #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) @@ -30,6 +32,7 @@ void addUCharTransformTest(TestNode** root); static void Test_UChar_UTF32_API(void); static void Test_UChar_UTF8_API(void); +static void Test_FromUTF8Lenient(void); static void Test_UChar_WCHART_API(void); static void Test_widestrs(void); static void Test_WCHART_LongString(void); @@ -39,6 +42,7 @@ addUCharTransformTest(TestNode** root) { addTest(root, &Test_UChar_UTF32_API, "custrtrn/Test_UChar_UTF32_API"); addTest(root, &Test_UChar_UTF8_API, "custrtrn/Test_UChar_UTF8_API"); + addTest(root, &Test_FromUTF8Lenient, "custrtrn/Test_FromUTF8Lenient"); addTest(root, &Test_UChar_WCHART_API, "custrtrn/Test_UChar_WCHART_API"); addTest(root, &Test_widestrs, "custrtrn/Test_widestrs"); addTest(root, &Test_WCHART_LongString, "custrtrn/Test_WCHART_LongString"); @@ -270,16 +274,21 @@ static void Test_UChar_UTF8_API(void){ int32_t u8DestLen =0; UBool failed = FALSE; int i= 0; + int32_t numSubstitutions; + { /* preflight */ + u8Temp[0] = 0x12; u_strToUTF8(u8Target,u8TargetLength, &u8DestLen, uSrc, uSrcLen,&err); - if(err == U_BUFFER_OVERFLOW_ERROR){ + if(err == U_BUFFER_OVERFLOW_ERROR && u8Temp[0] == 0x12){ err = U_ZERO_ERROR; u8Target = (char*) malloc (sizeof(uint8_t) * (u8DestLen+1)); u8TargetLength = u8DestLen; - + + u8Target[u8TargetLength] = (char)0xfe; + u8DestLen = -1; u_strToUTF8(u8Target,u8TargetLength, &u8DestLen, uSrc, uSrcLen,&err); - if(U_FAILURE(err)){ + if(U_FAILURE(err) || u8DestLen != u8TargetLength || u8Target[u8TargetLength] != (char)0xfe){ log_err("u_strToUTF8 failed after preflight. Error: %s\n", u_errorName(err)); return; } @@ -308,16 +317,19 @@ static void Test_UChar_UTF8_API(void){ u8SrcLen = u8DestLen; /* preflight */ + uTemp[0] = 0x1234; u_strFromUTF8(uTarget,uTargetLength,&uDestLen,u8Src,u8SrcLen,&err); - if(err == U_BUFFER_OVERFLOW_ERROR){ + if(err == U_BUFFER_OVERFLOW_ERROR && uTemp[0] == 0x1234){ err = U_ZERO_ERROR; uTarget = (UChar*) malloc( sizeof(UChar) * (uDestLen+1)); uTargetLength = uDestLen; + uTarget[uTargetLength] = 0xfff0; + uDestLen = -1; u_strFromUTF8(uTarget,uTargetLength,&uDestLen,u8Src,u8SrcLen,&err); } else { - log_err("Should have gotten U_BUFFER_OVERFLOW_ERROR"); + log_err("error: u_strFromUTF8(preflight) should have gotten U_BUFFER_OVERFLOW_ERROR\n"); } /*for(i=0; i< uDestLen; i++){ printf("0x%04X, ",uTarget[i]); @@ -325,7 +337,10 @@ static void Test_UChar_UTF8_API(void){ printf("\n"); } }*/ - + + if(U_FAILURE(err) || uDestLen != uTargetLength || uTarget[uTargetLength] != 0xfff0) { + failed = TRUE; + } for(i=0; i< uSrcLen; i++){ if(uTarget[i] != src16[i]){ log_verbose("u_strFromUTF8() failed expected: \\u%04X got: \\u%04X at index: %i \n", src16[i] ,uTarget[i],i); @@ -333,7 +348,7 @@ static void Test_UChar_UTF8_API(void){ } } if(failed){ - log_err("u_strToUTF8() failed \n"); + log_err("error: u_strFromUTF8(after preflighting) failed\n"); } free(u8Target); @@ -414,10 +429,14 @@ static void Test_UChar_UTF8_API(void){ { static const UChar withLead16[]={ 0x1800, 0xd89a, 0x0061 }, - withTrail16[]={ 0x1800, 0xdcba, 0x0061, 0 }; + withTrail16[]={ 0x1800, 0xdcba, 0x0061, 0 }, + withTrail16SubFFFD[]={ 0x1800, 0xfffd, 0x0061, 0 }, /* sub==U+FFFD */ + withTrail16Sub50005[]={ 0x1800, 0xd900, 0xdc05, 0x0061, 0 }; /* sub==U+50005 */ static const uint8_t withLead8[]={ 0xe1, 0xa0, 0x80, 0xed, 0xa2, 0x9a, 0x61 }, - withTrail8[]={ 0xe1, 0xa0, 0x80, 0xed, 0xb2, 0xba, 0x61 }; + withTrail8[]={ 0xe1, 0xa0, 0x80, 0xed, 0xb2, 0xba, 0x61, 0 }, + withTrail8Sub1A[]={ 0xe1, 0xa0, 0x80, 0x1a, 0x61, 0 }, /* sub==U+001A */ + withTrail8SubFFFD[]={ 0xe1, 0xa0, 0x80, 0xef, 0xbf, 0xbd, 0x61, 0 }; /* sub==U+FFFD */ UChar out16[10]; char out8[10]; @@ -429,8 +448,384 @@ static void Test_UChar_UTF8_API(void){ ) { log_err("error: u_strTo/FromUTF8(string with single surrogate) fails to report error\n"); } + + /* test error handling with substitution characters */ + + /* from UTF-8 with length */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out16[0]=0x55aa; + uDestLen=0; + u_strFromUTF8WithSub(out16, LENGTHOF(out16), &uDestLen, + (const char *)withTrail8, uprv_strlen((const char *)withTrail8), + 0x50005, &numSubstitutions, + &err); + if(U_FAILURE(err) || uDestLen!=u_strlen(withTrail16Sub50005) || + 0!=u_memcmp(withTrail16Sub50005, out16, uDestLen+1) || + numSubstitutions!=1) { + log_err("error: u_strFromUTF8WithSub(length) failed\n"); + } + + /* from UTF-8 with NUL termination */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out16[0]=0x55aa; + uDestLen=0; + u_strFromUTF8WithSub(out16, LENGTHOF(out16), &uDestLen, + (const char *)withTrail8, -1, + 0xfffd, &numSubstitutions, + &err); + if(U_FAILURE(err) || uDestLen!=u_strlen(withTrail16SubFFFD) || + 0!=u_memcmp(withTrail16SubFFFD, out16, uDestLen+1) || + numSubstitutions!=1) { + log_err("error: u_strFromUTF8WithSub(NUL termination) failed\n"); + } + + /* preflight from UTF-8 with NUL termination */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out16[0]=0x55aa; + uDestLen=0; + u_strFromUTF8WithSub(out16, 1, &uDestLen, + (const char *)withTrail8, -1, + 0x50005, &numSubstitutions, + &err); + if(err!=U_BUFFER_OVERFLOW_ERROR || uDestLen!=u_strlen(withTrail16Sub50005) || numSubstitutions!=1) { + log_err("error: u_strFromUTF8WithSub(preflight/NUL termination) failed\n"); + } + + /* to UTF-8 with length */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out8[0]=(char)0xf5; + u8DestLen=0; + u_strToUTF8WithSub(out8, LENGTHOF(out8), &u8DestLen, + withTrail16, u_strlen(withTrail16), + 0xfffd, &numSubstitutions, + &err); + if(U_FAILURE(err) || u8DestLen!=uprv_strlen((const char *)withTrail8SubFFFD) || + 0!=uprv_memcmp((const char *)withTrail8SubFFFD, out8, u8DestLen+1) || + numSubstitutions!=1) { + log_err("error: u_strToUTF8WithSub(length) failed\n"); + } + + /* to UTF-8 with NUL termination */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out8[0]=(char)0xf5; + u8DestLen=0; + u_strToUTF8WithSub(out8, LENGTHOF(out8), &u8DestLen, + withTrail16, -1, + 0x1a, &numSubstitutions, + &err); + if(U_FAILURE(err) || u8DestLen!=uprv_strlen((const char *)withTrail8Sub1A) || + 0!=uprv_memcmp((const char *)withTrail8Sub1A, out8, u8DestLen+1) || + numSubstitutions!=1) { + log_err("error: u_strToUTF8WithSub(NUL termination) failed\n"); + } + + /* preflight to UTF-8 with NUL termination */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out8[0]=(char)0xf5; + u8DestLen=0; + u_strToUTF8WithSub(out8, 1, &u8DestLen, + withTrail16, -1, + 0xfffd, &numSubstitutions, + &err); + if(err!=U_BUFFER_OVERFLOW_ERROR || u8DestLen!=uprv_strlen((const char *)withTrail8SubFFFD) || + numSubstitutions!=1) { + log_err("error: u_strToUTF8WithSub(preflight/NUL termination) failed\n"); + } + + /* test that numSubstitutions==0 if there are no substitutions */ + + /* from UTF-8 with length (just first 3 bytes which are valid) */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out16[0]=0x55aa; + uDestLen=0; + u_strFromUTF8WithSub(out16, LENGTHOF(out16), &uDestLen, + (const char *)withTrail8, 3, + 0x50005, &numSubstitutions, + &err); + if(U_FAILURE(err) || uDestLen!=1 || + 0!=u_memcmp(withTrail16Sub50005, out16, uDestLen) || + numSubstitutions!=0) { + log_err("error: u_strFromUTF8WithSub(no subs) failed\n"); + } + + /* to UTF-8 with length (just first UChar which is valid) */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out8[0]=(char)0xf5; + u8DestLen=0; + u_strToUTF8WithSub(out8, LENGTHOF(out8), &u8DestLen, + withTrail16, 1, + 0xfffd, &numSubstitutions, + &err); + if(U_FAILURE(err) || u8DestLen!=3 || + 0!=uprv_memcmp((const char *)withTrail8SubFFFD, out8, u8DestLen) || + numSubstitutions!=0) { + log_err("error: u_strToUTF8WithSub(no subs) failed\n"); + } + + /* test that numSubstitutions==0 if subchar==U_SENTINEL (no subchar) */ + + /* from UTF-8 with length (just first 3 bytes which are valid) */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out16[0]=0x55aa; + uDestLen=0; + u_strFromUTF8WithSub(out16, LENGTHOF(out16), &uDestLen, + (const char *)withTrail8, 3, + U_SENTINEL, &numSubstitutions, + &err); + if(U_FAILURE(err) || uDestLen!=1 || + 0!=u_memcmp(withTrail16Sub50005, out16, uDestLen) || + numSubstitutions!=0) { + log_err("error: u_strFromUTF8WithSub(no subchar) failed\n"); + } + + /* to UTF-8 with length (just first UChar which is valid) */ + err=U_ZERO_ERROR; + numSubstitutions=-1; + out8[0]=(char)0xf5; + u8DestLen=0; + u_strToUTF8WithSub(out8, LENGTHOF(out8), &u8DestLen, + withTrail16, 1, + U_SENTINEL, &numSubstitutions, + &err); + if(U_FAILURE(err) || u8DestLen!=3 || + 0!=uprv_memcmp((const char *)withTrail8SubFFFD, out8, u8DestLen) || + numSubstitutions!=0) { + log_err("error: u_strToUTF8WithSub(no subchar) failed\n"); + } } } + +/* compare if two strings are equal, but match 0xfffd in the second string with anything in the first */ +static UBool +equalAnyFFFD(const UChar *s, const UChar *t, int32_t length) { + UChar c1, c2; + + while(length>0) { + c1=*s++; + c2=*t++; + if(c1!=c2 && c2!=0xfffd) { + return FALSE; + } + --length; + } + return TRUE; +} + +/* test u_strFromUTF8Lenient() */ +static void +Test_FromUTF8Lenient(void) { + /* + * Multiple input strings, each NUL-terminated. + * Terminate with a string starting with 0xff. + */ + static const uint8_t bytes[]={ + /* well-formed UTF-8 */ + 0x61, 0xc3, 0x9f, 0xe0, 0xa0, 0x80, 0xf0, 0xa0, 0x80, 0x80, + 0x62, 0xc3, 0xa0, 0xe0, 0xa0, 0x81, 0xf0, 0xa0, 0x80, 0x81, 0, + + /* various malformed sequences */ + 0xc3, 0xc3, 0x9f, 0xc3, 0xa0, 0xe0, 0x80, 0x8a, 0xf0, 0x41, 0x42, 0x43, 0, + + /* truncated input */ + 0xc3, 0, + 0xe0, 0, + 0xe0, 0xa0, 0, + 0xf0, 0, + 0xf0, 0x90, 0, + 0xf0, 0x90, 0x80, 0, + + /* empty string */ + 0, + + /* finish */ + 0xff, 0 + }; + + /* Multiple output strings, each NUL-terminated. 0xfffd matches anything. */ + static const UChar uchars[]={ + 0x61, 0xdf, 0x800, 0xd840, 0xdc00, + 0x62, 0xe0, 0x801, 0xd840, 0xdc01, 0, + + 0xfffd, 0x9f, 0xe0, 0xa, 0xfffd, 0xfffd, 0, + + 0xfffd, 0, + 0xfffd, 0, + 0xfffd, 0, + 0xfffd, 0, + 0xfffd, 0, + 0xfffd, 0, + + 0, + + 0 + }; + + UChar dest[64]; + const char *pb; + const UChar *pu, *pDest; + int32_t srcLength, destLength0, destLength; + int number; + UErrorCode errorCode; + + /* verify checking for some illegal arguments */ + dest[0]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(dest, 1, &destLength, NULL, -1, &errorCode); + if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || dest[0]!=0x1234) { + log_err("u_strFromUTF8Lenient(src=NULL) failed\n"); + } + + dest[0]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(NULL, 1, &destLength, (const char *)bytes, -1, &errorCode); + if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) { + log_err("u_strFromUTF8Lenient(dest=NULL[1]) failed\n"); + } + + dest[0]=0x1234; + destLength=-1; + errorCode=U_MEMORY_ALLOCATION_ERROR; + pDest=u_strFromUTF8Lenient(dest, 1, &destLength, (const char *)bytes, -1, &errorCode); + if(errorCode!=U_MEMORY_ALLOCATION_ERROR || dest[0]!=0x1234) { + log_err("u_strFromUTF8Lenient(U_MEMORY_ALLOCATION_ERROR) failed\n"); + } + + dest[0]=0x1234; + destLength=-1; + errorCode=U_MEMORY_ALLOCATION_ERROR; + pDest=u_strFromUTF8Lenient(dest, 1, &destLength, (const char *)bytes, -1, NULL); + if(dest[0]!=0x1234) { + log_err("u_strFromUTF8Lenient(pErrorCode=NULL) failed\n"); + } + + /* test normal behavior */ + number=0; /* string number for log_err() */ + + for(pb=(const char *)bytes, pu=uchars; + *pb!=(char)0xff; + pb+=srcLength+1, pu+=destLength0+1, ++number + ) { + srcLength=uprv_strlen(pb); + destLength0=u_strlen(pu); + + /* preflighting with NUL-termination */ + dest[0]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(NULL, 0, &destLength, pb, -1, &errorCode); + if (errorCode!= (destLength0==0 ? U_STRING_NOT_TERMINATED_WARNING : U_BUFFER_OVERFLOW_ERROR) || + pDest!=NULL || dest[0]!=0x1234 || destLength!=destLength0 + ) { + log_err("u_strFromUTF8Lenient(%d preflighting with NUL-termination) failed\n", number); + } + + /* preflighting/some capacity with NUL-termination */ + if(srcLength>0) { + dest[destLength0-1]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(dest, destLength0-1, &destLength, pb, -1, &errorCode); + if (errorCode!=U_BUFFER_OVERFLOW_ERROR || + dest[destLength0-1]!=0x1234 || destLength!=destLength0 + ) { + log_err("u_strFromUTF8Lenient(%d preflighting/some capacity with NUL-termination) failed\n", number); + } + } + + /* conversion with NUL-termination, much capacity */ + dest[0]=dest[destLength0]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(dest, LENGTHOF(dest), &destLength, pb, -1, &errorCode); + if (errorCode!=U_ZERO_ERROR || + pDest!=dest || dest[destLength0]!=0 || + destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength) + ) { + log_err("u_strFromUTF8Lenient(%d conversion with NUL-termination, much capacity) failed\n", number); + } + + /* conversion with NUL-termination, exact capacity */ + dest[0]=dest[destLength0]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(dest, destLength0, &destLength, pb, -1, &errorCode); + if (errorCode!=U_STRING_NOT_TERMINATED_WARNING || + pDest!=dest || dest[destLength0]!=0x1234 || + destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength) + ) { + log_err("u_strFromUTF8Lenient(%d conversion with NUL-termination, exact capacity) failed\n", number); + } + + /* preflighting with length */ + dest[0]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(NULL, 0, &destLength, pb, srcLength, &errorCode); + if (errorCode!= (destLength0==0 ? U_STRING_NOT_TERMINATED_WARNING : U_BUFFER_OVERFLOW_ERROR) || + pDest!=NULL || dest[0]!=0x1234 || destLength!=srcLength + ) { + log_err("u_strFromUTF8Lenient(%d preflighting with length) failed\n", number); + } + + /* preflighting/some capacity with length */ + if(srcLength>0) { + dest[srcLength-1]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(dest, srcLength-1, &destLength, pb, srcLength, &errorCode); + if (errorCode!=U_BUFFER_OVERFLOW_ERROR || + dest[srcLength-1]!=0x1234 || destLength!=srcLength + ) { + log_err("u_strFromUTF8Lenient(%d preflighting/some capacity with length) failed\n", number); + } + } + + /* conversion with length, much capacity */ + dest[0]=dest[destLength0]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(dest, LENGTHOF(dest), &destLength, pb, srcLength, &errorCode); + if (errorCode!=U_ZERO_ERROR || + pDest!=dest || dest[destLength0]!=0 || + destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength) + ) { + log_err("u_strFromUTF8Lenient(%d conversion with length, much capacity) failed\n", number); + } + + /* conversion with length, srcLength capacity */ + dest[0]=dest[srcLength]=dest[destLength0]=0x1234; + destLength=-1; + errorCode=U_ZERO_ERROR; + pDest=u_strFromUTF8Lenient(dest, srcLength, &destLength, pb, srcLength, &errorCode); + if(srcLength==destLength0) { + if (errorCode!=U_STRING_NOT_TERMINATED_WARNING || + pDest!=dest || dest[destLength0]!=0x1234 || + destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength) + ) { + log_err("u_strFromUTF8Lenient(%d conversion with length, srcLength capacity/not terminated) failed\n", number); + } + } else { + if (errorCode!=U_ZERO_ERROR || + pDest!=dest || dest[destLength0]!=0 || + destLength!=destLength0 || !equalAnyFFFD(dest, pu, destLength) + ) { + log_err("u_strFromUTF8Lenient(%d conversion with length, srcLength capacity/terminated) failed\n", number); + } + } + } +} + static const uint16_t src16j[] = { 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x000D, 0x000A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x000D, 0x000A, @@ -671,7 +1066,7 @@ static void Test_UChar_WCHART_API(void){ } } #else - log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32"); + log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32"); #endif } @@ -713,7 +1108,7 @@ static void Test_widestrs() log_err("u_strFromWCS: wcs = %S, wl = %d,rts = %s, rtl = %d!\n", wcs, wl, u_austrcpy(astr, rts), rtl); } #else - log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32"); + log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32"); #endif } @@ -777,7 +1172,7 @@ Test_WCHART_LongString(){ /* close the bundle */ ures_close(theBundle); #else - log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32"); + log_info("Not testing u_str*WCS because (!UCONFIG_NO_CONVERSION && !UCONFIG_NO_LEGACY_CONVERSION) and wchar is neither utf16 nor utf32"); #endif } diff --git a/Build/source/libs/icu-xetex/test/cintltst/custrtst.c b/Build/source/libs/icu-xetex/test/cintltst/custrtst.c index 3e7ac9eb9d3..76cae0be6d7 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/custrtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/custrtst.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2002-2005, International Business Machines +* Copyright (C) 2002-2006, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -16,15 +16,11 @@ * Tests of ustring.h Unicode string API functions. */ -#include "unicode/utypes.h" #include "unicode/ustring.h" -#include "unicode/uloc.h" #include "unicode/ucnv.h" #include "unicode/uiter.h" #include "cintltst.h" -#include "cucdtst.h" #include <string.h> -#include <stdlib.h> #define LENGTHOF(array) (sizeof(array)/sizeof((array)[0])) @@ -42,6 +38,7 @@ static void TestUnescape(void); static void TestCountChar32(void); static void TestUCharIterator(void); static void TestUNormIterator(void); +static void TestBadUNormIterator(void); void addUStringTest(TestNode** root); @@ -55,16 +52,7 @@ void addUStringTest(TestNode** root) addTest(root, &TestCountChar32, "tsutil/custrtst/TestCountChar32"); addTest(root, &TestUCharIterator, "tsutil/custrtst/TestUCharIterator"); addTest(root, &TestUNormIterator, "tsutil/custrtst/TestUNormIterator"); - - /* cstrcase.c functions, declared in cucdtst.h */ - addTest(root, &TestCaseLower, "tsutil/custrtst/TestCaseLower"); - addTest(root, &TestCaseUpper, "tsutil/custrtst/TestCaseUpper"); -#if !UCONFIG_NO_BREAK_ITERATION - addTest(root, &TestCaseTitle, "tsutil/custrtst/TestCaseTitle"); -#endif - addTest(root, &TestCaseFolding, "tsutil/custrtst/TestCaseFolding"); - addTest(root, &TestCaseCompare, "tsutil/custrtst/TestCaseCompare"); - addTest(root, &TestUCaseMap, "tsutil/custrtst/TestUCaseMap"); + addTest(root, &TestBadUNormIterator, "tsutil/custrtst/TestBadUNormIterator"); } /* test data for TestStringFunctions ---------------------------------------- */ @@ -1534,6 +1522,11 @@ TestUNormIterator() { /* test nothing */ } +static void +TestBadUNormIterator(void) { + /* test nothing, as well */ +} + #else #include "unicode/unorm.h" @@ -1795,4 +1788,30 @@ TestUNormIterator() { testUNormIteratorWithText(surrogateText, length, length, "UCharIterSurrEnd", "UNormIterSurrEnd1"); } +static void +TestBadUNormIterator(void) { +#if !UCONFIG_NO_NORMALIZATION + UErrorCode status = U_ILLEGAL_ESCAPE_SEQUENCE; + UNormIterator *uni; + + unorm_setIter(NULL, NULL, UNORM_NONE, &status); + if (status != U_ILLEGAL_ESCAPE_SEQUENCE) { + log_err("unorm_setIter changed the error code to: %s\n", u_errorName(status)); + } + status = U_ZERO_ERROR; + unorm_setIter(NULL, NULL, UNORM_NONE, &status); + if (status != U_ILLEGAL_ARGUMENT_ERROR) { + log_err("unorm_setIter didn't react correctly to bad arguments: %s\n", u_errorName(status)); + } + status = U_ZERO_ERROR; + uni=unorm_openIter(NULL, 0, &status); + if(U_FAILURE(status)) { + log_err("unorm_openIter() fails: %s\n", u_errorName(status)); + return; + } + unorm_setIter(uni, NULL, UNORM_NONE, &status); + unorm_closeIter(uni); +#endif +} + #endif diff --git a/Build/source/libs/icu-xetex/test/cintltst/cutiltst.c b/Build/source/libs/icu-xetex/test/cintltst/cutiltst.c index c19b23de923..2bb339c6d96 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/cutiltst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/cutiltst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -18,6 +18,7 @@ void addLocaleTest(TestNode**); void addCLDRTest(TestNode**); void addUnicodeTest(TestNode**); void addUStringTest(TestNode**); +void addCaseTest(TestNode**); void addResourceBundleTest(TestNode**); void addNEWResourceBundleTest(TestNode**); void addHashtableTest(TestNode** root); @@ -37,6 +38,7 @@ void addUtility(TestNode** root) addCLDRTest(root); addUnicodeTest(root); addUStringTest(root); + addCaseTest(root); addResourceBundleTest(root); addNEWResourceBundleTest(root); addHashtableTest(root); diff --git a/Build/source/libs/icu-xetex/test/cintltst/eurocreg.c b/Build/source/libs/icu-xetex/test/cintltst/eurocreg.c index 99b5bd89a4d..a070374b802 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/eurocreg.c +++ b/Build/source/libs/icu-xetex/test/cintltst/eurocreg.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1999-2005, International Business Machines Corporation and + * Copyright (c) 1999-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ #include "unicode/utypes.h" @@ -11,6 +11,7 @@ void TestEuroRegression(void); void addTestEuroRegression(TestNode** root); +#if !UCONFIG_NO_LEGACY_CONVERSION void addTestEuroRegression(TestNode** root) { addTest(root, &TestEuroRegression, "tsconv/eurocreg/TestEuroRegression"); @@ -179,3 +180,9 @@ UBool isEuroAware(UConverter* myConv) } } +#else +void addTestEuroRegression(TestNode** root) +{ + /* test nothing... */ +} +#endif diff --git a/Build/source/libs/icu-xetex/test/cintltst/hpmufn.c b/Build/source/libs/icu-xetex/test/cintltst/hpmufn.c index a67578f99e3..ef7d202395d 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/hpmufn.c +++ b/Build/source/libs/icu-xetex/test/cintltst/hpmufn.c @@ -137,6 +137,20 @@ static void TestHeapFunctions() { utrace_getFunctions(&traceContext, &traceEntryFunc, &traceExitFunc, &traceDataFunc); traceLevel = utrace_getLevel(); + /* Verify that ICU can be cleaned up and reinitialized successfully. + * Failure here usually means that some ICU service didn't clean up successfully, + * probably because some earlier test accidently left something open. */ + u_cleanup(); + utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc); + utrace_setLevel(traceLevel); + status = U_ZERO_ERROR; + u_setDataDirectory(icuDataDir); + u_init(&status); + TEST_STATUS(status, U_ZERO_ERROR); + if (U_FAILURE(status)) { + return; + } + /* Can not set memory functions if ICU is already initialized */ u_setMemoryFunctions(&gContext, myMemAlloc, myMemRealloc, myMemFree, &status); TEST_STATUS(status, U_INVALID_STATE_ERROR); @@ -287,6 +301,20 @@ static void TestMutexFunctions() { utrace_getFunctions(&traceContext, &traceEntryFunc, &traceExitFunc, &traceDataFunc); traceLevel = utrace_getLevel(); + /* Verify that ICU can be cleaned up and reinitialized successfully. + * Failure here usually means that some ICU service didn't clean up successfully, + * probably because some earlier test accidently left something open. */ + u_cleanup(); + utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc); + utrace_setLevel(traceLevel); + status = U_ZERO_ERROR; + u_setDataDirectory(icuDataDir); + u_init(&status); + TEST_STATUS(status, U_ZERO_ERROR); + if (U_FAILURE(status)) { + return; + } + /* Can not set mutex functions if ICU is already initialized */ u_setMutexFunctions(&gContext, myMutexInit, myMutexDestroy, myMutexLock, myMutexUnlock, &status); TEST_STATUS(status, U_INVALID_STATE_ERROR); @@ -410,14 +438,31 @@ static void TestIncDecFunctions() { const void *traceContext; int32_t traceLevel; + /* Save ICU's data dir and tracing functions so that they can be resored + after cleanup and reinit. */ + dataDir = safeGetICUDataDirectory(); + utrace_getFunctions(&traceContext, &traceEntryFunc, &traceExitFunc, &traceDataFunc); + traceLevel = utrace_getLevel(); + + /* Verify that ICU can be cleaned up and reinitialized successfully. + * Failure here usually means that some ICU service didn't clean up successfully, + * probably because some earlier test accidently left something open. */ + u_cleanup(); + utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc); + utrace_setLevel(traceLevel); + status = U_ZERO_ERROR; + u_setDataDirectory(dataDir); + u_init(&status); + TEST_STATUS(status, U_ZERO_ERROR); + if (U_FAILURE(status)) { + return; + } + /* Can not set mutex functions if ICU is already initialized */ u_setAtomicIncDecFunctions(&gIncDecContext, myIncFunc, myDecFunc, &status); TEST_STATUS(status, U_INVALID_STATE_ERROR); - /* Un-initialize ICU */ - dataDir = safeGetICUDataDirectory(); - utrace_getFunctions(&traceContext, &traceEntryFunc, &traceExitFunc, &traceDataFunc); - traceLevel = utrace_getLevel(); + /* Clean up ICU */ u_cleanup(); utrace_setFunctions(traceContext, traceEntryFunc, traceExitFunc, traceDataFunc); utrace_setLevel(traceLevel); diff --git a/Build/source/libs/icu-xetex/test/cintltst/nccbtst.c b/Build/source/libs/icu-xetex/test/cintltst/nccbtst.c index 64d0922e3a3..d82d37b9e6d 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/nccbtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/nccbtst.c @@ -1,15 +1,16 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* +******************************************************************************** * File NCCBTST.C * * Modification History: * Name Description * Madhu Katragadda 7/21/1999 Testing error callback routines -************************************************************************************** +******************************************************************************** */ #include <stdio.h> #include <stdlib.h> @@ -23,6 +24,7 @@ #include "unicode/utypes.h" #include "unicode/ustring.h" #include "nccbtst.h" +#include "unicode/ucnv_cb.h" #define NEW_MAX_BUFFER 999 #define nct_min(x,y) ((x<y) ? x : y) @@ -78,6 +80,8 @@ static void setNuConvTestName(const char *codepage, const char *direction) } +static void TestCallBackFailure(void); + void addTestConvertErrorCallBack(TestNode** root); void addTestConvertErrorCallBack(TestNode** root) @@ -86,8 +90,13 @@ void addTestConvertErrorCallBack(TestNode** root) addTest(root, &TestStopCallBack, "tsconv/nccbtst/TestStopCallBack"); addTest(root, &TestSubCallBack, "tsconv/nccbtst/TestSubCallBack"); addTest(root, &TestSubWithValueCallBack, "tsconv/nccbtst/TestSubWithValueCallBack"); + +#if !UCONFIG_NO_LEGACY_CONVERSION addTest(root, &TestLegalAndOtherCallBack, "tsconv/nccbtst/TestLegalAndOtherCallBack"); addTest(root, &TestSingleByteCallBack, "tsconv/nccbtst/TestSingleByteCallBack"); +#endif + + addTest(root, &TestCallBackFailure, "tsconv/nccbtst/TestCallBackFailure"); } static void TestSkipCallBack() @@ -112,12 +121,13 @@ static void TestSubCallBack() TestSub(1,NEW_MAX_BUFFER); TestSub(1,1); TestSub(NEW_MAX_BUFFER, 1); + +#if !UCONFIG_NO_LEGACY_CONVERSION TestEBCDIC_STATEFUL_Sub(1, 1); TestEBCDIC_STATEFUL_Sub(1, NEW_MAX_BUFFER); TestEBCDIC_STATEFUL_Sub(NEW_MAX_BUFFER, 1); TestEBCDIC_STATEFUL_Sub(NEW_MAX_BUFFER, NEW_MAX_BUFFER); - - +#endif } static void TestSubWithValueCallBack() @@ -128,6 +138,7 @@ static void TestSubWithValueCallBack() TestSubWithValue(NEW_MAX_BUFFER, 1); } +#if !UCONFIG_NO_LEGACY_CONVERSION static void TestLegalAndOtherCallBack() { TestLegalAndOthers(NEW_MAX_BUFFER, NEW_MAX_BUFFER); @@ -143,6 +154,7 @@ static void TestSingleByteCallBack() TestSingleByte(1,1); TestSingleByte(NEW_MAX_BUFFER, 1); } +#endif static void TestSkip(int32_t inputsize, int32_t outputsize) { @@ -161,6 +173,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) /*From Unicode*/ log_verbose("Testing fromUnicode with UCNV_FROM_U_CALLBACK_SKIP \n"); +#if !UCONFIG_NO_LEGACY_CONVERSION { static const UChar sampleText[] = { 0x0000, 0xAC00, 0xAC01, 0xEF67, 0xD700 }; static const UChar sampleText2[] = { 0x6D63, 0x6D64, 0x6D65, 0x6D66 }; @@ -193,6 +206,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) log_err("u->ibm-930 with skip with untaken fallbacks did not match.\n"); } } +#endif { static const UChar usasciiFromU[] = { 0x61, 0x80, 0x4e00, 0x31, 0xd800, 0xdfff, 0x39 }; @@ -213,6 +227,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) log_err("u->US-ASCII with skip did not match.\n"); } +#if !UCONFIG_NO_LEGACY_CONVERSION /* SBCS NLTC codepage 367 for US-ASCII */ if(!testConvertFromUnicode(usasciiFromU, sizeof(usasciiFromU)/U_SIZEOF_UCHAR, usasciiFromUBytes, sizeof(usasciiFromUBytes), @@ -222,6 +237,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) ) { log_err("u->ibm-367 with skip did not match.\n"); } +#endif /* ISO-Latin-1 */ if(!testConvertFromUnicode(latin1FromU, sizeof(latin1FromU)/U_SIZEOF_UCHAR, @@ -233,6 +249,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) log_err("u->LATIN_1 with skip did not match.\n"); } +#if !UCONFIG_NO_LEGACY_CONVERSION /* windows-1252 */ if(!testConvertFromUnicode(latin1FromU, sizeof(latin1FromU)/U_SIZEOF_UCHAR, latin1FromUBytes, sizeof(latin1FromUBytes), @@ -365,6 +382,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) }; +#endif static const UChar SCSU_inputText[]={ 0x0041, 0xd801/*illegal*/, 0x0042, }; @@ -379,6 +397,8 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) 2, }; + +#if !UCONFIG_NO_LEGACY_CONVERSION /* ISCII */ static const UChar iscii_inputText[]={ 0x0041, 0x3712/*unassigned*/, 0x0042, }; static const uint8_t to_iscii[]={ @@ -456,7 +476,8 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) if(!testConvertFromUnicodeWithContext(hz_inputText1, sizeof(hz_inputText1)/sizeof(hz_inputText1[0]), to_hz1, sizeof(to_hz1), "hz", UCNV_FROM_U_CALLBACK_SKIP, from_hzOffs1, NULL, 0,UCNV_SKIP_STOP_ON_ILLEGAL,U_ILLEGAL_CHAR_FOUND )) - log_err("u-> hz with skip & UCNV_SKIP_STOP_ON_ILLEGAL did not match.\n"); + log_err("u-> hz with skip & UCNV_SKIP_STOP_ON_ILLEGAL did not match.\n"); +#endif /*SCSU*/ if(!testConvertFromUnicode(SCSU_inputText, sizeof(SCSU_inputText)/sizeof(SCSU_inputText[0]), @@ -464,6 +485,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) UCNV_FROM_U_CALLBACK_SKIP, from_SCSUOffs, NULL, 0 )) log_err("u-> SCSU with skip did not match.\n"); +#if !UCONFIG_NO_LEGACY_CONVERSION /*ISCII*/ if(!testConvertFromUnicode(iscii_inputText, sizeof(iscii_inputText)/sizeof(iscii_inputText[0]), to_iscii, sizeof(to_iscii), "ISCII,version=0", @@ -474,7 +496,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) to_iscii1, sizeof(to_iscii1), "ISCII,version=0", UCNV_FROM_U_CALLBACK_SKIP, from_isciiOffs1, NULL, 0,UCNV_SKIP_STOP_ON_ILLEGAL,U_ILLEGAL_CHAR_FOUND )) log_err("u-> iscii with skip & UCNV_SKIP_STOP_ON_ILLEGAL did not match.\n"); - +#endif } log_verbose("Testing fromUnicode for BOCU-1 with UCNV_TO_U_CALLBACK_SKIP\n"); @@ -625,6 +647,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) /*to Unicode*/ log_verbose("Testing toUnicode with UCNV_TO_U_CALLBACK_SKIP \n"); +#if !UCONFIG_NO_LEGACY_CONVERSION { static const UChar IBM_949skiptoUnicode[]= {0x0000, 0xAC00, 0xAC01, 0xD700 }; @@ -656,6 +679,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) UCNV_TO_U_CALLBACK_SKIP, fromIBM930Offs, NULL, 0,"i",U_ILLEGAL_CHAR_FOUND )) log_err("ibm-930->u with skip did not match.\n"); } +#endif { static const uint8_t usasciiToUBytes[] = { 0x61, 0x80, 0x31 }; @@ -676,6 +700,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) log_err("US-ASCII->u with skip did not match.\n"); } +#if !UCONFIG_NO_LEGACY_CONVERSION /* SBCS NLTC codepage 367 for US-ASCII */ if(!testConvertToUnicode(usasciiToUBytes, sizeof(usasciiToUBytes), usasciiToU, sizeof(usasciiToU)/U_SIZEOF_UCHAR, @@ -685,6 +710,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) ) { log_err("ibm-367->u with skip did not match.\n"); } +#endif /* ISO-Latin-1 */ if(!testConvertToUnicode(latin1ToUBytes, sizeof(latin1ToUBytes), @@ -696,6 +722,7 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) log_err("LATIN_1->u with skip did not match.\n"); } +#if !UCONFIG_NO_LEGACY_CONVERSION /* windows-1252 */ if(!testConvertToUnicode(latin1ToUBytes, sizeof(latin1ToUBytes), latin1ToU, sizeof(latin1ToU)/U_SIZEOF_UCHAR, @@ -705,8 +732,10 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) ) { log_err("windows-1252->u with skip did not match.\n"); } +#endif } +#if !UCONFIG_NO_LEGACY_CONVERSION { static const uint8_t sampleTxtEBCIDIC_STATEFUL [] ={ 0x0e, 0x5d, 0x5f , 0x41, 0x79, 0x41, 0x44 @@ -869,6 +898,8 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) log_err("LMBCS->u with skip did not match.\n"); } +#endif + log_verbose("Testing to Unicode for UTF-8 with UCNV_TO_U_CALLBACK_SKIP \n"); { const uint8_t sampleText1[] = { 0x31, 0xe4, 0xba, 0x8c, @@ -1068,7 +1099,10 @@ static void TestStop(int32_t inputsize, int32_t outputsize) gInBufferSize = inputsize; gOutBufferSize = outputsize; + /*From Unicode*/ + +#if !UCONFIG_NO_LEGACY_CONVERSION if(!testConvertFromUnicode(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expstopIBM_949, sizeof(expstopIBM_949), "ibm-949", UCNV_FROM_U_CALLBACK_STOP, toIBM949Offsstop, NULL, 0 )) @@ -1200,6 +1234,8 @@ static void TestStop(int32_t inputsize, int32_t outputsize) } +#endif + log_verbose("Testing fromUnicode for SCSU with UCNV_FROM_U_CALLBACK_STOP \n"); { static const UChar SCSU_inputText[]={ 0x0041, 0xd801/*illegal*/, 0x0042, }; @@ -1218,7 +1254,10 @@ static void TestStop(int32_t inputsize, int32_t outputsize) log_err("u-> SCSU with skip did not match.\n"); } + /*to Unicode*/ + +#if !UCONFIG_NO_LEGACY_CONVERSION if(!testConvertToUnicode(expstopIBM_949, sizeof(expstopIBM_949), IBM_949stoptoUnicode, sizeof(IBM_949stoptoUnicode)/sizeof(IBM_949stoptoUnicode[0]),"ibm-949", UCNV_TO_U_CALLBACK_STOP, fromIBM949Offs, NULL, 0 )) @@ -1275,6 +1314,8 @@ static void TestStop(int32_t inputsize, int32_t outputsize) UCNV_TO_U_CALLBACK_STOP, from_euc_twOffs, NULL, 0 )) log_err("euc-tw->u with stop did not match.\n"); } +#endif + log_verbose("Testing toUnicode for UTF-8 with UCNV_TO_U_CALLBACK_STOP \n"); { static const uint8_t sampleText1[] = { 0x31, 0xe4, 0xba, 0x8c, @@ -1331,6 +1372,8 @@ static void TestSub(int32_t inputsize, int32_t outputsize) gOutBufferSize = outputsize; /*from unicode*/ + +#if !UCONFIG_NO_LEGACY_CONVERSION if(!testConvertFromUnicode(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expsubIBM_949, sizeof(expsubIBM_949), "ibm-949", UCNV_FROM_U_CALLBACK_SUBSTITUTE, toIBM949Offssub, NULL, 0 )) @@ -1384,6 +1427,7 @@ static void TestSub(int32_t inputsize, int32_t outputsize) UCNV_FROM_U_CALLBACK_SUBSTITUTE, from_euc_twOffs, NULL, 0 )) log_err("u-> euc-tw with substitute did not match.\n"); } +#endif log_verbose("Testing fromUnicode for SCSU with UCNV_FROM_U_CALLBACK_SUBSTITUTE \n"); { @@ -1493,6 +1537,8 @@ static void TestSub(int32_t inputsize, int32_t outputsize) } /*to unicode*/ + +#if !UCONFIG_NO_LEGACY_CONVERSION if(!testConvertToUnicode(expsubIBM_949, sizeof(expsubIBM_949), IBM_949subtoUnicode, sizeof(IBM_949subtoUnicode)/sizeof(IBM_949subtoUnicode[0]),"ibm-949", UCNV_TO_U_CALLBACK_SUBSTITUTE, fromIBM949Offs, NULL, 0 )) @@ -1557,10 +1603,9 @@ static void TestSub(int32_t inputsize, int32_t outputsize) euc_jptoUnicode, sizeof(euc_jptoUnicode)/sizeof(euc_jptoUnicode[0]),"euc-jp", UCNV_TO_U_CALLBACK_SUBSTITUTE, from_euc_jpOffs, NULL, 0 ,"i", U_ILLEGAL_CHAR_FOUND)) log_err("euc-jp->u with substitute did not match.\n"); - - - } +#endif + log_verbose("Testing toUnicode for UTF-8 with UCNV_TO_U_CALLBACK_SUBSTITUTE \n"); { const uint8_t sampleText1[] = { 0x31, 0xe4, 0xba, 0x8c, @@ -1585,6 +1630,7 @@ static void TestSub(int32_t inputsize, int32_t outputsize) log_err("scsu->u with stop did not match.\n");; } +#if !UCONFIG_NO_LEGACY_CONVERSION log_verbose("Testing ibm-930 subchar/subchar1\n"); { static const UChar u1[]={ 0x6d63, 0x6d64, 0x6d65, 0x6d66, 0xdf }; @@ -1623,6 +1669,7 @@ static void TestSub(int32_t inputsize, int32_t outputsize) log_err("gb18030->u with substitute did not match.\n"); } } +#endif log_verbose("Testing UTF-7 toUnicode with substitute callbacks\n"); { @@ -1750,6 +1797,8 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) gOutBufferSize = outputsize; /*from Unicode*/ + +#if !UCONFIG_NO_LEGACY_CONVERSION if(!testConvertFromUnicode(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expsubwvalIBM_949, sizeof(expsubwvalIBM_949), "ibm-949", UCNV_FROM_U_CALLBACK_ESCAPE, toIBM949Offs, NULL, 0 )) @@ -2187,11 +2236,12 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) UCNV_FROM_U_CALLBACK_ESCAPE, from_isciiOffs, NULL, 0 )) log_err("u-> iscii with subst with value did not match.\n"); } - +#endif log_verbose("Testing toUnicode with UCNV_TO_U_CALLBACK_ESCAPE \n"); /*to Unicode*/ { +#if !UCONFIG_NO_LEGACY_CONVERSION static const uint8_t sampleTxtToU[]= { 0x00, 0x9f, 0xaf, 0x81, 0xad, /*unassigned*/ 0x89, 0xd3 }; @@ -2302,7 +2352,7 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) 0x42,}; static const int32_t from_isciiOffs [] ={0,1,2,2,2,2,3,4,5,5,5,5,6 }; - +#endif /*UTF8*/ static const uint8_t sampleTxtUTF8[]={ @@ -2341,7 +2391,8 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) 9 }; - + +#if !UCONFIG_NO_LEGACY_CONVERSION if(!testConvertToUnicode(sampleTxtToU, sizeof(sampleTxtToU), IBM_943toUnicode, sizeof(IBM_943toUnicode)/sizeof(IBM_943toUnicode[0]),"ibm-943", UCNV_TO_U_CALLBACK_ESCAPE, fromIBM943Offs, NULL, 0 )) @@ -2424,6 +2475,8 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) isciitoUnicode, sizeof(isciitoUnicode)/sizeof(isciitoUnicode[0]),"ISCII,version=0", UCNV_TO_U_CALLBACK_ESCAPE, from_isciiOffs, NULL, 0)) log_err("ISCII ->u with substitute with value did not match.\n"); +#endif + if(!testConvertToUnicode(sampleTxtUTF8, sizeof(sampleTxtUTF8), UTF8ToUnicode, sizeof(UTF8ToUnicode)/sizeof(UTF8ToUnicode[0]),"UTF-8", UCNV_TO_U_CALLBACK_ESCAPE, fromUTF8, NULL, 0)) @@ -2435,6 +2488,7 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) } } +#if !UCONFIG_NO_LEGACY_CONVERSION static void TestLegalAndOthers(int32_t inputsize, int32_t outputsize) { static const UChar legalText[] = { 0x0000, 0xAC00, 0xAC01, 0xD700 }; @@ -2522,8 +2576,7 @@ static void TestEBCDIC_STATEFUL_Sub(int32_t inputsize, int32_t outputsize) UCNV_FROM_U_CALLBACK_SUBSTITUTE, offset_930_subvaried, mySubChar, 1 )) log_err("u-> ibm-930(EBCDIC_STATEFUL) with subst(setSubChar=0x3f) did not match.\n"); } - - +#endif UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen, const char *codepage, UConverterFromUCallback callback , const int32_t *expectOffsets, @@ -2533,28 +2586,28 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t UErrorCode status = U_ZERO_ERROR; UConverter *conv = 0; - uint8_t junkout[NEW_MAX_BUFFER]; /* FIX */ + char junkout[NEW_MAX_BUFFER]; /* FIX */ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */ const UChar *src; - uint8_t *end; - uint8_t *targ; + char *end; + char *targ; int32_t *offs; int i; int32_t realBufferSize; - uint8_t *realBufferEnd; + char *realBufferEnd; const UChar *realSourceEnd; const UChar *sourceLimit; UBool checkOffsets = TRUE; UBool doFlush; char junk[9999]; char offset_str[9999]; - uint8_t *p; + char *p; UConverterFromUCallback oldAction = NULL; const void* oldContext = NULL; for(i=0;i<NEW_MAX_BUFFER;i++) - junkout[i] = 0xF0; + junkout[i] = (char)0xF0; for(i=0;i<NEW_MAX_BUFFER;i++) junokout[i] = 0xFF; setNuConvTestName(codepage, "FROM"); @@ -2684,7 +2737,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t { log_err("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName); log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName); - printSeqErr(junkout, (int32_t)(targ-junkout)); + printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout)); printSeqErr(expect, expectLen); return FALSE; } @@ -2695,7 +2748,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t) )){ log_err("did not get the expected offsets while %s \n", gNuConvTestName); log_err("Got Output : "); - printSeqErr(junkout, (int32_t)(targ-junkout)); + printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout)); log_err("Got Offsets: "); for(p=junkout;p<targ;p++) log_err("%d,", junokout[p-junkout]); @@ -2719,7 +2772,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t log_err("source: "); printUSeqErr(source, sourceLen); log_err("Got: "); - printSeqErr(junkout, expectLen); + printSeqErr((const uint8_t *)junkout, expectLen); log_err("Expected: "); printSeqErr(expect, expectLen); return FALSE; @@ -2734,9 +2787,9 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e UConverter *conv = 0; UChar junkout[NEW_MAX_BUFFER]; /* FIX */ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */ - const uint8_t *src; - const uint8_t *realSourceEnd; - const uint8_t *srcLimit; + const char *src; + const char *realSourceEnd; + const char *srcLimit; UChar *targ; UChar *end; int32_t *offs; @@ -2771,7 +2824,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e log_verbose("Converter opened..\n"); - src = source; + src = (const char *)source; targ = junkout; offs = junokout; @@ -2831,8 +2884,8 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e char errChars[50]; /* should be sufficient */ int8_t errLen = 50; UErrorCode err = U_ZERO_ERROR; - const uint8_t* limit= NULL; - const uint8_t* start= NULL; + const char* limit= NULL; + const char* start= NULL; ucnv_getInvalidChars(conv,errChars, &errLen, &err); if(U_FAILURE(err)){ log_err("ucnv_getInvalidChars failed with error : %s\n",u_errorName(err)); @@ -2841,7 +2894,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e limit = src; /* length of in invalid chars should be equal to returned length*/ start = src - errLen; - if(uprv_strncmp(errChars,(char*)start,errLen)!=0){ + if(uprv_strncmp(errChars,start,errLen)!=0){ log_err("ucnv_getInvalidChars did not return the correct invalid chars for encoding %s \n", ucnv_getName(conv,&err)); } } @@ -2898,7 +2951,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e log_err("0x%04x,", junkout[i]); log_err("\n"); log_err("From source: "); - for(i=0; i<(src-source); i++) + for(i=0; i<(src-(const char *)source); i++) log_err(" 0x%02x,", (unsigned char)source[i]); log_err("\n"); } @@ -2930,28 +2983,28 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, con UErrorCode status = U_ZERO_ERROR; UConverter *conv = 0; - uint8_t junkout[NEW_MAX_BUFFER]; /* FIX */ + char junkout[NEW_MAX_BUFFER]; /* FIX */ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */ const UChar *src; - uint8_t *end; - uint8_t *targ; + char *end; + char *targ; int32_t *offs; int i; int32_t realBufferSize; - uint8_t *realBufferEnd; + char *realBufferEnd; const UChar *realSourceEnd; const UChar *sourceLimit; UBool checkOffsets = TRUE; UBool doFlush; char junk[9999]; char offset_str[9999]; - uint8_t *p; + char *p; UConverterFromUCallback oldAction = NULL; const void* oldContext = NULL; for(i=0;i<NEW_MAX_BUFFER;i++) - junkout[i] = 0xF0; + junkout[i] = (char)0xF0; for(i=0;i<NEW_MAX_BUFFER;i++) junokout[i] = 0xFF; setNuConvTestName(codepage, "FROM"); @@ -3061,7 +3114,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, con { log_err("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName); log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName); - printSeqErr(junkout, (int32_t)(targ-junkout)); + printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout)); printSeqErr(expect, expectLen); return FALSE; } @@ -3072,7 +3125,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, con if(memcmp(junokout,expectOffsets,(targ-junkout) * sizeof(int32_t) )){ log_err("did not get the expected offsets while %s \n", gNuConvTestName); log_err("Got Output : "); - printSeqErr(junkout, (int32_t)(targ-junkout)); + printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout)); log_err("Got Offsets: "); for(p=junkout;p<targ;p++) log_err("%d,", junokout[p-junkout]); @@ -3096,7 +3149,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, con log_err("source: "); printUSeqErr(source, sourceLen); log_err("Got: "); - printSeqErr(junkout, expectLen); + printSeqErr((const uint8_t *)junkout, expectLen); log_err("Expected: "); printSeqErr(expect, expectLen); return FALSE; @@ -3110,9 +3163,9 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con UConverter *conv = 0; UChar junkout[NEW_MAX_BUFFER]; /* FIX */ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */ - const uint8_t *src; - const uint8_t *realSourceEnd; - const uint8_t *srcLimit; + const char *src; + const char *realSourceEnd; + const char *srcLimit; UChar *targ; UChar *end; int32_t *offs; @@ -3147,7 +3200,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con log_verbose("Converter opened..\n"); - src = source; + src = (const char *)source; targ = junkout; offs = junokout; @@ -3255,7 +3308,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con log_err("0x%04x,", junkout[i]); log_err("\n"); log_err("From source: "); - for(i=0; i<(src-source); i++) + for(i=0; i<(src-(const char *)source); i++) log_err(" 0x%02x,", (unsigned char)source[i]); log_err("\n"); } @@ -3278,3 +3331,24 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con return FALSE; } } + +static void TestCallBackFailure(void) { + UErrorCode status = U_USELESS_COLLATOR_ERROR; + ucnv_cbFromUWriteBytes(NULL, NULL, -1, -1, &status); + if (status != U_USELESS_COLLATOR_ERROR) { + log_err("Error: ucnv_cbFromUWriteBytes did not react correctly to a bad UErrorCode\n"); + } + ucnv_cbFromUWriteUChars(NULL, NULL, NULL, -1, &status); + if (status != U_USELESS_COLLATOR_ERROR) { + log_err("Error: ucnv_cbFromUWriteUChars did not react correctly to a bad UErrorCode\n"); + } + ucnv_cbFromUWriteSub(NULL, -1, &status); + if (status != U_USELESS_COLLATOR_ERROR) { + log_err("Error: ucnv_cbFromUWriteSub did not react correctly to a bad UErrorCode\n"); + } + ucnv_cbToUWriteUChars(NULL, NULL, -1, -1, &status); + if (status != U_USELESS_COLLATOR_ERROR) { + log_err("Error: ucnv_cbToUWriteUChars did not react correctly to a bad UErrorCode\n"); + } +} + diff --git a/Build/source/libs/icu-xetex/test/cintltst/ncnvfbts.c b/Build/source/libs/icu-xetex/test/cintltst/ncnvfbts.c index c05aa97744d..1a0f2b77ace 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/ncnvfbts.c +++ b/Build/source/libs/icu-xetex/test/cintltst/ncnvfbts.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ***************************************************************************/ /******************************************************************************* @@ -23,6 +23,7 @@ #include "cmemory.h" #include "cstring.h" +#if !UCONFIG_NO_LEGACY_CONVERSION #define NEW_MAX_BUFFER 999 @@ -130,25 +131,25 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen, const u UErrorCode status = U_ZERO_ERROR; UConverter *conv = 0; - uint8_t junkout[NEW_MAX_BUFFER]; /* FIX */ + char junkout[NEW_MAX_BUFFER]; /* FIX */ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */ const UChar *src; - uint8_t *end; - uint8_t *targ; + char *end; + char *targ; int32_t *offs; int i; int32_t realBufferSize; - uint8_t *realBufferEnd; + char *realBufferEnd; const UChar *realSourceEnd; const UChar *sourceLimit; UBool checkOffsets = TRUE; UBool doFlush; UBool action=FALSE; - uint8_t *p; + char *p; for(i=0;i<NEW_MAX_BUFFER;i++) - junkout[i] = 0xF0; + junkout[i] = (char)0xF0; for(i=0;i<NEW_MAX_BUFFER;i++) junokout[i] = 0xFF; setNuConvTestName(codepage, "FROM"); @@ -293,9 +294,9 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U UConverter *conv = 0; UChar junkout[NEW_MAX_BUFFER]; /* FIX */ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */ - const uint8_t *src; - const uint8_t *realSourceEnd; - const uint8_t *srcLimit; + const char *src; + const char *realSourceEnd; + const char *srcLimit; UChar *targ; UChar *end; int32_t *offs; @@ -329,7 +330,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U log_verbose("Converter opened..\n"); - src = source; + src = (const char *)source; targ = junkout; offs = junokout; @@ -424,7 +425,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U for(i=0; i<(targ-junkout); i++) log_err("0x%04X,", junkout[i]); log_err(""); - for(i=0; i<(src-source); i++) + for(i=0; i<(src-(const char *)source); i++) log_err("0x%04X,", (unsigned char)source[i]); } } @@ -745,3 +746,10 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize ) } } +#else +void addTestConverterFallBack(TestNode** root) +{ + /* test nothing... */ + +} +#endif diff --git a/Build/source/libs/icu-xetex/test/cintltst/ncnvtst.c b/Build/source/libs/icu-xetex/test/cintltst/ncnvtst.c index 8df78de283f..1b26b145aef 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/ncnvtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/ncnvtst.c @@ -1,16 +1,16 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ -/******************************************************************************** +/******************************************************************************* * * File CCONVTST.C * * Modification History: * Name Description * Madhu Katragadda 7/7/2000 Converter Tests for extended code coverage -********************************************************************************* +******************************************************************************** */ #include <stdio.h> #include <stdlib.h> @@ -61,8 +61,12 @@ static void setNuConvTestName(const char *codepage, const char *direction) static void TestSurrogateBehaviour(void); static void TestErrorBehaviour(void); + +#if !UCONFIG_NO_LEGACY_CONVERSION static void TestToUnicodeErrorBehaviour(void); static void TestGetNextErrorBehaviour(void); +#endif + static void TestRegressionUTF8(void); static void TestRegressionUTF32(void); static void TestAvailableConverters(void); @@ -115,8 +119,12 @@ void addExtraTests(TestNode** root) { addTest(root, &TestSurrogateBehaviour, "tsconv/ncnvtst/TestSurrogateBehaviour"); addTest(root, &TestErrorBehaviour, "tsconv/ncnvtst/TestErrorBehaviour"); + +#if !UCONFIG_NO_LEGACY_CONVERSION addTest(root, &TestToUnicodeErrorBehaviour, "tsconv/ncnvtst/ToUnicodeErrorBehaviour"); addTest(root, &TestGetNextErrorBehaviour, "tsconv/ncnvtst/TestGetNextErrorBehaviour"); +#endif + addTest(root, &TestAvailableConverters, "tsconv/ncnvtst/TestAvailableConverters"); addTest(root, &TestFlushInternalBuffer, "tsconv/ncnvtst/TestFlushInternalBuffer"); addTest(root, &TestResetBehaviour, "tsconv/ncnvtst/TestResetBehaviour"); @@ -132,10 +140,13 @@ static void TestSurrogateBehaviour(){ { UChar sampleText[] = {0x0031, 0xd801, 0xdc01, 0x0032}; const uint8_t expected[] = {0x31, 0x1a, 0x32}; + +#if !UCONFIG_NO_LEGACY_CONVERSION /*SBCS*/ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expected, sizeof(expected), "ibm-920", 0 , TRUE, U_ZERO_ERROR)) log_err("u-> ibm-920 [UCNV_SBCS] not match.\n"); +#endif /*LATIN_1*/ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), @@ -143,6 +154,8 @@ static void TestSurrogateBehaviour(){ log_err("u-> LATIN_1 not match.\n"); } + +#if !UCONFIG_NO_LEGACY_CONVERSION log_verbose("Testing for DBCS and MBCS\n"); { UChar sampleText[] = {0x00a1, 0xd801, 0xdc01, 0x00a4}; @@ -164,6 +177,7 @@ static void TestSurrogateBehaviour(){ expected, sizeof(expected), "ibm-1363", offsets, TRUE, U_ZERO_ERROR)) log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n"); } + log_verbose("Testing for ISO-2022-jp\n"); { UChar sampleText[] = { 0x4e00, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032}; @@ -182,6 +196,7 @@ static void TestSurrogateBehaviour(){ expected, sizeof(expected), "iso-2022-jp", offsets , TRUE, U_ZERO_ERROR)) log_err("u-> not match.\n"); } + log_verbose("Testing for ISO-2022-cn\n"); { static const UChar sampleText[] = { 0x4e00, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032}; @@ -211,6 +226,7 @@ static void TestSurrogateBehaviour(){ expected, sizeof(expected), "iso-2022-cn", offsets , TRUE, U_ZERO_ERROR)) log_err("u-> not match.\n"); } + log_verbose("Testing for ISO-2022-kr\n"); { static const UChar sampleText[] = { 0x4e00,0xd801, 0xdc01, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032}; @@ -240,6 +256,7 @@ static void TestSurrogateBehaviour(){ expected, sizeof(expected), "iso-2022-kr", offsets , TRUE, U_ZERO_ERROR)) log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n"); } + log_verbose("Testing for HZ\n"); { static const UChar sampleText[] = { 0x4e00, 0xd801, 0xdc01, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032}; @@ -262,11 +279,13 @@ static void TestSurrogateBehaviour(){ /*hz*/ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expected, sizeof(expected), "HZ", 0 , TRUE, U_ZERO_ERROR)) - log_err("u-> not match.\n"); + log_err("u-> HZ not match.\n"); if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expected, sizeof(expected), "HZ", offsets , TRUE, U_ZERO_ERROR)) - log_err("u-> not match.\n"); + log_err("u-> HZ not match.\n"); } +#endif + /*UTF-8*/ log_verbose("Testing for UTF8\n"); { @@ -295,21 +314,18 @@ static void TestSurrogateBehaviour(){ if(!convertToU(expected, sizeof(expected), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", 0, TRUE, U_ZERO_ERROR )) - log_err("UTF8 -> did not match.\n"); + log_err("UTF8 -> u did not match.\n"); if(!convertToU(expected, sizeof(expected), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", 0, FALSE, U_ZERO_ERROR )) - log_err("UTF8 -> did not match.\n"); + log_err("UTF8 -> u did not match.\n"); if(!convertToU(expected, sizeof(expected), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", fromOffsets, TRUE, U_ZERO_ERROR )) - log_err("UTF8 -> did not match.\n"); + log_err("UTF8 ->u did not match.\n"); if(!convertToU(expected, sizeof(expected), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "UTF8", fromOffsets, FALSE, U_ZERO_ERROR )) - log_err("UTF8 -> did not match.\n"); + log_err("UTF8 -> u did not match.\n"); } - - - } /*test various error behaviours*/ @@ -322,6 +338,7 @@ static void TestErrorBehaviour(){ static const uint8_t expected[] = { 0x31, 0x1a}; static const uint8_t expected2[] = { 0x31, 0x1a, 0x32}; +#if !UCONFIG_NO_LEGACY_CONVERSION /*SBCS*/ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expected, sizeof(expected), "ibm-920", 0, TRUE, U_ZERO_ERROR)) @@ -332,7 +349,7 @@ static void TestErrorBehaviour(){ if(!convertFromU(sampleText2, sizeof(sampleText2)/sizeof(sampleText2[0]), expected2, sizeof(expected2), "ibm-920", 0, TRUE, U_ZERO_ERROR)) log_err("u-> ibm-920 [UCNV_SBCS] did not match\n"); - +#endif /*LATIN_1*/ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), @@ -347,7 +364,7 @@ static void TestErrorBehaviour(){ log_err("u-> LATIN_1 did not match\n"); } - +#if !UCONFIG_NO_LEGACY_CONVERSION log_verbose("Testing for DBCS and MBCS\n"); { static const UChar sampleText[] = { 0x00a1, 0xd801}; @@ -368,10 +385,6 @@ static void TestErrorBehaviour(){ static const uint8_t expected4MBCS[] = { 0x61, 0x8f, 0xa2, 0xc3, 0xf4, 0xfe}; static const int32_t offsets4MBCS[] = { 0x00, 0x01, 0x01, 0x01, 0x02, 0x02 }; - - - - /*DBCS*/ if(!convertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expectedSUB, sizeof(expectedSUB), "ibm-1363", 0, TRUE, U_ZERO_ERROR)) @@ -427,6 +440,7 @@ static void TestErrorBehaviour(){ expected4MBCS, sizeof(expected4MBCS), "euc-jp", offsets4MBCS, FALSE, U_ZERO_ERROR)) log_err("u-> euc-jp [UCNV_MBCS] \n"); } + /*iso-2022-jp*/ log_verbose("Testing for iso-2022-jp\n"); { @@ -466,6 +480,7 @@ static void TestErrorBehaviour(){ expected4MBCS, sizeof(expected4MBCS), "iso-2022-jp", offsets4MBCS, FALSE, U_ZERO_ERROR)) log_err("u-> iso-2022-jp [UCNV_MBCS] \n"); } + /*iso-2022-cn*/ log_verbose("Testing for iso-2022-cn\n"); { @@ -516,6 +531,7 @@ static void TestErrorBehaviour(){ expected4MBCS, sizeof(expected4MBCS), "iso-2022-cn", offsets4MBCS, FALSE, U_ZERO_ERROR)) log_err("u-> iso-2022-cn [UCNV_MBCS] \n"); } + /*iso-2022-kr*/ log_verbose("Testing for iso-2022-kr\n"); { @@ -607,10 +623,10 @@ static void TestErrorBehaviour(){ expected4MBCS, sizeof(expected4MBCS), "HZ", offsets4MBCS, FALSE, U_ZERO_ERROR)) log_err("u-> HZ [UCNV_MBCS] \n"); } - - +#endif } +#if !UCONFIG_NO_LEGACY_CONVERSION /*test different convertToUnicode error behaviours*/ static void TestToUnicodeErrorBehaviour() { @@ -662,6 +678,7 @@ static void TestGetNextErrorBehaviour(){ } ucnv_close(cnv); } +#endif #define MAX_UTF16_LEN 2 #define MAX_UTF8_LEN 4 @@ -697,8 +714,42 @@ static void TestRegressionUTF8(){ log_err("UTF8->Unicode did not match.\n"); } } + free(standardForm); free(utf8); + + { + static const char src8[] = { (char)0xCC, (char)0x81, (char)0xCC, (char)0x80 }; + static const UChar expected[] = { 0x0301, 0x0300 }; + UConverter *conv8; + UErrorCode err = U_ZERO_ERROR; + UChar pivotBuffer[100]; + const UChar* const pivEnd = pivotBuffer + 100; + const char* srcBeg; + const char* srcEnd; + UChar* pivBeg; + + conv8 = ucnv_open("UTF-8", &err); + + srcBeg = src8; + pivBeg = pivotBuffer; + srcEnd = src8 + 3; + ucnv_toUnicode(conv8, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err); + if (srcBeg != srcEnd) { + log_err("Did not consume whole buffer on first call.\n"); + } + + srcEnd = src8 + 4; + ucnv_toUnicode(conv8, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err); + if (srcBeg != srcEnd) { + log_err("Did not consume whole buffer on second call.\n"); + } + + if (U_FAILURE(err) || (int32_t)(pivBeg - pivotBuffer) != 2 || u_strncmp(pivotBuffer, expected, 2) != 0) { + log_err("Did not get expected results for UTF-8.\n"); + } + ucnv_close(conv8); + } } #define MAX_UTF32_LEN 1 @@ -735,6 +786,106 @@ static void TestRegressionUTF32(){ } free(standardForm); free(utf32); + + { + /* Check for lone surrogate error handling. */ + static const UChar sampleBadStartSurrogate[] = { 0x0031, 0xD800, 0x0032 }; + static const UChar sampleBadEndSurrogate[] = { 0x0031, 0xDC00, 0x0032 }; + static const uint8_t expectedUTF32BE[] = { + 0x00, 0x00, 0x00, 0x31, + 0x00, 0x00, 0xff, 0xfd, + 0x00, 0x00, 0x00, 0x32 + }; + static const uint8_t expectedUTF32LE[] = { + 0x31, 0x00, 0x00, 0x00, + 0xfd, 0xff, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x00 + }; + static const int32_t offsetsUTF32[] = { + 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, + 0x02, 0x02, 0x02, 0x02 + }; + + if(!convertFromU(sampleBadStartSurrogate, sizeof(sampleBadStartSurrogate)/sizeof(sampleBadStartSurrogate[0]), + expectedUTF32BE, sizeof(expectedUTF32BE), "UTF-32BE", offsetsUTF32, TRUE, U_ZERO_ERROR)) + log_err("u->UTF-32BE\n"); + if(!convertFromU(sampleBadEndSurrogate, sizeof(sampleBadEndSurrogate)/sizeof(sampleBadEndSurrogate[0]), + expectedUTF32BE, sizeof(expectedUTF32BE), "UTF-32BE", offsetsUTF32, TRUE, U_ZERO_ERROR)) + log_err("u->UTF-32BE\n"); + + if(!convertFromU(sampleBadStartSurrogate, sizeof(sampleBadStartSurrogate)/sizeof(sampleBadStartSurrogate[0]), + expectedUTF32LE, sizeof(expectedUTF32LE), "UTF-32LE", offsetsUTF32, TRUE, U_ZERO_ERROR)) + log_err("u->UTF-32LE\n"); + if(!convertFromU(sampleBadEndSurrogate, sizeof(sampleBadEndSurrogate)/sizeof(sampleBadEndSurrogate[0]), + expectedUTF32LE, sizeof(expectedUTF32LE), "UTF-32LE", offsetsUTF32, TRUE, U_ZERO_ERROR)) + log_err("u->UTF-32LE\n"); + } + + { + static const char srcBE[] = { 0, 0, 0, 0x31, 0, 0, 0, 0x30 }; + static const UChar expected[] = { 0x0031, 0x0030 }; + UConverter *convBE; + UErrorCode err = U_ZERO_ERROR; + UChar pivotBuffer[100]; + const UChar* const pivEnd = pivotBuffer + 100; + const char* srcBeg; + const char* srcEnd; + UChar* pivBeg; + + convBE = ucnv_open("UTF-32BE", &err); + + srcBeg = srcBE; + pivBeg = pivotBuffer; + srcEnd = srcBE + 5; + ucnv_toUnicode(convBE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err); + if (srcBeg != srcEnd) { + log_err("Did not consume whole buffer on first call.\n"); + } + + srcEnd = srcBE + 8; + ucnv_toUnicode(convBE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err); + if (srcBeg != srcEnd) { + log_err("Did not consume whole buffer on second call.\n"); + } + + if (U_FAILURE(err) || (int32_t)(pivBeg - pivotBuffer) != 2 || u_strncmp(pivotBuffer, expected, 2) != 0) { + log_err("Did not get expected results for UTF-32BE.\n"); + } + ucnv_close(convBE); + } + { + static const char srcLE[] = { 0x31, 0, 0, 0, 0x30, 0, 0, 0 }; + static const UChar expected[] = { 0x0031, 0x0030 }; + UConverter *convLE; + UErrorCode err = U_ZERO_ERROR; + UChar pivotBuffer[100]; + const UChar* const pivEnd = pivotBuffer + 100; + const char* srcBeg; + const char* srcEnd; + UChar* pivBeg; + + convLE = ucnv_open("UTF-32LE", &err); + + srcBeg = srcLE; + pivBeg = pivotBuffer; + srcEnd = srcLE + 5; + ucnv_toUnicode(convLE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err); + if (srcBeg != srcEnd) { + log_err("Did not consume whole buffer on first call.\n"); + } + + srcEnd = srcLE + 8; + ucnv_toUnicode(convLE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err); + if (srcBeg != srcEnd) { + log_err("Did not consume whole buffer on second call.\n"); + } + + if (U_FAILURE(err) || (int32_t)(pivBeg - pivotBuffer) != 2 || u_strncmp(pivotBuffer, expected, 2) != 0) { + log_err("Did not get expected results for UTF-32LE.\n"); + } + ucnv_close(convLE); + } } /*Walk through the available converters*/ @@ -784,6 +935,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){ log_err("u-> UTF8 did not match.\n"); } +#if !UCONFIG_NO_LEGACY_CONVERSION log_verbose("Testing fromUnicode with UCNV_FROM_U_CALLBACK_ESCAPE \n"); { UChar inputTest[] = { 0x0061, 0xd801, 0xdc01, 0xd801, 0x0061 }; @@ -799,6 +951,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){ (UConverterFromUCallback)UCNV_FROM_U_CALLBACK_ESCAPE, offset,FALSE)) log_err("u-> ibm-943 with subst with value did not match.\n"); } +#endif log_verbose("Testing fromUnicode for UTF-8 with UCNV_TO_U_CALLBACK_SUBSTITUTE \n"); { @@ -812,7 +965,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){ log_err("utf8->u with substitute did not match.\n");; } - +#if !UCONFIG_NO_LEGACY_CONVERSION log_verbose("Testing toUnicode with UCNV_TO_U_CALLBACK_ESCAPE \n"); /*to Unicode*/ { @@ -830,7 +983,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){ log_err("ibm-943->u with substitute with value did not match.\n"); } - +#endif } static UBool convertFromU( const UChar *source, int sourceLen, const uint8_t *expect, int expectLen, @@ -838,13 +991,13 @@ static UBool convertFromU( const UChar *source, int sourceLen, const uint8_t *e { int32_t i=0; - uint8_t *p=0; + char *p=0; const UChar *src; - uint8_t buffer[MAX_LENGTH]; + char buffer[MAX_LENGTH]; int32_t offsetBuffer[MAX_LENGTH]; int32_t *offs=0; - uint8_t *targ; - uint8_t *targetLimit; + char *targ; + char *targetLimit; UChar *sourceLimit=0; UErrorCode status = U_ZERO_ERROR; UConverter *conv = 0; @@ -857,7 +1010,7 @@ static UBool convertFromU( const UChar *source, int sourceLen, const uint8_t *e log_verbose("Converter %s opened..\n", ucnv_getName(conv, &status)); for(i=0; i<MAX_LENGTH; i++){ - buffer[i]=0xF0; + buffer[i]=(char)0xF0; offsetBuffer[i]=0xFF; } @@ -929,7 +1082,7 @@ static UBool convertToU( const uint8_t *source, int sourceLen, const UChar *expe UConverter *conv = 0; int32_t i=0; UChar *p=0; - const uint8_t* src; + const char* src; UChar buffer[MAX_LENGTH]; int32_t offsetBuffer[MAX_LENGTH]; int32_t *offs=0; @@ -954,7 +1107,7 @@ static UBool convertToU( const uint8_t *source, int sourceLen, const UChar *expe offsetBuffer[i]=-1; } - src=source; + src=(const char *)source; sourceLimit=(uint8_t*)(src+(sourceLen)); targ=buffer; targetLimit=targ+MAX_LENGTH; @@ -998,7 +1151,7 @@ static UBool convertToU( const uint8_t *source, int sourceLen, const UChar *expe for(i=0; i<(targ-buffer); i++) log_info("0x%04X,", buffer[i]); log_info("\nFrom Input:"); - for(i=0; i<(src-source); i++) + for(i=0; i<(src-(const char *)source); i++) log_info("0x%02X,", (unsigned char)source[i]); log_info("\n"); } @@ -1024,16 +1177,16 @@ static UBool testConvertFromU( const UChar *source, int sourceLen, const uint8_ { UErrorCode status = U_ZERO_ERROR; UConverter *conv = 0; - uint8_t junkout[MAX_LENGTH]; /* FIX */ + char junkout[MAX_LENGTH]; /* FIX */ int32_t junokout[MAX_LENGTH]; /* FIX */ - uint8_t *p; + char *p; const UChar *src; - uint8_t *end; - uint8_t *targ; + char *end; + char *targ; int32_t *offs; int i; int32_t realBufferSize; - uint8_t *realBufferEnd; + char *realBufferEnd; const UChar *realSourceEnd; const UChar *sourceLimit; UBool checkOffsets = TRUE; @@ -1043,7 +1196,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen, const uint8_ const void* oldContext = NULL; for(i=0;i<MAX_LENGTH;i++) - junkout[i] = 0xF0; + junkout[i] = (char)0xF0; for(i=0;i<MAX_LENGTH;i++) junokout[i] = 0xFF; @@ -1081,7 +1234,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen, const uint8_ checkOffsets = FALSE; do - { + { end = nct_min(targ + gOutBufferSize, realBufferEnd); sourceLimit = nct_min(src + gInBufferSize, realSourceEnd); @@ -1124,7 +1277,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen, const uint8_ { char junk[999]; char offset_str[999]; - uint8_t *ptr; + char *ptr; junk[0] = 0; offset_str[0] = 0; @@ -1198,9 +1351,9 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar * UConverter *conv = 0; UChar junkout[MAX_LENGTH]; /* FIX */ int32_t junokout[MAX_LENGTH]; /* FIX */ - const uint8_t *src; - const uint8_t *realSourceEnd; - const uint8_t *srcLimit; + const char *src; + const char *realSourceEnd; + const char *srcLimit; UChar *p; UChar *targ; UChar *end; @@ -1240,7 +1393,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar * } /*-------------------------------------*/ - src = source; + src = (const char *)source; targ = junkout; offs = junokout; @@ -1338,7 +1491,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar * for(i=0; i<(targ-junkout); i++) log_err("%X,", junkout[i]); log_err(""); - for(i=0; i<(src-source); i++) + for(i=0; i<(src-(const char *)source); i++) log_err("%X,", (unsigned char)source[i]); } } @@ -1362,6 +1515,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar * static void TestResetBehaviour(void){ +#if !UCONFIG_NO_LEGACY_CONVERSION log_verbose("Testing Reset for DBCS and MBCS\n"); { static const UChar sampleText[] = {0x00a1, 0xd801, 0xdc01, 0x00a4}; @@ -1399,6 +1553,7 @@ static void TestResetBehaviour(void){ log_err("ibm-1363 -> did not match.\n"); } + log_verbose("Testing Reset for ISO-2022-jp\n"); { static const UChar sampleText[] = { 0x4e00, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032}; @@ -1429,6 +1584,7 @@ static void TestResetBehaviour(void){ log_err("iso-2022-jp -> did not match.\n"); } + log_verbose("Testing Reset for ISO-2022-cn\n"); { static const UChar sampleText[] = { 0x4e00, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032}; @@ -1472,6 +1628,7 @@ static void TestResetBehaviour(void){ offsets1, TRUE)) log_err("iso-2022-cn -> did not match.\n"); } + log_verbose("Testing Reset for ISO-2022-kr\n"); { UChar sampleText[] = { 0x4e00,0xd801, 0xdc01, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032}; @@ -1519,6 +1676,7 @@ static void TestResetBehaviour(void){ offsets1, TRUE)) log_err("iso-2022-kr -> did not match.\n"); } + log_verbose("Testing Reset for HZ\n"); { static const UChar sampleText[] = { 0x4e00, 0xd801, 0xdc01, 0x04e01, 0x0031, 0xd801, 0xdc01, 0x0032}; @@ -1562,6 +1720,8 @@ static void TestResetBehaviour(void){ offsets1, TRUE)) log_err("hz -> did not match.\n"); } +#endif + /*UTF-8*/ log_verbose("Testing for UTF8\n"); { @@ -1692,13 +1852,17 @@ TestTruncated() { { "UTF-32", { 0, 0, 0x4e }, 3 }, { "UTF-32", { 0xff }, 1 }, { "UTF-32", { 0, 0, 0xfe, 0xff, 0 }, 5 }, - { "SCSU", { 0x0e, 0x4e }, 2 }, /* SQU 0x4e */ + +#if !UCONFIG_NO_LEGACY_CONVERSION { "BOCU-1", { 0xd5 }, 1 }, { "Shift-JIS", { 0xe0 }, 1 }, { "ibm-939", { 0x0e, 0x41 }, 2 } /* SO 0x41 */ +#else + { "BOCU-1", { 0xd5 }, 1 ,} +#endif }; int32_t i; @@ -1732,11 +1896,14 @@ TestUnicodeSet() { "SCSU", "BOCU-1", "CESU-8", +#if !UCONFIG_NO_LEGACY_CONVERSION "gb18030", +#endif "IMAP-mailbox-name" }; static const char *const lmbcsNames[]={ +#if !UCONFIG_NO_LEGACY_CONVERSION "LMBCS-1", "LMBCS-2", "LMBCS-3", @@ -1749,16 +1916,23 @@ TestUnicodeSet() { "LMBCS-17", "LMBCS-18", "LMBCS-19" +#endif }; static const NameRange nameRanges[]={ { "US-ASCII", 0, 0x7f, -1, -1, 0x80, 0x10ffff }, +#if !UCONFIG_NO_LEGACY_CONVERSION { "ibm-367", 0, 0x7f, -1, -1, 0x80, 0x10ffff }, +#endif { "ISO-8859-1", 0, 0x7f, -1, -1, 0x100, 0x10ffff }, +#if !UCONFIG_NO_LEGACY_CONVERSION { "UTF-8", 0, 0xd7ff, 0xe000, 0x10ffff, 0xd800, 0xdfff }, { "windows-1251", 0, 0x7f, 0x410, 0x44f, 0x3000, 0xd7ff }, { "HZ", 0x410, 0x44f, 0x4e00, 0x4eff, 0xac00, 0xd7ff }, { "shift-jis", 0x3041, 0x3093, 0x30a1, 0x30f3, 0x900, 0x1cff } +#else + { "UTF-8", 0, 0xd7ff, 0xe000, 0x10ffff, 0xd800, 0xdfff } +#endif }; /* open an empty set */ diff --git a/Build/source/libs/icu-xetex/test/cintltst/nfsprep.c b/Build/source/libs/icu-xetex/test/cintltst/nfsprep.c index fc7e2482daa..fc046820893 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/nfsprep.c +++ b/Build/source/libs/icu-xetex/test/cintltst/nfsprep.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2003, International Business Machines + * Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -132,46 +132,6 @@ CLEANUP: return u_terminateChars(dest, destCapacity, reqLength, status); } -static void -syntaxError( const UChar* rules, - int32_t pos, - int32_t rulesLen, - UParseError* parseError){ - int32_t start, stop; - if(parseError == NULL){ - return; - } - if(pos == rulesLen && rulesLen >0){ - pos--; - } - parseError->offset = pos; - parseError->line = 0 ; /* we are not using line numbers */ - - /* for pre-context */ - start = (pos <=U_PARSE_CONTEXT_LEN)? 0 : (pos - (U_PARSE_CONTEXT_LEN-1)); - stop = pos; - - u_memcpy(parseError->preContext,rules+start,stop-start); - /* null terminate the buffer */ - parseError->preContext[stop-start] = 0; - - /* for post-context */ - start = pos; - if(start<rulesLen) { - U16_FWD_1(rules, start, rulesLen); - } - - stop = ((pos+U_PARSE_CONTEXT_LEN)<= rulesLen )? (pos+(U_PARSE_CONTEXT_LEN)) : - rulesLen; - if(start < stop){ - u_memcpy(parseError->postContext,rules+start,stop-start); - /* null terminate the buffer */ - parseError->postContext[stop-start]= 0; - } - -} - - /* sorted array for binary search*/ static const char* special_prefixes[]={ "\x0041\x004e\x004f\x004e\x0059\x004d\x004f\x0055\x0053", diff --git a/Build/source/libs/icu-xetex/test/cintltst/nucnvtst.c b/Build/source/libs/icu-xetex/test/cintltst/nucnvtst.c index 101d66d4930..baecb4586d9 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/nucnvtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/nucnvtst.c @@ -1,16 +1,16 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ -/******************************************************************************** +/******************************************************************************* * * File CCONVTST.C * * Modification History: * Name Description * Steven R. Loomis 7/8/1999 Adding input buffer test -********************************************************************************* +******************************************************************************** */ #include <stdio.h> #include "cstring.h" @@ -44,12 +44,16 @@ static void TestUTF32(void); static void TestUTF32BE(void); static void TestUTF32LE(void); static void TestLATIN1(void); + +#if !UCONFIG_NO_LEGACY_CONVERSION static void TestSBCS(void); static void TestDBCS(void); static void TestMBCS(void); + #ifdef U_ENABLE_GENERIC_ISO_2022 static void TestISO_2022(void); #endif + static void TestISO_2022_JP(void); static void TestISO_2022_JP_1(void); static void TestISO_2022_JP_2(void); @@ -59,7 +63,11 @@ static void TestISO_2022_CN(void); static void TestISO_2022_CN_EXT(void); static void TestJIS(void); static void TestHZ(void); +#endif + static void TestSCSU(void); + +#if !UCONFIG_NO_LEGACY_CONVERSION static void TestEBCDIC_STATEFUL(void); static void TestGB18030(void); static void TestLMBCS(void); @@ -67,16 +75,19 @@ static void TestJitterbug255(void); static void TestEBCDICUS4XML(void); static void TestJitterbug915(void); static void TestISCII(void); + +static void TestCoverageMBCS(void); +static void TestJitterbug2346(void); +static void TestJitterbug2411(void); +#endif + +static void TestRoundTrippingAllUTF(void); static void TestConv(const uint16_t in[], int len, const char* conv, const char* lang, char byteArr[], int byteArrLen); -static void TestRoundTrippingAllUTF(void); -static void TestCoverageMBCS(void); -static void TestJitterbug2346(void); -static void TestJitterbug2411(void); void addTestNewConvert(TestNode** root); /* open a converter, using test data if it begins with '@' */ @@ -229,15 +240,22 @@ void addTestNewConvert(TestNode** root) addTest(root, &TestUTF32, "tsconv/nucnvtst/TestUTF32"); addTest(root, &TestUTF32BE, "tsconv/nucnvtst/TestUTF32BE"); addTest(root, &TestUTF32LE, "tsconv/nucnvtst/TestUTF32LE"); + +#if !UCONFIG_NO_LEGACY_CONVERSION addTest(root, &TestLMBCS, "tsconv/nucnvtst/TestLMBCS"); +#endif addTest(root, &TestLATIN1, "tsconv/nucnvtst/TestLATIN1"); + +#if !UCONFIG_NO_LEGACY_CONVERSION addTest(root, &TestSBCS, "tsconv/nucnvtst/TestSBCS"); addTest(root, &TestDBCS, "tsconv/nucnvtst/TestDBCS"); addTest(root, &TestMBCS, "tsconv/nucnvtst/TestMBCS"); + #ifdef U_ENABLE_GENERIC_ISO_2022 addTest(root, &TestISO_2022, "tsconv/nucnvtst/TestISO_2022"); #endif + addTest(root, &TestISO_2022_JP, "tsconv/nucnvtst/TestISO_2022_JP"); addTest(root, &TestJIS, "tsconv/nucnvtst/TestJIS"); addTest(root, &TestISO_2022_JP_1, "tsconv/nucnvtst/TestISO_2022_JP_1"); @@ -248,20 +266,35 @@ void addTestNewConvert(TestNode** root) addTest(root, &TestISO_2022_CN_EXT, "tsconv/nucnvtst/TestISO_2022_CN_EXT"); addTest(root, &TestJitterbug915, "tsconv/nucnvtst/TestJitterbug915"); addTest(root, &TestHZ, "tsconv/nucnvtst/TestHZ"); +#endif + addTest(root, &TestSCSU, "tsconv/nucnvtst/TestSCSU"); + +#if !UCONFIG_NO_LEGACY_CONVERSION addTest(root, &TestEBCDIC_STATEFUL, "tsconv/nucnvtst/TestEBCDIC_STATEFUL"); addTest(root, &TestGB18030, "tsconv/nucnvtst/TestGB18030"); addTest(root, &TestJitterbug255, "tsconv/nucnvtst/TestJitterbug255"); addTest(root, &TestEBCDICUS4XML, "tsconv/nucnvtst/TestEBCDICUS4XML"); addTest(root, &TestISCII, "tsconv/nucnvtst/TestISCII"); + #if !UCONFIG_NO_COLLATION addTest(root, &TestJitterbug981, "tsconv/nucnvtst/TestJitterbug981"); #endif + addTest(root, &TestJitterbug1293, "tsconv/nucnvtst/TestJitterbug1293"); +#endif + + +#if !UCONFIG_NO_LEGACY_CONVERSION addTest(root, &TestCoverageMBCS, "tsconv/nucnvtst/TestCoverageMBCS"); +#endif + addTest(root, &TestRoundTrippingAllUTF, "tsconv/nucnvtst/TestRoundTrippingAllUTF"); + +#if !UCONFIG_NO_LEGACY_CONVERSION addTest(root, &TestJitterbug2346, "tsconv/nucnvtst/TestJitterbug2346"); addTest(root, &TestJitterbug2411, "tsconv/nucnvtst/TestJitterbug2411"); +#endif } @@ -294,23 +327,23 @@ static ETestConvertResult testConvertFromU( const UChar *source, int sourceLen, { UErrorCode status = U_ZERO_ERROR; UConverter *conv = 0; - uint8_t junkout[NEW_MAX_BUFFER]; /* FIX */ + char junkout[NEW_MAX_BUFFER]; /* FIX */ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */ - uint8_t *p; + char *p; const UChar *src; - uint8_t *end; - uint8_t *targ; + char *end; + char *targ; int32_t *offs; int i; int32_t realBufferSize; - uint8_t *realBufferEnd; + char *realBufferEnd; const UChar *realSourceEnd; const UChar *sourceLimit; UBool checkOffsets = TRUE; UBool doFlush; for(i=0;i<NEW_MAX_BUFFER;i++) - junkout[i] = 0xF0; + junkout[i] = (char)0xF0; for(i=0;i<NEW_MAX_BUFFER;i++) junokout[i] = 0xFF; @@ -359,8 +392,8 @@ static ETestConvertResult testConvertFromU( const UChar *source, int sourceLen, status = U_ZERO_ERROR; ucnv_fromUnicode (conv, - (char **)&targ, - (const char*)end, + &targ, + end, &src, sourceLimit, checkOffsets ? offs : NULL, @@ -380,7 +413,7 @@ static ETestConvertResult testConvertFromU( const UChar *source, int sourceLen, { char junk[9999]; char offset_str[9999]; - uint8_t *ptr; + char *ptr; junk[0] = 0; offset_str[0] = 0; @@ -453,9 +486,9 @@ static ETestConvertResult testConvertToU( const uint8_t *source, int sourcelen, UConverter *conv = 0; UChar junkout[NEW_MAX_BUFFER]; /* FIX */ int32_t junokout[NEW_MAX_BUFFER]; /* FIX */ - const uint8_t *src; - const uint8_t *realSourceEnd; - const uint8_t *srcLimit; + const char *src; + const char *realSourceEnd; + const char *srcLimit; UChar *p; UChar *targ; UChar *end; @@ -489,7 +522,7 @@ static ETestConvertResult testConvertToU( const uint8_t *source, int sourcelen, } log_verbose("Converter opened..\n"); - src = source; + src = (const char *)source; targ = junkout; offs = junokout; @@ -519,8 +552,8 @@ static ETestConvertResult testConvertToU( const uint8_t *source, int sourcelen, ucnv_toUnicode (conv, &targ, end, - (const char **)&src, - (const char *)srcLimit, + &src, + srcLimit, checkOffsets ? offs : NULL, (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */ &status); @@ -585,7 +618,7 @@ static ETestConvertResult testConvertToU( const uint8_t *source, int sourcelen, } log_err("\n"); log_err("input: "); - for(i=0; i<(src-source); i++) { + for(i=0; i<(src-(const char *)source); i++) { log_err("%X,", (unsigned char)source[i]); } log_err("\n"); @@ -775,11 +808,13 @@ static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize ) } -#ifdef U_ENABLE_GENERIC_ISO_2022 + +#if !UCONFIG_NO_LEGACY_CONVERSION && defined(U_ENABLE_GENERIC_ISO_2022) /*ISO-2022*/ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expectedISO2022, sizeof(expectedISO2022), "ISO_2022", toISO2022Offs,FALSE ); #endif + /*UTF16 LE*/ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expectedUTF16LE, sizeof(expectedUTF16LE), "utf-16le", toUTF16LEOffs,FALSE ); @@ -792,9 +827,12 @@ static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize ) /*UTF32 BE*/ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expectedUTF32BE, sizeof(expectedUTF32BE), "utf-32be", toUTF32BEOffs,FALSE ); + /*LATIN_1*/ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expectedLATIN1, sizeof(expectedLATIN1), "LATIN_1", toLATIN1Offs,FALSE ); + +#if !UCONFIG_NO_LEGACY_CONVERSION /*EBCDIC_STATEFUL*/ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expectedIBM930, sizeof(expectedIBM930), "ibm-930", toIBM930Offs,FALSE ); @@ -815,6 +853,7 @@ static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize ) /*SBCS*/ testConvertFromU(sampleText, sizeof(sampleText)/sizeof(sampleText[0]), expectedISO88593, sizeof(expectedISO88593), "iso-8859-3", toISO88593Offs,FALSE ); +#endif /****/ @@ -822,11 +861,12 @@ static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize ) /*UTF-8*/ testConvertToU(expectedUTF8, sizeof(expectedUTF8), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf8", fmUTF8Offs,FALSE); -#ifdef U_ENABLE_GENERIC_ISO_2022 +#if !UCONFIG_NO_LEGACY_CONVERSION && defined(U_ENABLE_GENERIC_ISO_2022) /*ISO-2022*/ testConvertToU(expectedISO2022, sizeof(expectedISO2022), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "ISO_2022", fmISO2022Offs,FALSE); #endif + /*UTF16 LE*/ testConvertToU(expectedUTF16LE, sizeof(expectedUTF16LE), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf-16le", fmUTF16LEOffs,FALSE); @@ -839,17 +879,21 @@ static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize ) /*UTF32 BE*/ testConvertToU(expectedUTF32BE, sizeof(expectedUTF32BE), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf-32be", fmUTF32BEOffs,FALSE); + +#if !UCONFIG_NO_LEGACY_CONVERSION /*EBCDIC_STATEFUL*/ testConvertToU(expectedIBM930, sizeof(expectedIBM930), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "ibm-930", fmIBM930Offs,FALSE); /*MBCS*/ testConvertToU(expectedIBM943, sizeof(expectedIBM943), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "ibm-943", fmIBM943Offs,FALSE); +#endif /* Try it again to make sure it still works */ testConvertToU(expectedUTF16LE, sizeof(expectedUTF16LE), sampleText, sizeof(sampleText)/sizeof(sampleText[0]), "utf-16le", fmUTF16LEOffs,FALSE); +#if !UCONFIG_NO_LEGACY_CONVERSION testConvertToU(expectedMaltese913, sizeof(expectedMaltese913), malteseUChars, sizeof(malteseUChars)/sizeof(malteseUChars[0]), "latin3", NULL,FALSE); @@ -861,6 +905,7 @@ static void TestNewConvertWithBufferSizes(int32_t outsize, int32_t insize ) expectedLMBCS, sizeof(expectedLMBCS), "LMBCS-1", toLMBCSOffs,FALSE ); testConvertToU(expectedLMBCS, sizeof(expectedLMBCS), LMBCSUChars, sizeof(LMBCSUChars)/sizeof(LMBCSUChars[0]), "LMBCS-1", fmLMBCSOffs,FALSE); +#endif /* UTF-7 examples are mostly from http://www.imc.org/rfc2152 */ { @@ -1274,6 +1319,7 @@ static void TestConverterType(const char *convName, UConverterType convType) { static void TestConverterTypesAndStarters() { +#if !UCONFIG_NO_LEGACY_CONVERSION UConverter* myConverter; UErrorCode err = U_ZERO_ERROR; UBool mystarters[256]; @@ -1334,19 +1380,33 @@ static void TestConverterTypesAndStarters() TestConverterType("ibm-930", UCNV_EBCDIC_STATEFUL); TestConverterType("ibm-878", UCNV_SBCS); +#endif + TestConverterType("iso-8859-1", UCNV_LATIN_1); + TestConverterType("ibm-1208", UCNV_UTF8); + TestConverterType("utf-8", UCNV_UTF8); TestConverterType("UTF-16BE", UCNV_UTF16_BigEndian); TestConverterType("UTF-16LE", UCNV_UTF16_LittleEndian); TestConverterType("UTF-32BE", UCNV_UTF32_BigEndian); TestConverterType("UTF-32LE", UCNV_UTF32_LittleEndian); -#ifdef U_ENABLE_GENERIC_ISO_2022 + +#if !UCONFIG_NO_LEGACY_CONVERSION + +#if defined(U_ENABLE_GENERIC_ISO_2022) TestConverterType("iso-2022", UCNV_ISO_2022); #endif + TestConverterType("hz", UCNV_HZ); +#endif + TestConverterType("scsu", UCNV_SCSU); + +#if !UCONFIG_NO_LEGACY_CONVERSION TestConverterType("x-iscii-de", UCNV_ISCII); +#endif + TestConverterType("ascii", UCNV_US_ASCII); TestConverterType("utf-7", UCNV_UTF7); TestConverterType("IMAP-mailbox-name", UCNV_IMAP_MAILBOX); @@ -1428,6 +1488,7 @@ static void TestAmbiguous() } } +#if !UCONFIG_NO_LEGACY_CONVERSION sjis_cnv = ucnv_open("ibm-943", &status); if (U_FAILURE(status)) { @@ -1480,6 +1541,7 @@ static void TestAmbiguous() } ucnv_close(sjis_cnv); ucnv_close(ascii_cnv); +#endif } static void @@ -2947,8 +3009,8 @@ TestHZ() { uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5); cBuf =(char*)malloc(uBufSize * sizeof(char) * 5); - uSource = (const UChar*)&in[0]; - uSourceLimit=(const UChar*)&in[sizeof(in)/2]; + uSource = (const UChar*)in; + uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0])); cTarget = cBuf; cTargetLimit = cBuf +uBufSize*5; uTarget = uBuf; @@ -2967,7 +3029,7 @@ TestHZ() { log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode)); return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ @@ -2977,9 +3039,9 @@ TestHZ() { test++; } TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding"); - TestSmallTargetBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestToAndFromUChars(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); TestJitterbug930("csISO2022JP"); ucnv_close(cnv); free(offsets); @@ -3166,8 +3228,8 @@ TestISO_2022_JP() { uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5); cBuf =(char*)malloc(uBufSize * sizeof(char) * 5); - uSource = (const UChar*)&in[0]; - uSourceLimit=(const UChar*)&in[sizeof(in)/2]; + uSource = (const UChar*)in; + uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0])); cTarget = cBuf; cTargetLimit = cBuf +uBufSize*5; uTarget = uBuf; @@ -3187,7 +3249,7 @@ TestISO_2022_JP() { return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ @@ -3197,10 +3259,10 @@ TestISO_2022_JP() { test++; } - TestSmallTargetBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding"); - TestToAndFromUChars(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); TestJitterbug930("csISO2022JP"); ucnv_close(cnv); free(uBuf); @@ -3232,7 +3294,7 @@ static void TestConv(const uint16_t in[],int len, const char* conv, const char* uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)); cBuf =(char*)malloc(uBufSize * sizeof(char)); - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; uSourceLimit=uSource+len; cTarget = cBuf; cTargetLimit = cBuf +uBufSize; @@ -3254,7 +3316,7 @@ static void TestConv(const uint16_t in[],int len, const char* conv, const char* return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ log_err("for codepage %s : Expected : \\u%04X \t Got: \\u%04X\n",conv,*uSource,(int)*test) ; @@ -3262,12 +3324,12 @@ static void TestConv(const uint16_t in[],int len, const char* conv, const char* uSource++; test++; } - TestSmallTargetBuffer(&in[0],(const UChar*)&in[len],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[len],cnv); + TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv); + TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv); TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv); if(byteArr && byteArrLen!=0){ TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang); - TestToAndFromUChars(&in[0],(const UChar*)&in[len],cnv); + TestToAndFromUChars(in,(const UChar*)&in[len],cnv); { cSource = byteArr; cSourceLimit = cSource+byteArrLen; @@ -3279,7 +3341,7 @@ static void TestConv(const uint16_t in[],int len, const char* conv, const char* return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ; @@ -3607,6 +3669,8 @@ TestSCSU() { TestConv(russianUTF16,(sizeof(russianUTF16)/2), "SCSU","russian",(char *)russianSCSU,sizeof(russianSCSU)); TestConv(monkeyIn,(sizeof(monkeyIn)/2),"SCSU","monkey",NULL,0); } + +#if !UCONFIG_NO_LEGACY_CONVERSION static void TestJitterbug2346(){ char source[] = { 0x1b,0x24,0x42,0x3d,0x45,0x1b,0x28,0x4a,0x0d,0x0a, 0x1b,0x24,0x42,0x3d,0x45,0x1b,0x28,0x4a,0x0d,0x0a}; @@ -3654,6 +3718,7 @@ static void TestJitterbug2346(){ } + static void TestISO_2022_JP_1() { /* test input */ @@ -3694,8 +3759,8 @@ TestISO_2022_JP_1() { uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5); cBuf =(char*)malloc(uBufSize * sizeof(char) * 5); - uSource = (const UChar*)&in[0]; - uSourceLimit=(const UChar*)&in[sizeof(in)/2]; + uSource = (const UChar*)in; + uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0])); cTarget = cBuf; cTargetLimit = cBuf +uBufSize*5; uTarget = uBuf; @@ -3713,7 +3778,7 @@ TestISO_2022_JP_1() { log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode)); return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ @@ -3730,8 +3795,8 @@ TestISO_2022_JP_1() { static const uint8_t source2[]={0x0e,0x24,0x053}; TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [ISO-2022-JP-1]"); } - TestSmallTargetBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); ucnv_close(cnv); free(uBuf); free(cBuf); @@ -3784,8 +3849,8 @@ TestISO_2022_JP_2() { uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5); cBuf =(char*)malloc(uBufSize * sizeof(char) * 5); - uSource = (const UChar*)&in[0]; - uSourceLimit=(const UChar*)&in[sizeof(in)/2]; + uSource = (const UChar*)in; + uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0])); cTarget = cBuf; cTargetLimit = cBuf +uBufSize*5; uTarget = uBuf; @@ -3804,7 +3869,7 @@ TestISO_2022_JP_2() { log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode)); return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ @@ -3813,9 +3878,9 @@ TestISO_2022_JP_2() { uSource++; test++; } - TestSmallTargetBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestToAndFromUChars(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); /*Test for the condition where there is an invalid character*/ ucnv_reset(cnv); { @@ -3861,8 +3926,8 @@ TestISO_2022_KR() { uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5); cBuf =(char*)malloc(uBufSize * sizeof(char) * 5); - uSource = (const UChar*)&in[0]; - uSourceLimit=(const UChar*)&in[sizeof(in)/2]; + uSource = (const UChar*)in; + uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0])); cTarget = cBuf; cTargetLimit = cBuf +uBufSize*5; uTarget = uBuf; @@ -3881,7 +3946,7 @@ TestISO_2022_KR() { log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode)); return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,*test) ; @@ -3890,9 +3955,9 @@ TestISO_2022_KR() { test++; } TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); - TestSmallTargetBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestToAndFromUChars(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); TestJitterbug930("csISO2022KR"); /*Test for the condition where there is an invalid character*/ ucnv_reset(cnv); @@ -3940,8 +4005,8 @@ TestISO_2022_KR_1() { uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5); cBuf =(char*)malloc(uBufSize * sizeof(char) * 5); - uSource = (const UChar*)&in[0]; - uSourceLimit=(const UChar*)&in[sizeof(in)/2]; + uSource = (const UChar*)in; + uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0])); cTarget = cBuf; cTargetLimit = cBuf +uBufSize*5; uTarget = uBuf; @@ -3960,7 +4025,7 @@ TestISO_2022_KR_1() { log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode)); return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,*test) ; @@ -3970,10 +4035,10 @@ TestISO_2022_KR_1() { } ucnv_reset(cnv); TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); - TestSmallTargetBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); ucnv_reset(cnv); - TestToAndFromUChars(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); /*Test for the condition where there is an invalid character*/ ucnv_reset(cnv); { @@ -4242,8 +4307,8 @@ TestISO_2022_CN_EXT() { uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5); cBuf =(char*)malloc(uBufSize * sizeof(char) * 10); - uSource = (const UChar*)&in[0]; - uSourceLimit=(const UChar*)&in[sizeof(in)/2]; + uSource = (const UChar*)in; + uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0])); cTarget = cBuf; cTargetLimit = cBuf +uBufSize*5; uTarget = uBuf; @@ -4262,7 +4327,7 @@ TestISO_2022_CN_EXT() { log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode)); return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ; @@ -4273,8 +4338,8 @@ TestISO_2022_CN_EXT() { uSource++; test++; } - TestSmallTargetBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); /*Test for the condition where there is an invalid character*/ ucnv_reset(cnv); { @@ -4340,8 +4405,8 @@ TestISO_2022_CN() { uBuf = (UChar*)malloc(uBufSize * sizeof(UChar)*5); cBuf =(char*)malloc(uBufSize * sizeof(char) * 10); - uSource = (const UChar*)&in[0]; - uSourceLimit=(const UChar*)&in[sizeof(in)/2]; + uSource = (const UChar*)in; + uSourceLimit=(const UChar*)in + (sizeof(in)/sizeof(in[0])); cTarget = cBuf; cTargetLimit = cBuf +uBufSize*5; uTarget = uBuf; @@ -4360,7 +4425,7 @@ TestISO_2022_CN() { log_err("ucnv_toUnicode conversion failed reason %s\n", u_errorName(errorCode)); return; } - uSource = (const UChar*)&in[0]; + uSource = (const UChar*)in; while(uSource<uSourceLimit){ if(*test!=*uSource){ log_err("Expected : \\u%04X \t Got: \\u%04X\n",*uSource,(int)*test) ; @@ -4372,9 +4437,9 @@ TestISO_2022_CN() { test++; } TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding"); - TestSmallTargetBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestSmallSourceBuffer(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); - TestToAndFromUChars(&in[0],(const UChar*)&in[sizeof(in)/2],cnv); + TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); + TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); TestJitterbug930("csISO2022CN"); /*Test for the condition where there is an invalid character*/ ucnv_reset(cnv); @@ -4669,8 +4734,8 @@ TestLMBCS() { { UErrorCode errorCode=U_ZERO_ERROR; - const uint8_t * pSource = pszLMBCS; - const uint8_t * sourceLimit = pszLMBCS + sizeof(pszLMBCS); + const char * pSource = (const char *)pszLMBCS; + const char * sourceLimit = (const char *)pszLMBCS + sizeof(pszLMBCS); UChar Out [sizeof(pszUnicode) + 1]; UChar * pOut = Out; @@ -4696,8 +4761,8 @@ TestLMBCS() { ucnv_toUnicode (cnv, &pOut, OutLimit, - (const char **)&pSource, - (const char *)sourceLimit, + &pSource, + sourceLimit, off, TRUE, &errorCode); @@ -4759,12 +4824,12 @@ TestLMBCS() { const UChar * pUniOut = uniString; UChar * pUniIn = uniString; uint8_t lmbcsString [4]; - const uint8_t * pLMBCSOut = lmbcsString; - uint8_t * pLMBCSIn = lmbcsString; + const char * pLMBCSOut = (const char *)lmbcsString; + char * pLMBCSIn = (char *)lmbcsString; /* 0192 (hook) converts to both group 3 & group 1. input locale should differentiate */ ucnv_fromUnicode (cnv16he, - (char **)&pLMBCSIn, (const char *)(pLMBCSIn + sizeof(lmbcsString)/sizeof(lmbcsString[0])), + &pLMBCSIn, (pLMBCSIn + sizeof(lmbcsString)/sizeof(lmbcsString[0])), &pUniOut, pUniOut + sizeof(uniString)/sizeof(uniString[0]), NULL, 1, &errorCode); @@ -4773,10 +4838,10 @@ TestLMBCS() { log_err("LMBCS-16,locale=he gives unexpected translation\n"); } - pLMBCSIn=lmbcsString; + pLMBCSIn= (char *)lmbcsString; pUniOut = uniString; ucnv_fromUnicode (cnv01us, - (char **)&pLMBCSIn, (const char *)(lmbcsString + sizeof(lmbcsString)/sizeof(lmbcsString[0])), + &pLMBCSIn, (const char *)(lmbcsString + sizeof(lmbcsString)/sizeof(lmbcsString[0])), &pUniOut, pUniOut + sizeof(uniString)/sizeof(uniString[0]), NULL, 1, &errorCode); @@ -4787,45 +4852,45 @@ TestLMBCS() { /* single byte char from mbcs char set */ lmbcsString[0] = 0xAE; /* 1/2 width katakana letter small Yo */ - pLMBCSOut = lmbcsString; + pLMBCSOut = (const char *)lmbcsString; pUniIn = uniString; ucnv_toUnicode (cnv16jp, &pUniIn, pUniIn + 1, - (const char **)&pLMBCSOut, (const char *)(pLMBCSOut + 1), + &pLMBCSOut, (pLMBCSOut + 1), NULL, 1, &errorCode); - if (U_FAILURE(errorCode) || pLMBCSOut != lmbcsString+1 || pUniIn != uniString+1 || uniString[0] != 0xFF6E) + if (U_FAILURE(errorCode) || pLMBCSOut != (const char *)lmbcsString+1 || pUniIn != uniString+1 || uniString[0] != 0xFF6E) { log_err("Unexpected results from LMBCS-16 single byte char\n"); } /* convert to group 1: should be 3 bytes */ - pLMBCSIn = lmbcsString; + pLMBCSIn = (char *)lmbcsString; pUniOut = uniString; ucnv_fromUnicode (cnv01us, - (char **)&pLMBCSIn, (const char *)(pLMBCSIn + 3), + &pLMBCSIn, (const char *)(pLMBCSIn + 3), &pUniOut, pUniOut + 1, NULL, 1, &errorCode); - if (U_FAILURE(errorCode) || pLMBCSIn != lmbcsString+3 || pUniOut != uniString+1 + if (U_FAILURE(errorCode) || pLMBCSIn != (const char *)lmbcsString+3 || pUniOut != uniString+1 || lmbcsString[0] != 0x10 || lmbcsString[1] != 0x10 || lmbcsString[2] != 0xAE) { log_err("Unexpected results to LMBCS-1 single byte mbcs char\n"); } - pLMBCSOut = lmbcsString; + pLMBCSOut = (const char *)lmbcsString; pUniIn = uniString; ucnv_toUnicode (cnv01us, &pUniIn, pUniIn + 1, - (const char **)&pLMBCSOut, (const char *)(pLMBCSOut + 3), + &pLMBCSOut, (const char *)(pLMBCSOut + 3), NULL, 1, &errorCode); - if (U_FAILURE(errorCode) || pLMBCSOut != lmbcsString+3 || pUniIn != uniString+1 || uniString[0] != 0xFF6E) + if (U_FAILURE(errorCode) || pLMBCSOut != (const char *)lmbcsString+3 || pUniIn != uniString+1 || uniString[0] != 0xFF6E) { log_err("Unexpected results from LMBCS-1 single byte mbcs char\n"); } - pLMBCSIn = lmbcsString; + pLMBCSIn = (char *)lmbcsString; pUniOut = uniString; ucnv_fromUnicode (cnv16jp, - (char **)&pLMBCSIn, (const char *)(pLMBCSIn + 1), + &pLMBCSIn, (const char *)(pLMBCSIn + 1), &pUniOut, pUniOut + 1, NULL, 1, &errorCode); - if (U_FAILURE(errorCode) || pLMBCSIn != lmbcsString+1 || pUniOut != uniString+1 || lmbcsString[0] != 0xAE) + if (U_FAILURE(errorCode) || pLMBCSIn != (const char *)lmbcsString+1 || pUniOut != uniString+1 || lmbcsString[0] != 0xAE) { log_err("Unexpected results to LMBCS-16 single byte mbcs char\n"); } @@ -4838,8 +4903,8 @@ TestLMBCS() { UErrorCode errorCode=U_ZERO_ERROR; - const uint8_t * pSource = pszLMBCS; - const uint8_t * sourceLimit = pszLMBCS + sizeof(pszLMBCS); + const char * pSource = (const char *)pszLMBCS; + const char * sourceLimit = (const char *)pszLMBCS + sizeof(pszLMBCS); int codepointCount = 0; UChar Out [sizeof(pszUnicode) + 1]; @@ -4859,15 +4924,15 @@ TestLMBCS() { ucnv_toUnicode (cnv, &pOut, OutLimit, - (const char **)&pSource, - (const char *)(pSource+1), /* claim that this is a 1- byte buffer */ + &pSource, + (pSource+1), /* claim that this is a 1- byte buffer */ NULL, FALSE, /* FALSE means there might be more chars in the next buffer */ &errorCode); if (U_SUCCESS (errorCode)) { - if ((pSource - (const uint8_t *)pszLMBCS) == offsets [codepointCount+1]) + if ((pSource - (const char *)pszLMBCS) == offsets [codepointCount+1]) { /* we are on to the next code point: check value */ @@ -4887,8 +4952,8 @@ TestLMBCS() { } { /* limits & surrogate error testing */ - uint8_t LIn [sizeof(pszLMBCS)]; - const uint8_t * pLIn = LIn; + char LIn [sizeof(pszLMBCS)]; + const char * pLIn = LIn; char LOut [sizeof(pszLMBCS)]; char * pLOut = LOut; @@ -4958,9 +5023,9 @@ TestLMBCS() { errorCode = U_ZERO_ERROR; - pLIn = pszLMBCS; - ucnv_toUnicode(cnv, &pUOut,pUOut+4,(const char **)&pLIn,(const char *)(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode); - if (errorCode != U_BUFFER_OVERFLOW_ERROR || pUOut != UOut + 4 || pLIn != (const uint8_t *)pszLMBCS+offsets[4]) + pLIn = (const char *)pszLMBCS; + ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode); + if (errorCode != U_BUFFER_OVERFLOW_ERROR || pUOut != UOut + 4 || pLIn != (const char *)pszLMBCS+offsets[4]) { log_err("Unexpected results on out of target room to ucnv_toUnicode\n"); } @@ -4968,11 +5033,11 @@ TestLMBCS() { /* unpaired or chopped LMBCS surrogates */ /* OK high surrogate, Low surrogate is chopped */ - LIn [0] = 0x14; - LIn [1] = 0xD8; - LIn [2] = 0x01; - LIn [3] = 0x14; - LIn [4] = 0xDC; + LIn [0] = (char)0x14; + LIn [1] = (char)0xD8; + LIn [2] = (char)0x01; + LIn [3] = (char)0x14; + LIn [4] = (char)0xDC; pLIn = LIn; errorCode = U_ZERO_ERROR; pUOut = UOut; @@ -4985,9 +5050,9 @@ TestLMBCS() { } /* chopped at surrogate boundary */ - LIn [0] = 0x14; - LIn [1] = 0xD8; - LIn [2] = 0x01; + LIn [0] = (char)0x14; + LIn [1] = (char)0xD8; + LIn [2] = (char)0x01; pLIn = LIn; errorCode = U_ZERO_ERROR; pUOut = UOut; @@ -4999,12 +5064,12 @@ TestLMBCS() { } /* unpaired surrogate plus valid Unichar */ - LIn [0] = 0x14; - LIn [1] = 0xD8; - LIn [2] = 0x01; - LIn [3] = 0x14; - LIn [4] = 0xC9; - LIn [5] = 0xD0; + LIn [0] = (char)0x14; + LIn [1] = (char)0xD8; + LIn [2] = (char)0x01; + LIn [3] = (char)0x14; + LIn [4] = (char)0xC9; + LIn [5] = (char)0xD0; pLIn = LIn; errorCode = U_ZERO_ERROR; pUOut = UOut; @@ -5016,11 +5081,11 @@ TestLMBCS() { } /* unpaired surrogate plus chopped Unichar */ - LIn [0] = 0x14; - LIn [1] = 0xD8; - LIn [2] = 0x01; - LIn [3] = 0x14; - LIn [4] = 0xC9; + LIn [0] = (char)0x14; + LIn [1] = (char)0xD8; + LIn [2] = (char)0x01; + LIn [3] = (char)0x14; + LIn [4] = (char)0xC9; pLIn = LIn; errorCode = U_ZERO_ERROR; @@ -5033,11 +5098,11 @@ TestLMBCS() { } /* unpaired surrogate plus valid non-Unichar */ - LIn [0] = 0x14; - LIn [1] = 0xD8; - LIn [2] = 0x01; - LIn [3] = 0x0F; - LIn [4] = 0x3B; + LIn [0] = (char)0x14; + LIn [1] = (char)0xD8; + LIn [2] = (char)0x01; + LIn [3] = (char)0x0F; + LIn [4] = (char)0x3B; pLIn = LIn; errorCode = U_ZERO_ERROR; @@ -5050,10 +5115,10 @@ TestLMBCS() { } /* unpaired surrogate plus chopped non-Unichar */ - LIn [0] = 0x14; - LIn [1] = 0xD8; - LIn [2] = 0x01; - LIn [3] = 0x0F; + LIn [0] = (char)0x14; + LIn [1] = (char)0xD8; + LIn [2] = (char)0x01; + LIn [3] = (char)0x0F; pLIn = LIn; errorCode = U_ZERO_ERROR; @@ -5074,8 +5139,8 @@ TestLMBCS() { static void TestJitterbug255() { static const uint8_t testBytes[] = { 0x95, 0xcf, 0x8a, 0xb7, 0x0d, 0x0a, 0x00 }; - const uint8_t *testBuffer = testBytes; - const uint8_t *testEnd = testBytes + sizeof(testBytes); + const char *testBuffer = (const char *)testBytes; + const char *testEnd = (const char *)testBytes + sizeof(testBytes); UErrorCode status = U_ZERO_ERROR; UChar32 result; UConverter *cnv = 0; @@ -5087,7 +5152,7 @@ static void TestJitterbug255() } while (testBuffer != testEnd) { - result = ucnv_getNextUChar (cnv, (const char **)&testBuffer, (const char *)testEnd , &status); + result = ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status); if (U_FAILURE(status)) { log_err("Failed to convert the next UChar for SJIS.\n"); @@ -5133,6 +5198,7 @@ static void TestEBCDICUS4XML() } ucnv_close(cnv); } +#endif /* #if !UCONFIG_NO_LEGACY_COLLATION */ #if !UCONFIG_NO_COLLATION diff --git a/Build/source/libs/icu-xetex/test/cintltst/putiltst.c b/Build/source/libs/icu-xetex/test/cintltst/putiltst.c index 2a075243f56..e6cff642b23 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/putiltst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/putiltst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1998-2004, International Business Machines Corporation and + * Copyright (c) 1998-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* @@ -90,13 +90,6 @@ static void TestPUtilAPI(void){ log_verbose("Testing the API uprv_pow10()\n"); doAssert(uprv_pow10(4), 10000, "uprv_pow10(4) failed."); - log_verbose("Testing the API uprv_log10()\n"); - doAssert(uprv_log10(3456), 3, "uprv_log10(3456) failed."); -#ifdef OS390 - doAssert(uprv_log10(1.0e55), 55, "uprv_log10(1.0e55) failed."); -#else - doAssert(uprv_log10(1.0e300), 300, "uprv_log10(1.0e300) failed."); -#endif log_verbose("Testing the API uprv_isNegativeInfinity()\n"); isTrue=uprv_isNegativeInfinity(uprv_getInfinity() * -1); if(isTrue != TRUE){ diff --git a/Build/source/libs/icu-xetex/test/cintltst/reapits.c b/Build/source/libs/icu-xetex/test/cintltst/reapits.c index 4e3cfb7c330..d2999ed54cc 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/reapits.c +++ b/Build/source/libs/icu-xetex/test/cintltst/reapits.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2004, International Business Machines Corporation and + * Copyright (c) 2004-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -40,9 +40,11 @@ log_err("Test Failure at file %s, line %d\n", __FILE__, __LINE__);}} UBool success; \ if (nulTerm) { \ u_austrncpy(buf_inside_macro, (actual), len+1); \ + buf_inside_macro[len+2] = 0; \ success = (strcmp((expected), buf_inside_macro) == 0); \ } else { \ u_austrncpy(buf_inside_macro, (actual), len); \ + buf_inside_macro[len+1] = 0; \ success = (strncmp((expected), buf_inside_macro, len) == 0); \ } \ if (success == FALSE) { \ @@ -57,13 +59,14 @@ log_err("Test Failure at file %s, line %d\n", __FILE__, __LINE__);}} static void TestRegexCAPI(void); +static void TestBug4315(void); void addURegexTest(TestNode** root); void addURegexTest(TestNode** root) { addTest(root, &TestRegexCAPI, "regex/TestRegexCAPI"); -/* addTest(root, &TestBreakIteratorSafeClone, "tstxtbd/cbiapts/TestBreakIteratorSafeClone"); */ + addTest(root, &TestBug4315, "regex/TestBug4315"); } @@ -95,6 +98,17 @@ static void TestRegexCAPI(void) { TEST_ASSERT(status == U_REGEX_INVALID_FLAG); uregex_close(re); + /* openC with an invalid parameter */ + status = U_ZERO_ERROR; + re = uregex_openC(NULL, + UREGEX_CASE_INSENSITIVE | UREGEX_COMMENTS | UREGEX_DOTALL | UREGEX_MULTILINE | UREGEX_UWORD, 0, &status); + TEST_ASSERT(status == U_ILLEGAL_ARGUMENT_ERROR && re == NULL); + + /* openC with an invalid parameter */ + status = U_USELESS_COLLATOR_ERROR; + re = uregex_openC(NULL, + UREGEX_CASE_INSENSITIVE | UREGEX_COMMENTS | UREGEX_DOTALL | UREGEX_MULTILINE | UREGEX_UWORD, 0, &status); + TEST_ASSERT(status == U_USELESS_COLLATOR_ERROR && re == NULL); /* openC open from a C string */ { @@ -969,4 +983,55 @@ static void TestRegexCAPI(void) { } +static void TestBug4315(void) { + UErrorCode theICUError = U_ZERO_ERROR; + URegularExpression *theRegEx; + UChar *textBuff; + const char *thePattern; + UChar theString[100]; + UChar *destFields[24]; + int32_t neededLength1; + int32_t neededLength2; + + int32_t wordCount = 0; + int32_t destFieldsSize = 24; + + thePattern = "ck "; + u_uastrcpy(theString, "The quick brown fox jumped over the slow black turtle."); + + /* open a regex */ + theRegEx = uregex_openC(thePattern, 0, NULL, &theICUError); + TEST_ASSERT_SUCCESS(theICUError); + + /* set the input string */ + uregex_setText(theRegEx, theString, u_strlen(theString), &theICUError); + TEST_ASSERT_SUCCESS(theICUError); + + /* split */ + /*explicitly pass NULL and 0 to force the overflow error -> this is where the + * error occurs! */ + wordCount = uregex_split(theRegEx, NULL, 0, &neededLength1, destFields, + destFieldsSize, &theICUError); + + TEST_ASSERT(theICUError == U_BUFFER_OVERFLOW_ERROR); + TEST_ASSERT(wordCount==3); + + if(theICUError == U_BUFFER_OVERFLOW_ERROR) + { + theICUError = U_ZERO_ERROR; + textBuff = (UChar *) malloc(sizeof(UChar) * (neededLength1 + 1)); + wordCount = uregex_split(theRegEx, textBuff, neededLength1+1, &neededLength2, + destFields, destFieldsSize, &theICUError); + TEST_ASSERT(wordCount==3); + TEST_ASSERT_SUCCESS(theICUError); + TEST_ASSERT(neededLength1 == neededLength2); + TEST_ASSERT_STRING("The qui", destFields[0], TRUE); + TEST_ASSERT_STRING("brown fox jumped over the slow bla", destFields[1], TRUE); + TEST_ASSERT_STRING("turtle.", destFields[2], TRUE); + TEST_ASSERT(destFields[3] == NULL); + free(textBuff); + } + uregex_close(theRegEx); +} + #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ diff --git a/Build/source/libs/icu-xetex/test/cintltst/spreptst.c b/Build/source/libs/icu-xetex/test/cintltst/spreptst.c index 9d82c03b763..b68bc47cf69 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/spreptst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/spreptst.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2003, International Business Machines + * Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -37,6 +37,8 @@ static void Test_nfs4_mixed_prep_data(void); static void Test_nfs4_cs_prep(void); static void Test_nfs4_cis_prep(void); static void Test_nfs4_mixed_prep(void); +static void TestBEAMWarning(void); +static void TestCoverage(void); void addUStringPrepTest(TestNode** root) @@ -47,6 +49,8 @@ addUStringPrepTest(TestNode** root) addTest(root, &Test_nfs4_cs_prep, "spreptst/Test_nfs4_cs_prep"); addTest(root, &Test_nfs4_cis_prep, "spreptst/Test_nfs4_cis_prep"); addTest(root, &Test_nfs4_mixed_prep, "spreptst/Test_nfs4_mixed_prep"); + addTest(root, &TestBEAMWarning, "spreptst/TestBEAMWarning"); + addTest(root, &TestCoverage, "spreptst/TestCoverage"); } static void @@ -290,6 +294,12 @@ unescapeData(const char* src, int32_t srcLen, static void Test_nfs4_cis_prep(void){ int32_t i=0; + UErrorCode loadStatus = U_ZERO_ERROR; + loadTestData(&loadStatus); + if (U_FAILURE(loadStatus)) { + log_err("Test could not initialize. Got %s\n", u_errorName(loadStatus)); + return; + } for(i=0;i< (int32_t)(sizeof(conformanceTestCases)/sizeof(conformanceTestCases[0]));i++){ const char* src = conformanceTestCases[i].in; @@ -403,6 +413,13 @@ static const char* mixed_prep_data[] ={ static void Test_nfs4_mixed_prep(void){ + UErrorCode loadStatus = U_ZERO_ERROR; + loadTestData(&loadStatus); + if (U_FAILURE(loadStatus)) { + log_err("Test could not initialize. Got %s\n", u_errorName(loadStatus)); + return; + } + { int32_t i=0; char src[MAX_BUFFER_SIZE]; @@ -550,6 +567,45 @@ Test_nfs4_cs_prep(void){ } } + + +static void TestBEAMWarning(){ + UErrorCode status = U_ZERO_ERROR; + UParseError parseError; + UStringPrepProfile* profile = NULL; + /* get the test data path */ + const char *testdatapath = NULL; + UChar src =0x0000; + testdatapath = loadTestData(&status); + /* open the profile */ + profile = usprep_open(testdatapath, "nfscis", &status); + usprep_prepare(profile,&src , 0, NULL, 0, USPREP_DEFAULT, &parseError, &status); + + usprep_close(profile); +} + +static void TestCoverage(void) { + UErrorCode status = U_USELESS_COLLATOR_ERROR; + UParseError parseError; + + usprep_open(NULL, NULL, &status); + if (status != U_USELESS_COLLATOR_ERROR) { + log_err("usprep_open didn't react correctly to a bad UErrorCode\n"); + } + usprep_prepare(NULL, NULL, 0, NULL, 0, USPREP_DEFAULT, &parseError, &status); + if (status != U_USELESS_COLLATOR_ERROR) { + log_err("usprep_prepare didn't react correctly to a bad UErrorCode\n"); + } + status = U_ZERO_ERROR; + usprep_prepare(NULL, NULL, 0, NULL, 0, USPREP_DEFAULT, &parseError, &status); + if (status != U_ILLEGAL_ARGUMENT_ERROR) { + log_err("usprep_prepare didn't check its arguments\n"); + } + + /* Don't crash */ + usprep_close(NULL); +} + #endif /* diff --git a/Build/source/libs/icu-xetex/test/cintltst/stdnmtst.c b/Build/source/libs/icu-xetex/test/cintltst/stdnmtst.c index 89ae5711b45..7bfa257c391 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/stdnmtst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/stdnmtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2000-2005, International Business Machines Corporation and + * Copyright (c) 2000-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* @@ -100,7 +100,7 @@ static void TestStandardName() /*dotestname("cp1252", "MIME", "windows-1252") &&*/ dotestname("ascii", "MIME", "US-ASCII") && dotestname("csiso2022jp2", "MIME", "ISO-2022-JP-2") && - dotestname("Iso20-22__cN", "MIME", "ISO-2022-CN") && + dotestname("Iso20-22__cN", "IANA", "ISO-2022-CN") && dotestname("ascii", "IANA", "ANSI_X3.4-1968") && dotestname("cp850", "IANA", "IBM850") && dotestname("crazy", "MIME", NULL) && @@ -152,7 +152,7 @@ static void TestCanonicalName() dotestconv("ibm-5305", "IANA", NULL) && /* mapping does not exist */ dotestconv("cp1208", "", "UTF-8") && /* default name due to ordering */ dotestconv("UTF16_BigEndian", "", "UTF-16BE") && /* non-default name due to ordering */ - dotestconv("ISO-2022-CN", "MIME", "ISO_2022,locale=zh,version=0") &&/* default name */ + dotestconv("ISO-2022-CN", "IANA", "ISO_2022,locale=zh,version=0") &&/* default name */ dotestconv("Shift_JIS", "MIME", "ibm-943_P15A-2003") &&/* ambiguous alias */ dotestconv("Shift_JIS", "", "ibm-943_P130-1999") &&/* ambiguous alias */ dotestconv("ibm-943", "", "ibm-943_P15A-2003") &&/* ambiguous alias */ @@ -170,8 +170,9 @@ static void TestCanonicalName() static UBool doTestNames(const char *name, const char *standard, const char **expected, int32_t size) { UErrorCode err = U_ZERO_ERROR; UEnumeration *myEnum = ucnv_openStandardNames(name, standard, &err); + const char *enumName, *testName; int32_t enumCount = uenum_count(myEnum, &err); - int32_t idx, repeatTimes = 3; + int32_t idx, len, repeatTimes = 3; if (size != enumCount) { log_err("FAIL: different size arrays. Got %d. Expected %d\n", enumCount, size); return 0; @@ -183,9 +184,8 @@ static UBool doTestNames(const char *name, const char *standard, const char **ex log_verbose("\n%s %s\n", name, standard); while (repeatTimes-- > 0) { for (idx = 0; idx < enumCount; idx++) { - int32_t len; - const char *enumName = uenum_next(myEnum, &len, &err); - const char *testName = expected[idx]; + enumName = uenum_next(myEnum, &len, &err); + testName = expected[idx]; if (uprv_strcmp(enumName, testName) != 0 || U_FAILURE(err) || len != (int32_t)uprv_strlen(expected[idx])) { @@ -195,6 +195,13 @@ static UBool doTestNames(const char *name, const char *standard, const char **ex log_verbose("%s\n", enumName); err = U_ZERO_ERROR; } + if (enumCount >= 0) { + /* one past the list of all names must return NULL */ + enumName = uenum_next(myEnum, &len, &err); + if (enumName != NULL || len != 0 || U_FAILURE(err)) { + log_err("FAIL: uenum_next(past the list) did not return NULL[0] with U_SUCCESS(). name=%s standard=%s len=%d err=%s\n", name, standard, len, u_errorName(err)); + } + } log_verbose("\n reset\n"); uenum_reset(myEnum, &err); if (U_FAILURE(err)) { diff --git a/Build/source/libs/icu-xetex/test/cintltst/tracetst.c b/Build/source/libs/icu-xetex/test/cintltst/tracetst.c index 4fc36be4b79..54268ac818c 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/tracetst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/tracetst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2003-2004, International Business Machines Corporation and + * Copyright (c) 2003-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* @@ -290,8 +290,11 @@ static void TestTraceAPI() { test_format("a 64 bit ptr %p", 50, 0, "a 64 bit ptr 1000200030004000", __LINE__, ptr); } else if (sizeof(void *) == 16) { /* iSeries */ - int32_t massiveBigEndianPtr[] = { 0x10002000, 0x30004000, 0x50006000, 0x70008000 }; - ptr = *((void **)massiveBigEndianPtr); + union { + int32_t arr[4]; + void *ptr; + } massiveBigEndianPtr = {{ 0x10002000, 0x30004000, 0x50006000, 0x70008000 }}; + ptr = massiveBigEndianPtr.ptr; test_format("a 128 bit ptr %p", 50, 0, "a 128 bit ptr 10002000300040005000600070008000", __LINE__, ptr); } else { TEST_ASSERT(FALSE); diff --git a/Build/source/libs/icu-xetex/test/cintltst/ucmptst.c b/Build/source/libs/icu-xetex/test/cintltst/ucmptst.c deleted file mode 100644 index 98c1998dabe..00000000000 --- a/Build/source/libs/icu-xetex/test/cintltst/ucmptst.c +++ /dev/null @@ -1,201 +0,0 @@ -/******************************************************************** - * COPYRIGHT: - * Copyright (c) 1998-2004, International Business Machines Corporation - * and others. All Rights Reserved. - ********************************************************************/ -/* -* File test.c -* -* Modification History: -* -* Date Name Description -* 07/28/2000 Madhu Creation -******************************************************************************* -*/ - -#include "unicode/utypes.h" -#include "ucmp8.h" -#include "cmemory.h" -#include "cintltst.h" -#include "ucol_imp.h" - - -static void TestUCMP8API(void); - -void addCompactArrayTest(TestNode** root); - - -void -addCompactArrayTest(TestNode** root) -{ - addTest(root, &TestUCMP8API, "ucmptst/TestUCMP8API"); -} - -static void query(CompactByteArray *array) { - int32_t i = 0; - const uint8_t *valuesSet=(uint8_t *)ucmp8_getArray(array); - for(i =0 ; i< 10; i++ ){ - if(valuesSet[0] != (uint8_t)0xFD ){ - log_err("ERROR: did not get the values expected values\n"); - break; - } - } -} - -static void TestUCMP8API(){ - UErrorCode status = U_ZERO_ERROR; - CompactByteArray* ucmp8Array=NULL; - CompactByteArray* pAliaser=NULL; - CompactByteArray* pAdopter=NULL; - - CompactByteArray aliaser; - CompactByteArray adopter; - - - CompactByteArray ucmp8Array1; - CompactByteArray ucmp8Array2; - CompactByteArray ucmp8Clone; - int8_t *values; - uint8_t *valuesSet; - static const int8_t TEST_DEFAULT_VALUE = (int8_t)0xFF; - - - /*ucmp8_open*/ - log_verbose("Testing ucmp8_open()\n"); - ucmp8Array=ucmp8_open(TEST_DEFAULT_VALUE); - if(ucmp8Array == NULL){ - log_err("ERROR: ucmp8_open() failed\n"); - } - if( (int32_t)ucmp8_getCount(ucmp8Array) != (int32_t)ucmp8_getkUnicodeCount()) { - log_err("ERROR: ucmp8_open failed\n"); - } - - /*ucmp8_init*/ - log_verbose("Testing ucmp8_init()\n"); - ucmp8_init(&ucmp8Array1, TEST_DEFAULT_VALUE); - if( (int32_t)ucmp8_getCount(&ucmp8Array1) != (int32_t)ucmp8_getkUnicodeCount() || - ucmp8_getIndex(&ucmp8Array1) == NULL || - ucmp8_getArray(&ucmp8Array1) == NULL || - ucmp8Array1.fBogus != FALSE){ - log_err("Error: ucmp8_init() failed\n"); - } - /*ucmp8_initBogus*/ - log_verbose("Testing ucmp8_initBogus()\n"); - ucmp8_initBogus(&ucmp8Array2); - if((int32_t)ucmp8_getCount(&ucmp8Array2) != ucmp8Array2.fCount || - ucmp8_getIndex(&ucmp8Array2) != NULL || - ucmp8_getArray(&ucmp8Array2) != NULL || - ucmp8Array2.fBogus != TRUE){ - log_err("Error: ucmp8_initBogus() failed\n"); - } - /*ucmp8_getkBlockCount*/ - if(ucmp8_getkBlockCount() != 128 ){ - log_err("Error in ucmp8_getkBlockCount()\n"); - } - values=(int8_t*)ucmp8_getArray(&ucmp8Array1); - if((uint8_t)values[0] != (uint8_t)TEST_DEFAULT_VALUE){ - log_err("Error: getArray() or init failed\n"); - } - - /*ucmp8_compact*/ - if(ucmp8Array1.fCompact == TRUE){ - log_err("Error: ucmp8_open failed Got compact for expanded data\n"); - } - ucmp8_compact(&ucmp8Array1, 1); - if(ucmp8Array1.fCompact != TRUE){ - log_err("Error: ucmp8_compact failed\n"); - } - /*ucmp8_set*/ - ucmp8_set(&ucmp8Array1, 0, (uint8_t)0xFE); - valuesSet=(uint8_t*)ucmp8_getArray(&ucmp8Array1); - if(valuesSet[0] != (uint8_t)0xFE ){ - log_err("ERROR: ucmp8_set() failed\n"); - } - if(ucmp8Array1.fCompact == TRUE){ - log_err("Error: ucmp8_set didn't expand the compact data \n"); - } - - /*ucmp8_set*/ - ucmp8_compact(&ucmp8Array1, 1); - ucmp8_set(&ucmp8Array1, 0, (uint8_t)0xFD); - valuesSet=(uint8_t*)ucmp8_getArray(&ucmp8Array1); - if(valuesSet[0] != (uint8_t)0xFD ){ - log_err("ERROR: ucmp8_set() failed\n"); - } - if(ucmp8Array1.fCompact == TRUE){ - log_err("Error: ucmp8_set didn't expand the compact data \n"); - } - /*ucmp8_setRange*/ - ucmp8_compact(&ucmp8Array1, 1); - ucmp8_setRange(&ucmp8Array1, 0, 10, (uint8_t)0xFD); - query(&ucmp8Array1); - - log_verbose("Testing ucmp8_flattenMem()\n"); - { - int32_t len = 0; - int32_t size = ucmp8_flattenMem(&ucmp8Array1, NULL); - uint8_t *buff = malloc(size); - uint8_t *buffLocation = buff; - len = ucmp8_flattenMem(&ucmp8Array1, buff); - - if(size != len || size == 0 || len == 0 || buff == NULL) { - log_err("Unable to flatten!\n"); - } else { - log_verbose("Testing ucmp8_initFromData()\n"); - ucmp8_initFromData(&ucmp8Clone, (const uint8_t **)&buffLocation, &status); - if(U_FAILURE(status) || ucmp8_isBogus(&ucmp8Clone) == TRUE || (buffLocation-buff) != len){ - log_err("ERROR: ucmp8_initFromData() failed\n"); - status = U_ZERO_ERROR; - } else { - query(&ucmp8Clone); - ucmp8_close(&ucmp8Clone); - } - } - free(buff); - } - -/* -openAdopt, initAdopt, openAlias, initAlias -*/ - log_verbose("Testing aliasers and adopters\n"); - { - int32_t count = ucmp8_getCount(&ucmp8Array1); - const uint16_t *tIndex = ucmp8_getIndex(&ucmp8Array1); - const int8_t *tValues = ucmp8_getArray(&ucmp8Array1); - uint16_t *index = (uint16_t *)uprv_malloc(UCMP8_kIndexCount*sizeof(uint16_t)); - - values = (int8_t *)uprv_malloc(count); - - memcpy(index, tIndex, UCMP8_kIndexCount*sizeof(uint16_t)); - memcpy(values, tValues, count); - - ucmp8_initAlias(&aliaser, index, values, count); - query(&aliaser); - ucmp8_close(&aliaser); - - pAliaser = ucmp8_openAlias(index, values, count); - query(pAliaser); - ucmp8_close(pAliaser); - - ucmp8_initAdopt(&adopter, index, values, count); /* TODO: BAD API. Adopted memory MUST be allocated with uprv_malloc */ - query(&adopter); - ucmp8_close(&adopter); - - index = (uint16_t *)uprv_malloc(UCMP8_kIndexCount*sizeof(uint16_t)); - values = (int8_t *)uprv_malloc(count); - - memcpy(index, tIndex, UCMP8_kIndexCount*sizeof(uint16_t)); - memcpy(values, tValues, count); - - pAdopter = ucmp8_openAdopt(index, values, count); /* TODO: BAD API */ - query(pAdopter); - ucmp8_close(pAdopter); - - } - ucmp8_close(&ucmp8Array1); - ucmp8_close(&ucmp8Array2); - ucmp8_close(ucmp8Array); - -} - - diff --git a/Build/source/libs/icu-xetex/test/cintltst/ucsdetst.c b/Build/source/libs/icu-xetex/test/cintltst/ucsdetst.c new file mode 100644 index 00000000000..3c884e474f9 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/cintltst/ucsdetst.c @@ -0,0 +1,356 @@ +/* + **************************************************************************** + * Copyright (c) 2005-2006, International Business Machines Corporation and * + * others. All Rights Reserved. * + **************************************************************************** + */ + +#include "unicode/utypes.h" + +#include "unicode/ucsdet.h" +#include "unicode/ucnv.h" +#include "unicode/ustring.h" + +#include "cintltst.h" + +#include <stdlib.h> +#include <string.h> + +#define ARRAY_SIZE(array) (sizeof array / sizeof array[0]) + +#define NEW_ARRAY(type,count) (type *) ctst_malloc((count) * sizeof(type)) +#define DELETE_ARRAY(array) + +static void TestConstruction(void); +static void TestUTF8(void); +static void TestUTF16(void); +static void TestC1Bytes(void); +static void TestInputFilter(void); +static void TestChaining(void); + +void addUCsdetTest(TestNode** root); + +void addUCsdetTest(TestNode** root) +{ + addTest(root, &TestConstruction, "ucsdetst/TestConstruction"); + addTest(root, &TestUTF8, "ucsdetst/TestUTF8"); + addTest(root, &TestUTF16, "ucsdetst/TestUTF16"); + addTest(root, &TestC1Bytes, "ucsdetst/TestC1Bytes"); + addTest(root, &TestInputFilter, "ucsdetst/TestInputFilter"); + addTest(root, &TestChaining, "ucsdetst/TestErrorChaining"); +} + +static int32_t preflight(const UChar *src, int32_t length, UConverter *cnv) +{ + UErrorCode status; + char buffer[1024]; + char *dest, *destLimit = buffer + sizeof(buffer); + const UChar *srcLimit = src + length; + int32_t result = 0; + + do { + dest = buffer; + status = U_ZERO_ERROR; + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, &status); + result += (int32_t) (dest - buffer); + } while (status == U_BUFFER_OVERFLOW_ERROR); + + return result; +} + +static UChar *unescape(const char *src, int32_t *length) +{ + int32_t charCount = u_unescape(src, NULL, 0); + UChar *chars = NEW_ARRAY(UChar, charCount + 1); + + u_unescape(src, chars, charCount); + + *length = charCount; + return chars; +} + +static char *extractBytes(const UChar *src, int32_t length, const char *codepage, int32_t *byteLength) +{ + UErrorCode status = U_ZERO_ERROR; + UConverter *cnv = ucnv_open(codepage, &status); + int32_t byteCount = preflight(src, length, cnv); + const UChar *srcLimit = src + length; + char *bytes = NEW_ARRAY(char, byteCount + 1); + char *dest = bytes, *destLimit = bytes + byteCount + 1; + + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, &status); + ucnv_close(cnv); + + *byteLength = byteCount; + return bytes; +} + +static void freeBytes(char *bytes) +{ + DELETE_ARRAY(bytes); +} + +static void TestConstruction(void) +{ + UErrorCode status = U_ZERO_ERROR; + UCharsetDetector *csd = ucsdet_open(&status); + UEnumeration *e = ucsdet_getAllDetectableCharsets(csd, &status); + const char *name; + int32_t count = uenum_count(e, &status); + int32_t i, length; + + for(i = 0; i < count; i += 1) { + name = uenum_next(e, &length, &status); + + if(name == NULL || length <= 0) { + log_err("ucsdet_getAllDetectableCharsets() returned a null or empty name!\n"); + } + } + /* one past the list of all names must return NULL */ + name = uenum_next(e, &length, &status); + if(name != NULL || length != 0 || U_FAILURE(status)) { + log_err("ucsdet_getAllDetectableCharsets(past the list) returned a non-null name!\n"); + } + + uenum_close(e); + ucsdet_close(csd); +} + +static void TestUTF8(void) +{ + UErrorCode status = U_ZERO_ERROR; + const char *ss = "This is a string with some non-ascii characters that will " + "be converted to UTF-8, then shoved through the detection process. " + "\\u0391\\u0392\\u0393\\u0394\\u0395" + "Sure would be nice if our source could contain Unicode directly!"; + int32_t byteLength = 0, sLength = 0, dLength = 0; + UChar *s = unescape(ss, &sLength); + char *bytes = extractBytes(s, sLength, "UTF-8", &byteLength); + UCharsetDetector *csd = ucsdet_open(&status); + const UCharsetMatch *match; + UChar *detected = NEW_ARRAY(UChar, sLength); + + ucsdet_setText(csd, bytes, byteLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + log_err("Detection failure for UTF-8: got no matches.\n"); + goto bail; + } + + dLength = ucsdet_getUChars(match, detected, sLength, &status); + + if (u_strCompare(detected, dLength, s, sLength, FALSE) != 0) { + log_err("Round-trip test failed!\n"); + } + + ucsdet_setDeclaredEncoding(csd, "UTF-8", 5, &status); /* for coverage */ + +bail: + DELETE_ARRAY(detected); + freeBytes(bytes); + ucsdet_close(csd); +} + +static void TestUTF16(void) +{ + UErrorCode status = U_ZERO_ERROR; + /* Notice the BOM on the start of this string */ + UChar chars[] = { + 0xFEFF, 0x0623, 0x0648, 0x0631, 0x0648, 0x0628, 0x0627, 0x002C, + 0x0020, 0x0628, 0x0631, 0x0645, 0x062c, 0x064a, 0x0627, 0x062a, + 0x0020, 0x0627, 0x0644, 0x062d, 0x0627, 0x0633, 0x0648, 0x0628, + 0x0020, 0x002b, 0x0020, 0x0627, 0x0646, 0x062a, 0x0631, 0x0646, + 0x064a, 0x062a, 0x0000}; + int32_t beLength = 0, leLength = 0, cLength = ARRAY_SIZE(chars); + char *beBytes = extractBytes(chars, cLength, "UTF-16BE", &beLength); + char *leBytes = extractBytes(chars, cLength, "UTF-16LE", &leLength); + UCharsetDetector *csd = ucsdet_open(&status); + const UCharsetMatch *match; + const char *name; + int32_t conf; + + ucsdet_setText(csd, beBytes, beLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + log_err("Encoding detection failure for UTF-16BE: got no matches.\n"); + goto try_le; + } + + name = ucsdet_getName(match, &status); + conf = ucsdet_getConfidence(match, &status); + + if (strcmp(name, "UTF-16BE") != 0) { + log_err("Encoding detection failure for UTF-16BE: got %s\n", name); + } + + if (conf != 100) { + log_err("Did not get 100%% confidence for UTF-16BE: got %d\n", conf); + } + +try_le: + ucsdet_setText(csd, leBytes, leLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + log_err("Encoding detection failure for UTF-16LE: got no matches.\n"); + goto bail; + } + + name = ucsdet_getName(match, &status); + conf = ucsdet_getConfidence(match, &status); + + + if (strcmp(name, "UTF-16LE") != 0) { + log_err("Enconding detection failure for UTF-16LE: got %s\n", name); + } + + if (conf != 100) { + log_err("Did not get 100%% confidence for UTF-16LE: got %d\n", conf); + } + +bail: + freeBytes(leBytes); + freeBytes(beBytes); + ucsdet_close(csd); +} + +static void TestC1Bytes(void) +{ +#if !UCONFIG_NO_LEGACY_CONVERSION + UErrorCode status = U_ZERO_ERROR; + const char *ssISO = "This is a small sample of some English text. Just enough to be sure that it detects correctly."; + const char *ssWindows = "This is another small sample of some English text. Just enough to be sure that it detects correctly. It also includes some \\u201CC1\\u201D bytes."; + int32_t sISOLength = 0, sWindowsLength = 0; + UChar *sISO = unescape(ssISO, &sISOLength); + UChar *sWindows = unescape(ssWindows, &sWindowsLength); + int32_t lISO = 0, lWindows = 0; + char *bISO = extractBytes(sISO, sISOLength, "ISO-8859-1", &lISO); + char *bWindows = extractBytes(sWindows, sWindowsLength, "windows-1252", &lWindows); + UCharsetDetector *csd = ucsdet_open(&status); + const UCharsetMatch *match; + const char *name; + + ucsdet_setText(csd, bWindows, lWindows, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + log_err("English test with C1 bytes got no matches.\n"); + goto bail; + } + + name = ucsdet_getName(match, &status); + + if (strcmp(name, "windows-1252") != 0) { + log_err("English text with C1 bytes does not detect as windows-1252, but as %s\n", name); + } + + ucsdet_setText(csd, bISO, lISO, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + log_err("English text without C1 bytes got no matches.\n"); + goto bail; + } + + name = ucsdet_getName(match, &status); + + if (strcmp(name, "ISO-8859-1") != 0) { + log_err("English text without C1 bytes does not detect as ISO-8859-1, but as %s\n", name); + } + +bail: + freeBytes(bWindows); + freeBytes(bISO); + + ucsdet_close(csd); +#endif +} + +static void TestInputFilter(void) +{ + UErrorCode status = U_ZERO_ERROR; + const char *ss = "<a> <lot> <of> <English> <inside> <the> <markup> Un tr\\u00E8s petit peu de Fran\\u00E7ais. <to> <confuse> <the> <detector>"; + int32_t sLength = 0; + UChar *s = unescape(ss, &sLength); + int32_t byteLength = 0; + char *bytes = extractBytes(s, sLength, "ISO-8859-1", &byteLength); + UCharsetDetector *csd = ucsdet_open(&status); + const UCharsetMatch *match; + const char *lang, *name; + + ucsdet_enableInputFilter(csd, TRUE); + + if (!ucsdet_isInputFilterEnabled(csd)) { + log_err("ucsdet_enableInputFilter(csd, TRUE) did not enable input filter!\n"); + } + + + ucsdet_setText(csd, bytes, byteLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + log_err("Turning on the input filter resulted in no matches.\n"); + goto turn_off; + } + + name = ucsdet_getName(match, &status); + + if (name == NULL || strcmp(name, "ISO-8859-1") != 0) { + log_err("Turning on the input filter resulted in %s rather than ISO-8859-1\n", name); + } else { + lang = ucsdet_getLanguage(match, &status); + + if (lang == NULL || strcmp(lang, "fr") != 0) { + log_err("Input filter did not strip markup!\n"); + } + } + +turn_off: + ucsdet_enableInputFilter(csd, FALSE); + ucsdet_setText(csd, bytes, byteLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + log_err("Turning off the input filter resulted in no matches.\n"); + goto bail; + } + + name = ucsdet_getName(match, &status); + + if (name == NULL || strcmp(name, "ISO-8859-1") != 0) { + log_err("Turning off the input filter resulted in %s rather than ISO-8859-1\n", name); + } else { + lang = ucsdet_getLanguage(match, &status); + + if (lang == NULL || strcmp(lang, "en") != 0) { + log_err("Unfiltered input did not detect as English!\n"); + } + } + +bail: + freeBytes(bytes); + ucsdet_close(csd); +} + +static void TestChaining(void) { + UErrorCode status = U_USELESS_COLLATOR_ERROR; + + ucsdet_open(&status); + ucsdet_setText(NULL, NULL, 0, &status); + ucsdet_getName(NULL, &status); + ucsdet_getConfidence(NULL, &status); + ucsdet_getLanguage(NULL, &status); + ucsdet_detect(NULL, &status); + ucsdet_setDeclaredEncoding(NULL, NULL, 0, &status); + ucsdet_detectAll(NULL, NULL, &status); + ucsdet_getUChars(NULL, NULL, 0, &status); + ucsdet_getUChars(NULL, NULL, 0, &status); + ucsdet_close(NULL); + + /* All of this code should have done nothing. */ + if (status != U_USELESS_COLLATOR_ERROR) { + log_err("Status got changed to %s\n", u_errorName(status)); + } +} diff --git a/Build/source/libs/icu-xetex/test/cintltst/udatatst.c b/Build/source/libs/icu-xetex/test/cintltst/udatatst.c index 156a1582d56..b68ec82ab65 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/udatatst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/udatatst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1998-2005, International Business Machines Corporation and + * Copyright (c) 1998-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* @@ -26,6 +26,7 @@ #include "filestrm.h" #include "udatamem.h" #include "cintltst.h" +#include "ubrkimpl.h" #include <sys/types.h> #include <sys/stat.h> @@ -600,10 +601,12 @@ static void TestUDataOpenChoiceDemo1() { const char* name[]={ "cnvalias", "unames", - "test" + "test", + "nam" }; const char* type="icu"; const char* testPath="testdata"; + const char* fullTestDataPath = loadTestData(&status); result=udata_openChoice(NULL, "icu", name[0], isAcceptable1, NULL, &status); if(U_FAILURE(status)){ @@ -613,6 +616,7 @@ static void TestUDataOpenChoiceDemo1() { udata_close(result); } + status=U_ZERO_ERROR; result=udata_openChoice(NULL, type, name[1], isAcceptable1, NULL, &status); if(U_FAILURE(status)){ status=U_ZERO_ERROR; @@ -621,11 +625,15 @@ static void TestUDataOpenChoiceDemo1() { log_err("FAIL: udata_openChoice() failed name=%s, type=%s, \n errorcode=%s\n", name[1], type, myErrorName(status)); } } + else { + log_err("FAIL: udata_openChoice() unexpectedly passed. name=%s, type=%s, \n errorcode=%s\n", name[1], type, myErrorName(status)); + } if(U_SUCCESS(status)){ udata_close(result); } + status=U_ZERO_ERROR; result=udata_openChoice(testPath, type, name[2], isAcceptable1, NULL, &status); if(U_FAILURE(status)){ status=U_ZERO_ERROR; @@ -634,10 +642,26 @@ static void TestUDataOpenChoiceDemo1() { log_err("FAIL: udata_openChoice() failed path=%s name=%s, type=%s, \n errorcode=%s\n", testPath, name[2], type, myErrorName(status)); } } + else { + log_err("FAIL: udata_openChoice() unexpectedly passed. name=%s, type=%s, \n errorcode=%s\n", name[2], type, myErrorName(status)); + } if(U_SUCCESS(status)){ udata_close(result); } + + status=U_ZERO_ERROR; + type="typ"; + result=udata_openChoice(fullTestDataPath, type, name[3], isAcceptable1, NULL, &status); + if(status != U_INVALID_FORMAT_ERROR){ + log_err("FAIL: udata_openChoice() did not fail as expected. name=%s, type=%s, \n errorcode=%s\n", name[3], type, myErrorName(status)); + } + + status=U_USELESS_COLLATOR_ERROR; + result=udata_openChoice(fullTestDataPath, type, name[3], isAcceptable1, NULL, &status); + if(status != U_USELESS_COLLATOR_ERROR){ + log_err("FAIL: udata_openChoice() did not fail as expected. name=%s, type=%s, \n errorcode=%s\n", name[3], type, myErrorName(status)); + } } static UBool U_CALLCONV @@ -1100,6 +1124,97 @@ static void TestICUDataName() /* test data swapping ------------------------------------------------------- */ +#ifdef OS400 +/* See comments in genccode.c on when this special implementation can be removed. */ +static const struct { + double bogus; + const char *bytes; +} gOffsetTOCAppDataItem1={ 0.0, /* alignment bytes */ + "\x00\x14" /* sizeof(UDataInfo) *//* MappedData { */ + "\xda" + "\x27" /* } */ + "\x00\x14" /* sizeof(UDataInfo) *//* UDataInfo { */ + "\0\0" + "\1" /* U_IS_BIG_ENDIAN */ + "\1" /* U_CHARSET_FAMILY */ + "\2" /* U_SIZEOF_WHAR_T */ + "\0" + "\x31\x31\x31\x31" + "\0\0\0\0" + "\0\0\0\0" /* } */ +}; +#else +static const struct { + double bogus; + MappedData bytes1; + UDataInfo bytes2; + uint8_t bytes3; +} gOffsetTOCAppDataItem1={ + 0.0, /* alignment bytes */ + { sizeof(UDataInfo), 0xda, 0x27 }, /* MappedData */ + + {sizeof(UDataInfo), + 0, + + U_IS_BIG_ENDIAN, + U_CHARSET_FAMILY, + sizeof(UChar), + 0, + + {0x31, 0x31, 0x31, 0x31}, /* dataFormat="1111" */ + {0, 0, 0, 0}, /* formatVersion */ + {0, 0, 0, 0}} /* dataVersion */ +}; +#endif + +static const UChar gOffsetTOCGarbage[] = { /* "I have been very naughty!" */ + 0x49, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6E, + 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6E, 0x61, 0x75, 0x67, 0x68, 0x74, 0x79, 0x21 +}; + +/* Original source: icu/source/tools/genccode */ +static const struct { + uint16_t headerSize; + uint8_t magic1, magic2; + UDataInfo info; + char padding[8]; + uint32_t count, reserved; + const struct { + const char *const name; + const void *const data; + } toc[3]; +} gOffsetTOCAppData_dat = { + 32, /* headerSize */ + 0xda, /* magic1, (see struct MappedData in udata.c) */ + 0x27, /* magic2 */ + { /*UDataInfo */ + sizeof(UDataInfo), /* size */ + 0, /* reserved */ + U_IS_BIG_ENDIAN, + U_CHARSET_FAMILY, + sizeof(UChar), + 0, /* reserved */ + { /* data format identifier */ + 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ + {1, 0, 0, 0}, /* format version major, minor, milli, micro */ + {0, 0, 0, 0} /* dataVersion */ + }, + {0,0,0,0,0,0,0,0}, /* Padding[8] */ + 3, /* count */ + 0, /* Reserved */ + { /* TOC structure */ + { "OffsetTOCAppData/a/b", &gOffsetTOCAppDataItem1 }, + { "OffsetTOCAppData/gOffsetTOCAppDataItem1", &gOffsetTOCAppDataItem1 }, + { "OffsetTOCAppData/gOffsetTOCGarbage", &gOffsetTOCGarbage } + } +}; + +/* Unfortunately, trie dictionaries are in a C++ header */ +int32_t +triedict_swap(const UDataSwapper *ds, + const void *inData, int32_t length, void *outData, + UErrorCode *pErrorCode); + /* test cases for maximum data swapping code coverage */ static const struct { const char *name, *type; @@ -1116,6 +1231,8 @@ static const struct { {"el", "res", ures_swap}, /* ICU's root */ {"root", "res", ures_swap}, + /* Test a 32-bit key table. This is large. */ + {"*testtable32", "res", ures_swap}, /* ICU 2.6 resource bundle - data format 1.0, without indexes[] (little-endian ASCII) */ {"*icu26_testtypes", "res", ures_swap}, @@ -1143,7 +1260,9 @@ static const struct { {"gb18030", "cnv", ucnv_swap}, /* MBCS conversion table file with extension */ {"*test4x", "cnv", ucnv_swap}, +#endif +#if !UCONFIG_NO_CONVERSION /* alias table */ {"cnvalias", "icu", ucnv_swapAliases}, #endif @@ -1154,6 +1273,7 @@ static const struct { #if !UCONFIG_NO_BREAK_ITERATION {"char", "brk", ubrk_swap}, + {"thaidict", "ctd", triedict_swap}, #endif /* the last item should not be #if'ed so that it can reliably omit the last comma */ @@ -1181,7 +1301,8 @@ static const struct { {"unames", "icu", uchar_swapNames} }; -#define SWAP_BUFFER_SIZE 1000000 +/* Large enough for the largest swappable data item. */ +#define SWAP_BUFFER_SIZE 1800000 static void U_CALLCONV printError(void *context, const char *fmt, va_list args) { @@ -1198,6 +1319,7 @@ TestSwapCase(UDataMemory *pData, const char *name, int32_t length, dataLength, length2, headerLength; UErrorCode errorCode; + UErrorCode badStatus; UBool inEndian, oppositeEndian; uint8_t inCharset, oppositeCharset; @@ -1259,6 +1381,20 @@ TestSwapCase(UDataMemory *pData, const char *name, } } + /* + Check error checking of swappable data not specific to this swapper. + This should always fail. + */ + badStatus = U_ZERO_ERROR; + length=swapFn(ds, &gOffsetTOCAppData_dat, -1, NULL, &badStatus); + if(badStatus != U_UNSUPPORTED_ERROR) { + log_err("swapFn(%s->!isBig+same charset) unexpectedly succeeded on bad data - %s\n", + name, u_errorName(errorCode)); + udata_closeSwapper(ds); + return; + } + + /* Now allow errors to be printed */ ds->printError=printError; /* preflight the length */ @@ -1415,6 +1551,13 @@ TestSwapData() { } /* Test that printError works as expected. */ + errorCode=U_USELESS_COLLATOR_ERROR; + ds=udata_openSwapper(U_IS_BIG_ENDIAN, U_ASCII_FAMILY, + !U_IS_BIG_ENDIAN, U_ASCII_FAMILY, + &errorCode); + if (ds != NULL || errorCode != U_USELESS_COLLATOR_ERROR) { + log_err("udata_openSwapper should have returned NULL with bad argument\n", name); + } errorCode=U_ZERO_ERROR; ds=udata_openSwapper(U_IS_BIG_ENDIAN, U_ASCII_FAMILY, !U_IS_BIG_ENDIAN, U_ASCII_FAMILY, @@ -1427,19 +1570,39 @@ TestSwapData() { log_err("udata_printError can't properly print error messages. Got = %s\n", name); } errorCode = U_USELESS_COLLATOR_ERROR; - if (udata_openSwapperForInputData(NULL, 0, + ds=udata_openSwapperForInputData(NULL, 0, !U_IS_BIG_ENDIAN, U_ASCII_FAMILY, - &errorCode) != NULL) { + &errorCode); + if (ds != NULL || errorCode != U_USELESS_COLLATOR_ERROR) { log_err("udata_openSwapperForInputData should have returned NULL with bad argument\n", name); } + errorCode=U_ZERO_ERROR; ds=udata_openSwapperForInputData(NULL, 0, !U_IS_BIG_ENDIAN, U_ASCII_FAMILY, &errorCode); - if (ds != NULL || errorCode != U_USELESS_COLLATOR_ERROR) { + if (ds != NULL || errorCode != U_ILLEGAL_ARGUMENT_ERROR) { + log_err("udata_openSwapperForInputData should have returned NULL with bad argument\n", name); + } + errorCode=U_ZERO_ERROR; + memset(buffer, 0, sizeof(2*SWAP_BUFFER_SIZE)); + ds=udata_openSwapperForInputData(buffer, 2*SWAP_BUFFER_SIZE, + !U_IS_BIG_ENDIAN, U_ASCII_FAMILY, + &errorCode); + if (ds != NULL || errorCode != U_UNSUPPORTED_ERROR) { log_err("udata_openSwapperForInputData should have returned NULL with bad argument\n", name); } errorCode=U_ZERO_ERROR; + /* Test argument checking. ucol_swapBinary is normally tested via ures_swap, and isn't normally called directly. */ +#if !UCONFIG_NO_COLLATION + ucol_swapBinary(NULL, NULL, -1, NULL, NULL); + ucol_swapBinary(NULL, NULL, -1, NULL, &errorCode); + if (errorCode != U_ILLEGAL_ARGUMENT_ERROR) { + log_err("ucol_swapBinary did not fail as expected\n", name); + } + errorCode=U_ZERO_ERROR; +#endif + for(i=0; i<LENGTHOF(swapCases); ++i) { /* build the name for logging */ errorCode=U_ZERO_ERROR; @@ -1447,6 +1610,11 @@ TestSwapData() { pkg=loadTestData(&errorCode); nm=swapCases[i].name+1; uprv_strcpy(name, "testdata"); + } else if (uprv_strcmp(swapCases[i].type, "brk")==0 + || uprv_strcmp(swapCases[i].type, "ctd")==0) { + pkg=U_ICUDATA_BRKITR; + nm=swapCases[i].name; + uprv_strcpy(name, U_ICUDATA_BRKITR); } else { pkg=NULL; nm=swapCases[i].name; @@ -1471,92 +1639,6 @@ TestSwapData() { } -#ifdef OS400 -/* See comments in genccode.c on when this special implementation can be removed. */ -static const struct { - double bogus; - const char *bytes; -} gOffsetTOCAppDataItem1={ 0.0, /* alignment bytes */ - "\x00\x14" /* sizeof(UDataInfo) *//* MappedData { */ - "\xda" - "\x27" /* } */ - "\x00\x14" /* sizeof(UDataInfo) *//* UDataInfo { */ - "\0\0" - "\1" /* U_IS_BIG_ENDIAN */ - "\1" /* U_CHARSET_FAMILY */ - "\2" /* U_SIZEOF_WHAR_T */ - "\0" - "\x31\x31\x31\x31" - "\0\0\0\0" - "\0\0\0\0" /* } */ -}; -#else -static const struct { - double bogus; - MappedData bytes1; - UDataInfo bytes2; - uint8_t bytes3; -} gOffsetTOCAppDataItem1={ - 0.0, /* alignment bytes */ - { sizeof(UDataInfo), 0xda, 0x27 }, /* MappedData */ - - {sizeof(UDataInfo), - 0, - - U_IS_BIG_ENDIAN, - U_CHARSET_FAMILY, - sizeof(UChar), - 0, - - {0x31, 0x31, 0x31, 0x31}, /* dataFormat="1111" */ - {0, 0, 0, 0}, /* formatVersion */ - {0, 0, 0, 0}} /* dataVersion */ -}; -#endif - -static const UChar gOffsetTOCGarbage[] = { /* "I have been very naughty!" */ - 0x49, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6E, - 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6E, 0x61, 0x75, 0x67, 0x68, 0x74, 0x79, 0x21 -}; - -/* Original source: icu/source/tools/genccode */ -static const struct { - uint16_t headerSize; - uint8_t magic1, magic2; - UDataInfo info; - char padding[8]; - uint32_t count, reserved; - const struct { - const char *const name; - const void *const data; - } toc[3]; -} gOffsetTOCAppData_dat = { - 32, /* headerSize */ - 0xda, /* magic1, (see struct MappedData in udata.c) */ - 0x27, /* magic2 */ - { /*UDataInfo */ - sizeof(UDataInfo), /* size */ - 0, /* reserved */ - U_IS_BIG_ENDIAN, - U_CHARSET_FAMILY, - sizeof(UChar), - 0, /* reserved */ - { /* data format identifier */ - 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ - {1, 0, 0, 0}, /* format version major, minor, milli, micro */ - {0, 0, 0, 0} /* dataVersion */ - }, - {0,0,0,0,0,0,0,0}, /* Padding[8] */ - 3, /* count */ - 0, /* Reserved */ - { /* TOC structure */ - { "OffsetTOCAppData/a/b", &gOffsetTOCAppDataItem1 }, - { "OffsetTOCAppData/gOffsetTOCAppDataItem1", &gOffsetTOCAppDataItem1 }, - { "OffsetTOCAppData/gOffsetTOCGarbage", &gOffsetTOCGarbage } - } -}; - - static void PointerTableOfContents() { UDataMemory *dataItem; UErrorCode status=U_ZERO_ERROR; @@ -1612,6 +1694,10 @@ static void SetBadCommonData(void) { /* It's difficult to test that udata_setCommonData really works within the test framework. So we just test that foolish people can't do bad things. */ UErrorCode status; + char badBuffer[sizeof(gOffsetTOCAppData_dat)]; + + memset(badBuffer, 0, sizeof(badBuffer)); + strcpy(badBuffer, "Hello! I'm not good data."); /* Check that we don't do anything */ status = U_FILE_ACCESS_ERROR; @@ -1637,5 +1723,12 @@ static void SetBadCommonData(void) { else { log_verbose("Can't test setting common data because files mode may have been used.\n"); } + + /* Check that we verify that the data isn't bad */ + status = U_ZERO_ERROR; + udata_setAppData("invalid path", badBuffer, &status); + if (status != U_INVALID_FORMAT_ERROR) { + log_err("FAIL: udata_setAppData doesn't verify data validity.\n"); + } } diff --git a/Build/source/libs/icu-xetex/test/cintltst/utexttst.c b/Build/source/libs/icu-xetex/test/cintltst/utexttst.c index 3d8f426e452..be5941df403 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/utexttst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/utexttst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2005, International Business Machines Corporation and + * Copyright (c) 2005-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* @@ -86,14 +86,14 @@ static void TestAPI(void) { /* utext_clone() */ { UChar uString[] = {0x41, 0x42, 0x43, 0}; - int32_t len; + int64_t len; UText *uta; UText *utb; status = U_ZERO_ERROR; uta = utext_openUChars(NULL, uString, -1, &status); TEST_SUCCESS(status); - utb = utext_clone(NULL, uta, FALSE, &status); + utb = utext_clone(NULL, uta, FALSE, FALSE, &status); TEST_SUCCESS(status); TEST_ASSERT(utb != NULL); TEST_ASSERT(utb != uta); @@ -108,9 +108,9 @@ static void TestAPI(void) { UChar uString[] = {0x41, 0x42, 0x43, 0}; UText *uta; UChar32 c; - int32_t len; + int64_t len; UBool b; - int32_t i; + int64_t i; status = U_ZERO_ERROR; uta = utext_openUChars(NULL, uString, -1, &status); diff --git a/Build/source/libs/icu-xetex/test/cintltst/utf8tst.c b/Build/source/libs/icu-xetex/test/cintltst/utf8tst.c index 420a5f3dbc5..eaa8fb28c54 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/utf8tst.c +++ b/Build/source/libs/icu-xetex/test/cintltst/utf8tst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1998-2003, International Business Machines Corporation and + * Copyright (c) 1998-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* @@ -20,6 +20,44 @@ #define LENGTHOF(array) (sizeof(array)/sizeof((array)[0])) +/* lenient UTF-8 ------------------------------------------------------------ */ + +/* + * Lenient UTF-8 differs from conformant UTF-8 in that it allows surrogate + * code points with their "natural" encoding. + * Effectively, this allows a mix of UTF-8 and CESU-8 as well as encodings of + * single surrogates. + * + * This is not conformant with UTF-8. + * + * Supplementary code points may be encoded as pairs of 3-byte sequences, but + * the macros below do not attempt to assemble such pairs. + */ + +#define L8_NEXT(s, i, length, c) { \ + (c)=(uint8_t)(s)[(i)++]; \ + if((c)>=0x80) { \ + if(U8_IS_LEAD(c)) { \ + (c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (int32_t)(length), c, -2); \ + } else { \ + (c)=U_SENTINEL; \ + } \ + } \ +} + +#define L8_PREV(s, start, i, c) { \ + (c)=(uint8_t)(s)[--(i)]; \ + if((c)>=0x80) { \ + if((c)<=0xbf) { \ + (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -2); \ + } else { \ + (c)=U_SENTINEL; \ + } \ + } \ +} + +/* -------------------------------------------------------------------------- */ + static void printUChars(const uint8_t *uchars, int16_t len); static void TestCodeUnitValues(void); @@ -30,6 +68,7 @@ static void TestFwdBack(void); static void TestSetChar(void); static void TestAppendChar(void); static void TestAppend(void); +static void TestSurrogates(void); void addUTF8Test(TestNode** root); @@ -44,6 +83,7 @@ addUTF8Test(TestNode** root) addTest(root, &TestSetChar, "utf8tst/TestSetChar" ); addTest(root, &TestAppendChar, "utf8tst/TestAppendChar" ); addTest(root, &TestAppend, "utf8tst/TestAppend" ); + addTest(root, &TestSurrogates, "utf8tst/TestSurrogates" ); } static void TestCodeUnitValues() @@ -817,6 +857,97 @@ static void TestAppend() { } } +static void +TestSurrogates() { + static const uint8_t b[]={ + 0xc3, 0x9f, /* 00DF */ + 0xed, 0x9f, 0xbf, /* D7FF */ + 0xed, 0xa0, 0x81, /* D801 */ + 0xed, 0xbf, 0xbe, /* DFFE */ + 0xee, 0x80, 0x80, /* E000 */ + 0xf0, 0x97, 0xbf, 0xbe /* 17FFE */ + }; + static const UChar32 cp[]={ + 0xdf, 0xd7ff, 0xd801, 0xdffe, 0xe000, 0x17ffe + }; + + UChar32 cu, cs, cl; + int32_t i, j, k, iu, is, il, length; + + k=0; /* index into cp[] */ + length=LENGTHOF(b); + for(i=0; i<length;) { + j=i; + U8_NEXT_UNSAFE(b, j, cu); + iu=j; + + j=i; + U8_NEXT(b, j, length, cs); + is=j; + + j=i; + L8_NEXT(b, j, length, cl); + il=j; + + if(cu!=cp[k]) { + log_err("U8_NEXT_UNSAFE(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cu, (long)cp[k]); + } + + /* U8_NEXT() returns <0 for surrogate code points */ + if(U_IS_SURROGATE(cu) ? cs>=0 : cs!=cu) { + log_err("U8_NEXT(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cs, (long)cu); + } + + /* L8_NEXT() returns surrogate code points like U8_NEXT_UNSAFE() */ + if(cl!=cu) { + log_err("L8_NEXT(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cl, (long)cu); + } + + if(is!=iu || il!=iu) { + log_err("U8_NEXT(b[%ld]) or L8_NEXT(b[%ld]) did not advance the index correctly\n", (long)i, (long)i); + } + + ++k; /* next code point */ + i=iu; /* advance by one UTF-8 sequence */ + } + + while(i>0) { + --k; /* previous code point */ + + j=i; + U8_PREV_UNSAFE(b, j, cu); + iu=j; + + j=i; + U8_PREV(b, 0, j, cs); + is=j; + + j=i; + L8_PREV(b, 0, j, cl); + il=j; + + if(cu!=cp[k]) { + log_err("U8_PREV_UNSAFE(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cu, (long)cp[k]); + } + + /* U8_PREV() returns <0 for surrogate code points */ + if(U_IS_SURROGATE(cu) ? cs>=0 : cs!=cu) { + log_err("U8_PREV(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cs, (long)cu); + } + + /* L8_PREV() returns surrogate code points like U8_PREV_UNSAFE() */ + if(cl!=cu) { + log_err("L8_PREV(b[%ld])=U+%04lX != U+%04lX\n", (long)i, (long)cl, (long)cu); + } + + if(is!=iu || il !=iu) { + log_err("U8_PREV(b[%ld]) or L8_PREV(b[%ld]) did not advance the index correctly\n", (long)i, (long)i); + } + + i=iu; /* go back by one UTF-8 sequence */ + } +} + static void printUChars(const uint8_t *uchars, int16_t len){ int16_t i=0; for(i=0; i<len; i++){ diff --git a/Build/source/libs/icu-xetex/test/cintltst/utmstest.c b/Build/source/libs/icu-xetex/test/cintltst/utmstest.c index f68b5bdd461..93c0c330deb 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/utmstest.c +++ b/Build/source/libs/icu-xetex/test/cintltst/utmstest.c @@ -1,6 +1,6 @@ /* **************************************************************************** - * Copyright (c) 1997-2004, International Business Machines Corporation and * + * Copyright (c) 1997-2006, International Business Machines Corporation and * * others. All Rights Reserved. * **************************************************************************** */ @@ -10,17 +10,21 @@ #if !UCONFIG_NO_FORMATTING #include "unicode/utmscale.h" +#include "unicode/ucal.h" #include "cintltst.h" #include <stdlib.h> #include <time.h> +#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) + #define LOOP_COUNT 10000 static void TestAPI(void); static void TestData(void); static void TestMonkey(void); +static void TestDotNet(void); void addUtmsTest(TestNode** root); @@ -29,6 +33,7 @@ void addUtmsTest(TestNode** root) addTest(root, &TestAPI, "tsformat/utmstest/TestAPI"); addTest(root, &TestData, "tsformat/utmstest/TestData"); addTest(root, &TestMonkey, "tsformat/utmstest/TestMonkey"); + addTest(root, &TestDotNet, "tsformat/utmstest/TestDotNet"); } /** @@ -339,4 +344,143 @@ static void TestMonkey(void) } } +struct DotNetDateTimeTicks { + int32_t year; + int32_t month; + int32_t day; + int64_t ticks; +}; +typedef struct DotNetDateTimeTicks DotNetDateTimeTicks; + +/* + * This data was generated by C++.Net code like + * Console::WriteLine(L" {{ {0}, 1, 1, INT64_C({1}) }},", year, DateTime(year, 1, 1).Ticks); + * with the DateTime constructor taking int values for year, month, and date. + */ +static const DotNetDateTimeTicks dotNetDateTimeTicks[]={ + /* year, month, day, ticks */ + { 100, 1, 1, INT64_C(31241376000000000) }, + { 100, 3, 1, INT64_C(31292352000000000) }, + { 200, 1, 1, INT64_C(62798112000000000) }, + { 200, 3, 1, INT64_C(62849088000000000) }, + { 300, 1, 1, INT64_C(94354848000000000) }, + { 300, 3, 1, INT64_C(94405824000000000) }, + { 400, 1, 1, INT64_C(125911584000000000) }, + { 400, 3, 1, INT64_C(125963424000000000) }, + { 500, 1, 1, INT64_C(157469184000000000) }, + { 500, 3, 1, INT64_C(157520160000000000) }, + { 600, 1, 1, INT64_C(189025920000000000) }, + { 600, 3, 1, INT64_C(189076896000000000) }, + { 700, 1, 1, INT64_C(220582656000000000) }, + { 700, 3, 1, INT64_C(220633632000000000) }, + { 800, 1, 1, INT64_C(252139392000000000) }, + { 800, 3, 1, INT64_C(252191232000000000) }, + { 900, 1, 1, INT64_C(283696992000000000) }, + { 900, 3, 1, INT64_C(283747968000000000) }, + { 1000, 1, 1, INT64_C(315253728000000000) }, + { 1000, 3, 1, INT64_C(315304704000000000) }, + { 1100, 1, 1, INT64_C(346810464000000000) }, + { 1100, 3, 1, INT64_C(346861440000000000) }, + { 1200, 1, 1, INT64_C(378367200000000000) }, + { 1200, 3, 1, INT64_C(378419040000000000) }, + { 1300, 1, 1, INT64_C(409924800000000000) }, + { 1300, 3, 1, INT64_C(409975776000000000) }, + { 1400, 1, 1, INT64_C(441481536000000000) }, + { 1400, 3, 1, INT64_C(441532512000000000) }, + { 1500, 1, 1, INT64_C(473038272000000000) }, + { 1500, 3, 1, INT64_C(473089248000000000) }, + { 1600, 1, 1, INT64_C(504595008000000000) }, + { 1600, 3, 1, INT64_C(504646848000000000) }, + { 1700, 1, 1, INT64_C(536152608000000000) }, + { 1700, 3, 1, INT64_C(536203584000000000) }, + { 1800, 1, 1, INT64_C(567709344000000000) }, + { 1800, 3, 1, INT64_C(567760320000000000) }, + { 1900, 1, 1, INT64_C(599266080000000000) }, + { 1900, 3, 1, INT64_C(599317056000000000) }, + { 2000, 1, 1, INT64_C(630822816000000000) }, + { 2000, 3, 1, INT64_C(630874656000000000) }, + { 2100, 1, 1, INT64_C(662380416000000000) }, + { 2100, 3, 1, INT64_C(662431392000000000) }, + { 2200, 1, 1, INT64_C(693937152000000000) }, + { 2200, 3, 1, INT64_C(693988128000000000) }, + { 2300, 1, 1, INT64_C(725493888000000000) }, + { 2300, 3, 1, INT64_C(725544864000000000) }, + { 2400, 1, 1, INT64_C(757050624000000000) }, + { 2400, 3, 1, INT64_C(757102464000000000) }, + { 2500, 1, 1, INT64_C(788608224000000000) }, + { 2500, 3, 1, INT64_C(788659200000000000) }, + { 2600, 1, 1, INT64_C(820164960000000000) }, + { 2600, 3, 1, INT64_C(820215936000000000) }, + { 2700, 1, 1, INT64_C(851721696000000000) }, + { 2700, 3, 1, INT64_C(851772672000000000) }, + { 2800, 1, 1, INT64_C(883278432000000000) }, + { 2800, 3, 1, INT64_C(883330272000000000) }, + { 2900, 1, 1, INT64_C(914836032000000000) }, + { 2900, 3, 1, INT64_C(914887008000000000) }, + { 3000, 1, 1, INT64_C(946392768000000000) }, + { 3000, 3, 1, INT64_C(946443744000000000) }, + { 1, 1, 1, INT64_C(0) }, + { 1601, 1, 1, INT64_C(504911232000000000) }, + { 1899, 12, 31, INT64_C(599265216000000000) }, + { 1904, 1, 1, INT64_C(600527520000000000) }, + { 1970, 1, 1, INT64_C(621355968000000000) }, + { 2001, 1, 1, INT64_C(631139040000000000) }, + { 9900, 3, 1, INT64_C(3123873216000000000) }, + { 9999, 12, 31, INT64_C(3155378112000000000) } +}; + +/* + * ICU's Universal Time Scale is designed to be tick-for-tick compatible with + * .Net System.DateTime. Verify that this is so for the + * .Net-supported date range (years 1-9999 AD). + * This requires a proleptic Gregorian calendar because that's what .Net uses. + * Proleptic: No Julian/Gregorian switchover, or a switchover before + * any date that we test, that is, before 0001 AD. + */ +static void +TestDotNet() { + static const UChar utc[] = { 0x45, 0x74, 0x63, 0x2f, 0x47, 0x4d, 0x54, 0 }; /* "Etc/GMT" */ + const int32_t dayMillis = 86400 * INT64_C(1000); /* 1 day = 86400 seconds */ + const int64_t dayTicks = 86400 * INT64_C(10000000); + const DotNetDateTimeTicks *dt; + UCalendar *cal; + UErrorCode errorCode; + UDate icuDate; + int64_t ticks, millis; + int32_t i; + + /* Open a proleptic Gregorian calendar. */ + errorCode = U_ZERO_ERROR; + cal = ucal_open(utc, -1, "", UCAL_GREGORIAN, &errorCode); + ucal_setGregorianChange(cal, -1000000 * (dayMillis * (UDate)1), &errorCode); + if(U_FAILURE(errorCode)) { + log_err("ucal_open(UTC/proleptic Gregorian) failed: %s\n", u_errorName(errorCode)); + ucal_close(cal); + return; + } + for(i = 0; i < LENGTHOF(dotNetDateTimeTicks); ++i) { + /* Test conversion from .Net/Universal time to ICU time. */ + dt = dotNetDateTimeTicks + i; + millis = utmscale_toInt64(dt->ticks, UDTS_ICU4C_TIME, &errorCode); + ucal_clear(cal); + ucal_setDate(cal, dt->year, dt->month - 1, dt->day, &errorCode); /* Java & ICU use January = month 0. */ + icuDate = ucal_getMillis(cal, &errorCode); + if(millis != icuDate) { + /* Print days not millis to stay within printf() range. */ + log_err("utmscale_toInt64(ticks[%d], ICU4C)=%dd != %dd=ucal_getMillis(%04d-%02d-%02d)\n", + (int)i, (int)(millis/dayMillis), (int)(icuDate/dayMillis), (int)dt->year, (int)dt->month, (int)dt->day); + } + + /* Test conversion from ICU time to .Net/Universal time. */ + ticks = utmscale_fromInt64((int64_t)icuDate, UDTS_ICU4C_TIME, &errorCode); + if(ticks != dt->ticks) { + /* Print days not ticks to stay within printf() range. */ + log_err("utmscale_fromInt64(date[%d], ICU4C)=%dd != %dd=.Net System.DateTime(%04d-%02d-%02d).Ticks\n", + (int)i, (int)(ticks/dayTicks), (int)(dt->ticks/dayTicks), (int)dt->year, (int)dt->month, (int)dt->day); + } + } + + ucal_close(cal); +} + #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/Build/source/libs/icu-xetex/test/cintltst/utransts.c b/Build/source/libs/icu-xetex/test/cintltst/utransts.c index b472fe16a62..ec99292aa9f 100644 --- a/Build/source/libs/icu-xetex/test/cintltst/utransts.c +++ b/Build/source/libs/icu-xetex/test/cintltst/utransts.c @@ -1,6 +1,6 @@ /* ******************************************************************************* - * Copyright (C) 1997-2004, International Business Machines + * Copyright (C) 1997-2006, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * Date Name Description @@ -605,6 +605,7 @@ static void _expect(const UTransliterator* trans, int32_t limit; UTransPosition pos; XReplaceable xrep; + XReplaceable *xrepPtr = &xrep; UReplaceableCallbacks xrepVtable; u_uastrcpy(from, cfrom); @@ -659,7 +660,7 @@ static void _expect(const UTransliterator* trans, InitXReplaceableCallbacks(&xrepVtable); InitXReplaceable(&xrep, cfrom); limit = u_strlen(from); - utrans_trans(trans, (UReplaceable*)&xrep, &xrepVtable, 0, &limit, &status); + utrans_trans(trans, (UReplaceable*)xrepPtr, &xrepVtable, 0, &limit, &status); if (U_FAILURE(status)) { log_err("FAIL: utrans_trans() failed, error=%s\n", u_errorName(status)); @@ -682,8 +683,8 @@ static void _expect(const UTransliterator* trans, InitXReplaceable(&xrep, cfrom); pos.start = pos.contextStart = 0; pos.limit = pos.contextLimit = u_strlen(from); - utrans_transIncremental(trans, (UReplaceable*)&xrep, &xrepVtable, &pos, &status); - utrans_trans(trans, (UReplaceable*)&xrep, &xrepVtable, pos.start, &pos.limit, &status); + utrans_transIncremental(trans, (UReplaceable*)xrepPtr, &xrepVtable, &pos, &status); + utrans_trans(trans, (UReplaceable*)xrepPtr, &xrepVtable, pos.start, &pos.limit, &status); if (U_FAILURE(status)) { log_err("FAIL: utrans_transIncremental() failed, error=%s\n", u_errorName(status)); diff --git a/Build/source/libs/icu-xetex/test/collperf/.cvsignore b/Build/source/libs/icu-xetex/test/collperf/.cvsignore deleted file mode 100644 index f3c7a7c5da6..00000000000 --- a/Build/source/libs/icu-xetex/test/collperf/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/Build/source/libs/icu-xetex/test/collperf/collperf.cpp b/Build/source/libs/icu-xetex/test/collperf/collperf.cpp deleted file mode 100644 index 05edc2ec18e..00000000000 --- a/Build/source/libs/icu-xetex/test/collperf/collperf.cpp +++ /dev/null @@ -1,1749 +0,0 @@ -/******************************************************************** - * COPYRIGHT: - * Copyright (C) 2001-2005 IBM, Inc. All Rights Reserved. - * - ********************************************************************/ -/******************************************************************************** -* -* File CALLCOLL.C -* -* Modification History: -* Name Description -* Andy Heninger First Version -* -********************************************************************************* -*/ - -// -// This program tests string collation and sort key generation performance. -// Three APIs can be teste: ICU C , Unix strcoll, strxfrm and Windows LCMapString -// A file of names is required as input, one per line. It must be in utf-8 or utf-16 format, -// and include a byte order mark. Either LE or BE format is OK. -// - -const char gUsageString[] = - "usage: collperf options...\n" - "-help Display this message.\n" - "-file file_name utf-16 format file of names.\n" - "-locale name ICU locale to use. Default is en_US\n" - "-rules file_name Collation rules file (overrides locale)\n" - "-langid 0x1234 Windows Language ID number. Default to value for -locale option\n" - " see http://msdn.microsoft.com/library/psdk/winbase/nls_8xo3.htm\n" - "-win Run test using Windows native services. (ICU is default)\n" - "-unix Run test using Unix strxfrm, strcoll services.\n" - "-uselen Use API with string lengths. Default is null-terminated strings\n" - "-usekeys Run tests using sortkeys rather than strcoll\n" - "-strcmp Run tests using u_strcmp rather than strcoll\n" - "-strcmpCPO Run tests using u_strcmpCodePointOrder rather than strcoll\n" - "-loop nnnn Loopcount for test. Adjust for reasonable total running time.\n" - "-iloop n Inner Loop Count. Default = 1. Number of calls to function\n" - " under test at each call point. For measuring test overhead.\n" - "-terse Terse numbers-only output. Intended for use by scripts.\n" - "-french French accent ordering\n" - "-frenchoff No French accent ordering (for use with French locales.)\n" - "-norm Normalizing mode on\n" - "-shifted Shifted mode\n" - "-lower Lower case first\n" - "-upper Upper case first\n" - "-case Enable separate case level\n" - "-level n Sort level, 1 to 5, for Primary, Secndary, Tertiary, Quaternary, Identical\n" - "-keyhist Produce a table sort key size vs. string length\n" - "-binsearch Binary Search timing test\n" - "-keygen Sort Key Generation timing test\n" - "-qsort Quicksort timing test\n" - "-iter Iteration Performance Test\n" - "-dump Display strings, sort keys and CEs.\n" - ; - - - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <math.h> -#include <locale.h> -#include <errno.h> - -#include <unicode/utypes.h> -#include <unicode/ucol.h> -#include <unicode/ucoleitr.h> -#include <unicode/uloc.h> -#include <unicode/ustring.h> -#include <unicode/ures.h> -#include <unicode/uchar.h> -#include <unicode/ucnv.h> -#include <unicode/utf8.h> - -#ifdef U_WINDOWS -#include <windows.h> -#else -// -// Stubs for Windows API functions when building on UNIXes. -// -typedef int DWORD; -inline int CompareStringW(DWORD, DWORD, UChar *, int, UChar *, int) {return 0;}; -#include <sys/time.h> -unsigned long timeGetTime() { - struct timeval t; - gettimeofday(&t, 0); - unsigned long val = t.tv_sec * 1000; // Let it overflow. Who cares. - val += t.tv_usec / 1000; - return val; -}; -inline int LCMapStringW(DWORD, DWORD, UChar *, int, UChar *, int) {return 0;}; -const int LCMAP_SORTKEY = 0; -#define MAKELCID(a,b) 0 -const int SORT_DEFAULT = 0; -#endif - - - -// -// Command line option variables -// These global variables are set according to the options specified -// on the command line by the user. -char * opt_fName = 0; -char * opt_locale = "en_US"; -int opt_langid = 0; // Defaults to value corresponding to opt_locale. -char * opt_rules = 0; -UBool opt_help = FALSE; -int opt_loopCount = 1; -int opt_iLoopCount = 1; -UBool opt_terse = FALSE; -UBool opt_qsort = FALSE; -UBool opt_binsearch = FALSE; -UBool opt_icu = TRUE; -UBool opt_win = FALSE; // Run with Windows native functions. -UBool opt_unix = FALSE; // Run with UNIX strcoll, strxfrm functions. -UBool opt_uselen = FALSE; -UBool opt_usekeys = FALSE; -UBool opt_strcmp = FALSE; -UBool opt_strcmpCPO = FALSE; -UBool opt_norm = FALSE; -UBool opt_keygen = FALSE; -UBool opt_french = FALSE; -UBool opt_frenchoff = FALSE; -UBool opt_shifted = FALSE; -UBool opt_lower = FALSE; -UBool opt_upper = FALSE; -UBool opt_case = FALSE; -int opt_level = 0; -UBool opt_keyhist = FALSE; -UBool opt_itertest = FALSE; -UBool opt_dump = FALSE; - - - -// -// Definitions for the command line options -// -struct OptSpec { - const char *name; - enum {FLAG, NUM, STRING} type; - void *pVar; -}; - -OptSpec opts[] = { - {"-file", OptSpec::STRING, &opt_fName}, - {"-locale", OptSpec::STRING, &opt_locale}, - {"-langid", OptSpec::NUM, &opt_langid}, - {"-rules", OptSpec::STRING, &opt_rules}, - {"-qsort", OptSpec::FLAG, &opt_qsort}, - {"-binsearch", OptSpec::FLAG, &opt_binsearch}, - {"-iter", OptSpec::FLAG, &opt_itertest}, - {"-win", OptSpec::FLAG, &opt_win}, - {"-unix", OptSpec::FLAG, &opt_unix}, - {"-uselen", OptSpec::FLAG, &opt_uselen}, - {"-usekeys", OptSpec::FLAG, &opt_usekeys}, - {"-strcmp", OptSpec::FLAG, &opt_strcmp}, - {"-strcmpCPO", OptSpec::FLAG, &opt_strcmpCPO}, - {"-norm", OptSpec::FLAG, &opt_norm}, - {"-french", OptSpec::FLAG, &opt_french}, - {"-frenchoff", OptSpec::FLAG, &opt_frenchoff}, - {"-shifted", OptSpec::FLAG, &opt_shifted}, - {"-lower", OptSpec::FLAG, &opt_lower}, - {"-upper", OptSpec::FLAG, &opt_upper}, - {"-case", OptSpec::FLAG, &opt_case}, - {"-level", OptSpec::NUM, &opt_level}, - {"-keyhist", OptSpec::FLAG, &opt_keyhist}, - {"-keygen", OptSpec::FLAG, &opt_keygen}, - {"-loop", OptSpec::NUM, &opt_loopCount}, - {"-iloop", OptSpec::NUM, &opt_iLoopCount}, - {"-terse", OptSpec::FLAG, &opt_terse}, - {"-dump", OptSpec::FLAG, &opt_dump}, - {"-help", OptSpec::FLAG, &opt_help}, - {"-?", OptSpec::FLAG, &opt_help}, - {0, OptSpec::FLAG, 0} -}; - - -//--------------------------------------------------------------------------- -// -// Global variables pointing to and describing the test file -// -//--------------------------------------------------------------------------- - -// -// struct Line -// -// Each line from the source file (containing a name, presumably) gets -// one of these structs. -// -struct Line { - UChar *name; - int len; - char *winSortKey; - char *icuSortKey; - char *unixSortKey; - char *unixName; -}; - - - -Line *gFileLines; // Ptr to array of Line structs, one per line in the file. -int gNumFileLines; -UCollator *gCol; -DWORD gWinLCID; - -Line **gSortedLines; -Line **gRandomLines; -int gCount; - - - -//--------------------------------------------------------------------------- -// -// ProcessOptions() Function to read the command line options. -// -//--------------------------------------------------------------------------- -UBool ProcessOptions(int argc, const char **argv, OptSpec opts[]) -{ - int i; - int argNum; - const char *pArgName; - OptSpec *pOpt; - - for (argNum=1; argNum<argc; argNum++) { - pArgName = argv[argNum]; - for (pOpt = opts; pOpt->name != 0; pOpt++) { - if (strcmp(pOpt->name, pArgName) == 0) { - switch (pOpt->type) { - case OptSpec::FLAG: - *(UBool *)(pOpt->pVar) = TRUE; - break; - case OptSpec::STRING: - argNum ++; - if (argNum >= argc) { - fprintf(stderr, "value expected for \"%s\" option.\n", pOpt->name); - return FALSE; - } - *(const char **)(pOpt->pVar) = argv[argNum]; - break; - case OptSpec::NUM: - argNum ++; - if (argNum >= argc) { - fprintf(stderr, "value expected for \"%s\" option.\n", pOpt->name); - return FALSE; - } - char *endp; - i = strtol(argv[argNum], &endp, 0); - if (endp == argv[argNum]) { - fprintf(stderr, "integer value expected for \"%s\" option.\n", pOpt->name); - return FALSE; - } - *(int *)(pOpt->pVar) = i; - } - break; - } - } - if (pOpt->name == 0) - { - fprintf(stderr, "Unrecognized option \"%s\"\n", pArgName); - return FALSE; - } - } -return TRUE; -} - -//--------------------------------------------------------------------------------------- -// -// Comparison functions for use by qsort. -// -// Six flavors, ICU or Windows, SortKey or String Compare, Strings with length -// or null terminated. -// -//--------------------------------------------------------------------------------------- -int ICUstrcmpK(const void *a, const void *b) { - gCount++; - int t = strcmp((*(Line **)a)->icuSortKey, (*(Line **)b)->icuSortKey); - return t; -} - - -int ICUstrcmpL(const void *a, const void *b) { - gCount++; - UCollationResult t; - t = ucol_strcoll(gCol, (*(Line **)a)->name, (*(Line **)a)->len, (*(Line **)b)->name, (*(Line **)b)->len); - if (t == UCOL_LESS) return -1; - if (t == UCOL_GREATER) return +1; - return 0; -} - - -int ICUstrcmp(const void *a, const void *b) { - gCount++; - UCollationResult t; - t = ucol_strcoll(gCol, (*(Line **)a)->name, -1, (*(Line **)b)->name, -1); - if (t == UCOL_LESS) return -1; - if (t == UCOL_GREATER) return +1; - return 0; -} - - -int Winstrcmp(const void *a, const void *b) { - gCount++; - int t; - t = CompareStringW(gWinLCID, 0, (*(Line **)a)->name, -1, (*(Line **)b)->name, -1); - return t-2; -} - - -int UNIXstrcmp(const void *a, const void *b) { - gCount++; - int t; - t = strcoll((*(Line **)a)->unixName, (*(Line **)b)->unixName); - return t; -} - - -int WinstrcmpL(const void *a, const void *b) { - gCount++; - int t; - t = CompareStringW(gWinLCID, 0, (*(Line **)a)->name, (*(Line **)a)->len, (*(Line **)b)->name, (*(Line **)b)->len); - return t-2; -} - - -int WinstrcmpK(const void *a, const void *b) { - gCount++; - int t = strcmp((*(Line **)a)->winSortKey, (*(Line **)b)->winSortKey); - return t; -} - - -//--------------------------------------------------------------------------------------- -// -// Function for sorting the names (lines) into a random order. -// Order is based on a hash of the ICU Sort key for the lines -// The randomized order is used as input for the sorting timing tests. -// -//--------------------------------------------------------------------------------------- -int ICURandomCmp(const void *a, const void *b) { - char *ask = (*(Line **)a)->icuSortKey; - char *bsk = (*(Line **)b)->icuSortKey; - int aVal = 0; - int bVal = 0; - int retVal; - while (*ask != 0) { - aVal += aVal*37 + *ask++; - } - while (*bsk != 0) { - bVal += bVal*37 + *bsk++; - } - retVal = -1; - if (aVal == bVal) { - retVal = 0; - } - else if (aVal > bVal) { - retVal = 1; - } - return retVal; -} - -//--------------------------------------------------------------------------------------- -// -// doKeyGen() Key Generation Timing Test -// -//--------------------------------------------------------------------------------------- -void doKeyGen() -{ - int line; - int loops; - int iLoop; - int t; - int len=-1; - - // Adjust loop count to compensate for file size. Should be order n - double dLoopCount = double(opt_loopCount) * (1000. / double(gNumFileLines)); - int adj_loopCount = int(dLoopCount); - if (adj_loopCount < 1) adj_loopCount = 1; - - - unsigned long startTime = timeGetTime(); - - if (opt_win) { - for (loops=0; loops<adj_loopCount; loops++) { - for (line=0; line < gNumFileLines; line++) { - if (opt_uselen) { - len = gFileLines[line].len; - } - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - t=LCMapStringW(gWinLCID, LCMAP_SORTKEY, - gFileLines[line].name, len, - (unsigned short *)gFileLines[line].winSortKey, 5000); // TODO something with length. - } - } - } - } - else if (opt_icu) - { - for (loops=0; loops<adj_loopCount; loops++) { - for (line=0; line < gNumFileLines; line++) { - if (opt_uselen) { - len = gFileLines[line].len; - } - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - t = ucol_getSortKey(gCol, gFileLines[line].name, len, (unsigned char *)gFileLines[line].icuSortKey, 5000); - } - } - } - } - else if (opt_unix) - { - for (loops=0; loops<adj_loopCount; loops++) { - for (line=0; line < gNumFileLines; line++) { - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - t = strxfrm(gFileLines[line].unixSortKey, gFileLines[line].unixName, 5000); - } - } - } - } - - unsigned long elapsedTime = timeGetTime() - startTime; - int ns = (int)(float(1000000) * (float)elapsedTime / (float)(adj_loopCount*gNumFileLines)); - - if (opt_terse == FALSE) { - printf("Sort Key Generation: total # of keys = %d\n", loops*gNumFileLines); - printf("Sort Key Generation: time per key = %d ns\n", ns); - } - else { - printf("%d, ", ns); - } - - int totalKeyLen = 0; - int totalChars = 0; - for (line=0; line<gNumFileLines; line++) { - totalChars += u_strlen(gFileLines[line].name); - if (opt_win) { - totalKeyLen += strlen(gFileLines[line].winSortKey); - } - else if (opt_icu) { - totalKeyLen += strlen(gFileLines[line].icuSortKey); - } - else if (opt_unix) { - totalKeyLen += strlen(gFileLines[line].unixSortKey); - } - - } - if (opt_terse == FALSE) { - printf("Key Length / character = %f\n", (float)totalKeyLen / (float)totalChars); - } else { - printf("%f, ", (float)totalKeyLen / (float)totalChars); - } -} - - - -//--------------------------------------------------------------------------------------- -// -// doBinarySearch() Binary Search timing test. Each name from the list -// is looked up in the full sorted list of names. -// -//--------------------------------------------------------------------------------------- -void doBinarySearch() -{ - - gCount = 0; - int line; - int loops; - int iLoop; - unsigned long elapsedTime; - - // Adjust loop count to compensate for file size. Should be order n (lookups) * log n (compares/lookup) - // Accurate timings do not depend on this being perfect. The correction is just to try to - // get total running times of about the right order, so the that user doesn't need to - // manually adjust the loop count for every different file size. - double dLoopCount = double(opt_loopCount) * 3000. / (log10(gNumFileLines) * double(gNumFileLines)); - if (opt_usekeys) dLoopCount *= 5; - int adj_loopCount = int(dLoopCount); - if (adj_loopCount < 1) adj_loopCount = 1; - - - for (;;) { // not really a loop, just allows "break" to work, to simplify - // inadvertantly running more than one test through here. - if (opt_strcmp || opt_strcmpCPO) - { - unsigned long startTime = timeGetTime(); - typedef int32_t (U_EXPORT2 *PF)(const UChar *, const UChar *); - PF pf = u_strcmp; - if (opt_strcmpCPO) {pf = u_strcmpCodePointOrder;} - if (opt_strcmp && opt_win) {pf = (PF)wcscmp;} // Damn the difference between int32_t and int - // which forces the use of a cast here. - - int r; - for (loops=0; loops<adj_loopCount; loops++) { - - for (line=0; line < gNumFileLines; line++) { - int hi = gNumFileLines-1; - int lo = 0; - int guess = -1; - for (;;) { - int newGuess = (hi + lo) / 2; - if (newGuess == guess) - break; - guess = newGuess; - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - r = (*pf)((gSortedLines[line])->name, (gSortedLines[guess])->name); - } - gCount++; - if (r== 0) - break; - if (r < 0) - hi = guess; - else - lo = guess; - } - } - } - elapsedTime = timeGetTime() - startTime; - break; - } - - - if (opt_icu) - { - unsigned long startTime = timeGetTime(); - UCollationResult r; - for (loops=0; loops<adj_loopCount; loops++) { - - for (line=0; line < gNumFileLines; line++) { - int lineLen = -1; - int guessLen = -1; - if (opt_uselen) { - lineLen = (gSortedLines[line])->len; - } - int hi = gNumFileLines-1; - int lo = 0; - int guess = -1; - for (;;) { - int newGuess = (hi + lo) / 2; - if (newGuess == guess) - break; - guess = newGuess; - int ri; - if (opt_usekeys) { - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - ri = strcmp((gSortedLines[line])->icuSortKey, (gSortedLines[guess])->icuSortKey); - } - gCount++; - r=UCOL_GREATER; if(ri<0) {r=UCOL_LESS;} else if (ri==0) {r=UCOL_EQUAL;} - } - else - { - if (opt_uselen) { - guessLen = (gSortedLines[guess])->len; - } - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - r = ucol_strcoll(gCol, (gSortedLines[line])->name, lineLen, (gSortedLines[guess])->name, guessLen); - } - gCount++; - } - if (r== UCOL_EQUAL) - break; - if (r == UCOL_LESS) - hi = guess; - else - lo = guess; - } - } - } - elapsedTime = timeGetTime() - startTime; - break; - } - - if (opt_win) - { - unsigned long startTime = timeGetTime(); - int r; - for (loops=0; loops<adj_loopCount; loops++) { - - for (line=0; line < gNumFileLines; line++) { - int lineLen = -1; - int guessLen = -1; - if (opt_uselen) { - lineLen = (gSortedLines[line])->len; - } - int hi = gNumFileLines-1; - int lo = 0; - int guess = -1; - for (;;) { - int newGuess = (hi + lo) / 2; - if (newGuess == guess) - break; - guess = newGuess; - if (opt_usekeys) { - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - r = strcmp((gSortedLines[line])->winSortKey, (gSortedLines[guess])->winSortKey); - } - gCount++; - r+=2; - } - else - { - if (opt_uselen) { - guessLen = (gSortedLines[guess])->len; - } - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - r = CompareStringW(gWinLCID, 0, (gSortedLines[line])->name, lineLen, (gSortedLines[guess])->name, guessLen); - } - if (r == 0) { - if (opt_terse == FALSE) { - fprintf(stderr, "Error returned from Windows CompareStringW.\n"); - } - exit(-1); - } - gCount++; - } - if (r== 2) // strings == - break; - if (r == 1) // line < guess - hi = guess; - else // line > guess - lo = guess; - } - } - } - elapsedTime = timeGetTime() - startTime; - break; - } - - if (opt_unix) - { - unsigned long startTime = timeGetTime(); - int r; - for (loops=0; loops<adj_loopCount; loops++) { - - for (line=0; line < gNumFileLines; line++) { - int hi = gNumFileLines-1; - int lo = 0; - int guess = -1; - for (;;) { - int newGuess = (hi + lo) / 2; - if (newGuess == guess) - break; - guess = newGuess; - if (opt_usekeys) { - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - r = strcmp((gSortedLines[line])->unixSortKey, (gSortedLines[guess])->unixSortKey); - } - gCount++; - } - else - { - for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) { - r = strcoll((gSortedLines[line])->unixName, (gSortedLines[guess])->unixName); - } - errno = 0; - if (errno != 0) { - fprintf(stderr, "Error %d returned from strcoll.\n", errno); - exit(-1); - } - gCount++; - } - if (r == 0) // strings == - break; - if (r < 0) // line < guess - hi = guess; - else // line > guess - lo = guess; - } - } - } - elapsedTime = timeGetTime() - startTime; - break; - } - break; - } - - int ns = (int)(float(1000000) * (float)elapsedTime / (float)gCount); - if (opt_terse == FALSE) { - printf("binary search: total # of string compares = %d\n", gCount); - printf("binary search: compares per loop = %d\n", gCount / loops); - printf("binary search: time per compare = %d ns\n", ns); - } else { - printf("%d, ", ns); - } - -} - - - - -//--------------------------------------------------------------------------------------- -// -// doQSort() The quick sort timing test. Uses the C library qsort function. -// -//--------------------------------------------------------------------------------------- -void doQSort() { - int i; - Line **sortBuf = new Line *[gNumFileLines]; - - // Adjust loop count to compensate for file size. QSort should be n log(n) - double dLoopCount = double(opt_loopCount) * 3000. / (log10(gNumFileLines) * double(gNumFileLines)); - if (opt_usekeys) dLoopCount *= 5; - int adj_loopCount = int(dLoopCount); - if (adj_loopCount < 1) adj_loopCount = 1; - - - gCount = 0; - unsigned long startTime = timeGetTime(); - if (opt_win && opt_usekeys) { - for (i=0; i<opt_loopCount; i++) { - memcpy(sortBuf, gRandomLines, gNumFileLines * sizeof(Line *)); - qsort(sortBuf, gNumFileLines, sizeof(Line *), WinstrcmpK); - } - } - - else if (opt_win && opt_uselen) { - for (i=0; i<adj_loopCount; i++) { - memcpy(sortBuf, gRandomLines, gNumFileLines * sizeof(Line *)); - qsort(sortBuf, gNumFileLines, sizeof(Line *), WinstrcmpL); - } - } - - - else if (opt_win && !opt_uselen) { - for (i=0; i<adj_loopCount; i++) { - memcpy(sortBuf, gRandomLines, gNumFileLines * sizeof(Line *)); - qsort(sortBuf, gNumFileLines, sizeof(Line *), Winstrcmp); - } - } - - else if (opt_icu && opt_usekeys) { - for (i=0; i<adj_loopCount; i++) { - memcpy(sortBuf, gRandomLines, gNumFileLines * sizeof(Line *)); - qsort(sortBuf, gNumFileLines, sizeof(Line *), ICUstrcmpK); - } - } - - else if (opt_icu && opt_uselen) { - for (i=0; i<adj_loopCount; i++) { - memcpy(sortBuf, gRandomLines, gNumFileLines * sizeof(Line *)); - qsort(sortBuf, gNumFileLines, sizeof(Line *), ICUstrcmpL); - } - } - - - else if (opt_icu && !opt_uselen) { - for (i=0; i<adj_loopCount; i++) { - memcpy(sortBuf, gRandomLines, gNumFileLines * sizeof(Line *)); - qsort(sortBuf, gNumFileLines, sizeof(Line *), ICUstrcmp); - } - } - - else if (opt_unix && !opt_usekeys) { - for (i=0; i<adj_loopCount; i++) { - memcpy(sortBuf, gRandomLines, gNumFileLines * sizeof(Line *)); - qsort(sortBuf, gNumFileLines, sizeof(Line *), UNIXstrcmp); - } - } - - unsigned long elapsedTime = timeGetTime() - startTime; - int ns = (int)(float(1000000) * (float)elapsedTime / (float)gCount); - if (opt_terse == FALSE) { - printf("qsort: total # of string compares = %d\n", gCount); - printf("qsort: time per compare = %d ns\n", ns); - } else { - printf("%d, ", ns); - } -}; - - - -//--------------------------------------------------------------------------------------- -// -// doKeyHist() Output a table of data for -// average sort key size vs. string length. -// -//--------------------------------------------------------------------------------------- -void doKeyHist() { - int i; - int maxLen = 0; - - // Find the maximum string length - for (i=0; i<gNumFileLines; i++) { - if (gFileLines[i].len > maxLen) maxLen = gFileLines[i].len; - } - - // Allocate arrays to hold the histogram data - int *accumulatedLen = new int[maxLen+1]; - int *numKeysOfSize = new int[maxLen+1]; - for (i=0; i<=maxLen; i++) { - accumulatedLen[i] = 0; - numKeysOfSize[i] = 0; - } - - // Fill the arrays... - for (i=0; i<gNumFileLines; i++) { - int len = gFileLines[i].len; - accumulatedLen[len] += strlen(gFileLines[i].icuSortKey); - numKeysOfSize[len] += 1; - } - - // And write out averages - printf("String Length, Avg Key Length, Avg Key Len per char\n"); - for (i=1; i<=maxLen; i++) { - if (numKeysOfSize[i] > 0) { - printf("%d, %f, %f\n", i, (float)accumulatedLen[i] / (float)numKeysOfSize[i], - (float)accumulatedLen[i] / (float)(numKeysOfSize[i] * i)); - } - } -} - -//--------------------------------------------------------------------------------------- -// -// doForwardIterTest(UBool) Forward iteration test -// argument null-terminated string used -// -//--------------------------------------------------------------------------------------- -void doForwardIterTest(UBool haslen) { - int count = 0; - - UErrorCode error = U_ZERO_ERROR; - printf("\n\nPerforming forward iteration performance test with "); - - if (haslen) { - printf("non-null terminated data -----------\n"); - } - else { - printf("null terminated data -----------\n"); - } - printf("performance test on strings from file -----------\n"); - - UChar dummytext[] = {0, 0}; - UCollationElements *iter = ucol_openElements(gCol, NULL, 0, &error); - ucol_setText(iter, dummytext, 1, &error); - - gCount = 0; - unsigned long startTime = timeGetTime(); - while (count < opt_loopCount) { - int linecount = 0; - while (linecount < gNumFileLines) { - UChar *str = gFileLines[linecount].name; - int strlen = haslen?gFileLines[linecount].len:-1; - ucol_setText(iter, str, strlen, &error); - while (ucol_next(iter, &error) != UCOL_NULLORDER) { - gCount++; - } - - linecount ++; - } - count ++; - } - unsigned long elapsedTime = timeGetTime() - startTime; - printf("elapsedTime %d\n", elapsedTime); - - // empty loop recalculation - count = 0; - startTime = timeGetTime(); - while (count < opt_loopCount) { - int linecount = 0; - while (linecount < gNumFileLines) { - UChar *str = gFileLines[linecount].name; - int strlen = haslen?gFileLines[linecount].len:-1; - ucol_setText(iter, str, strlen, &error); - linecount ++; - } - count ++; - } - elapsedTime -= (timeGetTime() - startTime); - printf("elapsedTime %d\n", elapsedTime); - - ucol_closeElements(iter); - - int ns = (int)(float(1000000) * (float)elapsedTime / (float)gCount); - printf("Total number of strings compared %d in %d loops\n", gNumFileLines, - opt_loopCount); - printf("Average time per ucol_next() nano seconds %d\n", ns); - - printf("performance test on skipped-5 concatenated strings from file -----------\n"); - - UChar *str; - int strlen = 0; - // appending all the strings - int linecount = 0; - while (linecount < gNumFileLines) { - strlen += haslen?gFileLines[linecount].len: - u_strlen(gFileLines[linecount].name); - linecount ++; - } - str = (UChar *)malloc(sizeof(UChar) * strlen); - int strindex = 0; - linecount = 0; - while (strindex < strlen) { - int len = 0; - len += haslen?gFileLines[linecount].len: - u_strlen(gFileLines[linecount].name); - memcpy(str + strindex, gFileLines[linecount].name, - sizeof(UChar) * len); - strindex += len; - linecount ++; - } - - printf("Total size of strings %d\n", strlen); - - gCount = 0; - count = 0; - - if (!haslen) { - strlen = -1; - } - iter = ucol_openElements(gCol, str, strlen, &error); - if (!haslen) { - strlen = u_strlen(str); - } - strlen -= 5; // any left over characters are not iterated, - // this is to ensure the backwards and forwards iterators - // gets the same position - startTime = timeGetTime(); - while (count < opt_loopCount) { - int count5 = 5; - strindex = 0; - ucol_setOffset(iter, strindex, &error); - while (TRUE) { - if (ucol_next(iter, &error) == UCOL_NULLORDER) { - break; - } - gCount++; - count5 --; - if (count5 == 0) { - strindex += 10; - if (strindex > strlen) { - break; - } - ucol_setOffset(iter, strindex, &error); - count5 = 5; - } - } - count ++; - } - - elapsedTime = timeGetTime() - startTime; - printf("elapsedTime %d\n", elapsedTime); - - // empty loop recalculation - int tempgCount = 0; - count = 0; - startTime = timeGetTime(); - while (count < opt_loopCount) { - int count5 = 5; - strindex = 0; - ucol_setOffset(iter, strindex, &error); - while (TRUE) { - tempgCount ++; - count5 --; - if (count5 == 0) { - strindex += 10; - if (strindex > strlen) { - break; - } - ucol_setOffset(iter, strindex, &error); - count5 = 5; - } - } - count ++; - } - elapsedTime -= (timeGetTime() - startTime); - printf("elapsedTime %d\n", elapsedTime); - - ucol_closeElements(iter); - - printf("gCount %d\n", gCount); - ns = (int)(float(1000000) * (float)elapsedTime / (float)gCount); - printf("Average time per ucol_next() nano seconds %d\n", ns); -} - -//--------------------------------------------------------------------------------------- -// -// doBackwardIterTest(UBool) Backwards iteration test -// argument null-terminated string used -// -//--------------------------------------------------------------------------------------- -void doBackwardIterTest(UBool haslen) { - int count = 0; - UErrorCode error = U_ZERO_ERROR; - printf("\n\nPerforming backward iteration performance test with "); - - if (haslen) { - printf("non-null terminated data -----------\n"); - } - else { - printf("null terminated data -----------\n"); - } - - printf("performance test on strings from file -----------\n"); - - UCollationElements *iter = ucol_openElements(gCol, NULL, 0, &error); - UChar dummytext[] = {0, 0}; - ucol_setText(iter, dummytext, 1, &error); - - gCount = 0; - unsigned long startTime = timeGetTime(); - while (count < opt_loopCount) { - int linecount = 0; - while (linecount < gNumFileLines) { - UChar *str = gFileLines[linecount].name; - int strlen = haslen?gFileLines[linecount].len:-1; - ucol_setText(iter, str, strlen, &error); - while (ucol_previous(iter, &error) != UCOL_NULLORDER) { - gCount ++; - } - - linecount ++; - } - count ++; - } - unsigned long elapsedTime = timeGetTime() - startTime; - - printf("elapsedTime %d\n", elapsedTime); - - // empty loop recalculation - count = 0; - startTime = timeGetTime(); - while (count < opt_loopCount) { - int linecount = 0; - while (linecount < gNumFileLines) { - UChar *str = gFileLines[linecount].name; - int strlen = haslen?gFileLines[linecount].len:-1; - ucol_setText(iter, str, strlen, &error); - linecount ++; - } - count ++; - } - elapsedTime -= (timeGetTime() - startTime); - - printf("elapsedTime %d\n", elapsedTime); - ucol_closeElements(iter); - - int ns = (int)(float(1000000) * (float)elapsedTime / (float)gCount); - printf("Total number of strings compared %d in %d loops\n", gNumFileLines, - opt_loopCount); - printf("Average time per ucol_previous() nano seconds %d\n", ns); - - printf("performance test on skipped-5 concatenated strings from file -----------\n"); - - UChar *str; - int strlen = 0; - // appending all the strings - int linecount = 0; - while (linecount < gNumFileLines) { - strlen += haslen?gFileLines[linecount].len: - u_strlen(gFileLines[linecount].name); - linecount ++; - } - str = (UChar *)malloc(sizeof(UChar) * strlen); - int strindex = 0; - linecount = 0; - while (strindex < strlen) { - int len = 0; - len += haslen?gFileLines[linecount].len: - u_strlen(gFileLines[linecount].name); - memcpy(str + strindex, gFileLines[linecount].name, - sizeof(UChar) * len); - strindex += len; - linecount ++; - } - - printf("Total size of strings %d\n", strlen); - - gCount = 0; - count = 0; - - if (!haslen) { - strlen = -1; - } - - iter = ucol_openElements(gCol, str, strlen, &error); - if (!haslen) { - strlen = u_strlen(str); - } - - startTime = timeGetTime(); - while (count < opt_loopCount) { - int count5 = 5; - strindex = 5; - ucol_setOffset(iter, strindex, &error); - while (TRUE) { - if (ucol_previous(iter, &error) == UCOL_NULLORDER) { - break; - } - gCount ++; - count5 --; - if (count5 == 0) { - strindex += 10; - if (strindex > strlen) { - break; - } - ucol_setOffset(iter, strindex, &error); - count5 = 5; - } - } - count ++; - } - - elapsedTime = timeGetTime() - startTime; - printf("elapsedTime %d\n", elapsedTime); - - // empty loop recalculation - count = 0; - int tempgCount = 0; - startTime = timeGetTime(); - while (count < opt_loopCount) { - int count5 = 5; - strindex = 5; - ucol_setOffset(iter, strindex, &error); - while (TRUE) { - tempgCount ++; - count5 --; - if (count5 == 0) { - strindex += 10; - if (strindex > strlen) { - break; - } - ucol_setOffset(iter, strindex, &error); - count5 = 5; - } - } - count ++; - } - elapsedTime -= (timeGetTime() - startTime); - printf("elapsedTime %d\n", elapsedTime); - ucol_closeElements(iter); - - printf("gCount %d\n", gCount); - ns = (int)(float(1000000) * (float)elapsedTime / (float)gCount); - printf("Average time per ucol_previous() nano seconds %d\n", ns); -} - -//--------------------------------------------------------------------------------------- -// -// doIterTest() Iteration test -// -//--------------------------------------------------------------------------------------- -void doIterTest() { - doForwardIterTest(opt_uselen); - doBackwardIterTest(opt_uselen); -} - - -//---------------------------------------------------------------------------------------- -// -// UnixConvert -- Convert the lines of the file to the encoding for UNIX -// Since it appears that Unicode support is going in the general -// direction of the use of UTF-8 locales, that is the approach -// that is used here. -// -//---------------------------------------------------------------------------------------- -void UnixConvert() { - int line; - - UConverter *cvrtr; // An ICU code page converter. - UErrorCode status = U_ZERO_ERROR; - - - cvrtr = ucnv_open("utf-8", &status); // we are just doing UTF-8 locales for now. - if (U_FAILURE(status)) { - fprintf(stderr, "ICU Converter open failed.: %d\n", &status); - exit(-1); - } - - for (line=0; line < gNumFileLines; line++) { - int sizeNeeded = ucnv_fromUChars(cvrtr, - 0, // ptr to target buffer. - 0, // length of target buffer. - gFileLines[line].name, - -1, // source is null terminated - &status); - if (status != U_BUFFER_OVERFLOW_ERROR && status != U_ZERO_ERROR) { - fprintf(stderr, "Conversion from Unicode, something is wrong.\n"); - exit(-1); - } - status = U_ZERO_ERROR; - gFileLines[line].unixName = new char[sizeNeeded+1]; - sizeNeeded = ucnv_fromUChars(cvrtr, - gFileLines[line].unixName, // ptr to target buffer. - sizeNeeded+1, // length of target buffer. - gFileLines[line].name, - -1, // source is null terminated - &status); - if (U_FAILURE(status)) { - fprintf(stderr, "ICU Conversion Failed.: %d\n", status); - exit(-1); - } - gFileLines[line].unixName[sizeNeeded] = 0; - }; - ucnv_close(cvrtr); -} - - -//---------------------------------------------------------------------------------------- -// -// class UCharFile Class to hide all the gorp to read a file in -// and produce a stream of UChars. -// -//---------------------------------------------------------------------------------------- -class UCharFile { -public: - UCharFile(const char *fileName); - ~UCharFile(); - UChar get(); - UBool eof() {return fEof;}; - UBool error() {return fError;}; - -private: - UCharFile (const UCharFile &other) {}; // No copy constructor. - UCharFile & operator = (const UCharFile &other) {return *this;}; // No assignment op - - FILE *fFile; - const char *fName; - UBool fEof; - UBool fError; - UChar fPending2ndSurrogate; - - enum {UTF16LE, UTF16BE, UTF8} fEncoding; -}; - -UCharFile::UCharFile(const char * fileName) { - fEof = FALSE; - fError = FALSE; - fName = fileName; - fFile = fopen(fName, "rb"); - fPending2ndSurrogate = 0; - if (fFile == NULL) { - fprintf(stderr, "Can not open file \"%s\"\n", opt_fName); - fError = TRUE; - return; - } - // - // Look for the byte order mark at the start of the file. - // - int BOMC1, BOMC2, BOMC3; - BOMC1 = fgetc(fFile); - BOMC2 = fgetc(fFile); - - if (BOMC1 == 0xff && BOMC2 == 0xfe) { - fEncoding = UTF16LE; } - else if (BOMC1 == 0xfe && BOMC2 == 0xff) { - fEncoding = UTF16BE; } - else if (BOMC1 == 0xEF && BOMC2 == 0xBB && (BOMC3 = fgetc(fFile)) == 0xBF ) { - fEncoding = UTF8; } - else - { - fprintf(stderr, "collperf: file \"%s\" encoding must be UTF-8 or UTF-16, and " - "must include a BOM.\n", fileName); - fError = true; - return; - } -} - - -UCharFile::~UCharFile() { - fclose(fFile); -} - - - -UChar UCharFile::get() { - UChar c; - switch (fEncoding) { - case UTF16LE: - { - int cL, cH; - cL = fgetc(fFile); - cH = fgetc(fFile); - c = cL | (cH << 8); - if (cH == EOF) { - c = 0; - fEof = TRUE; - } - break; - } - case UTF16BE: - { - int cL, cH; - cH = fgetc(fFile); - cL = fgetc(fFile); - c = cL | (cH << 8); - if (cL == EOF) { - c = 0; - fEof = TRUE; - } - break; - } - case UTF8: - { - if (fPending2ndSurrogate != 0) { - c = fPending2ndSurrogate; - fPending2ndSurrogate = 0; - break; - } - - int ch = fgetc(fFile); // Note: c and ch are separate cause eof test doesn't work on UChar type. - if (ch == EOF) { - c = 0; - fEof = TRUE; - break; - } - - if (ch <= 0x7f) { - // It's ascii. No further utf-8 conversion. - c = ch; - break; - } - - // Figure out the lenght of the char and read the rest of the bytes - // into a temp array. - int nBytes; - if (ch >= 0xF0) {nBytes=4;} - else if (ch >= 0xE0) {nBytes=3;} - else if (ch >= 0xC0) {nBytes=2;} - else { - fprintf(stderr, "utf-8 encoded file contains corrupt data.\n"); - fError = TRUE; - return 0; - } - - unsigned char bytes[10]; - bytes[0] = (unsigned char)ch; - int i; - for (i=1; i<nBytes; i++) { - bytes[i] = fgetc(fFile); - if (bytes[i] < 0x80 || bytes[i] >= 0xc0) { - fprintf(stderr, "utf-8 encoded file contains corrupt data.\n"); - fError = TRUE; - return 0; - } - } - - // Convert the bytes from the temp array to a Unicode char. - i = 0; - uint32_t cp; - UTF8_NEXT_CHAR_UNSAFE(bytes, i, cp); - c = (UChar)cp; - - if (cp >= 0x10000) { - // The code point needs to be broken up into a utf-16 surrogate pair. - // Process first half this time through the main loop, and - // remember the other half for the next time through. - UChar utf16Buf[3]; - i = 0; - UTF16_APPEND_CHAR_UNSAFE(utf16Buf, i, cp); - fPending2ndSurrogate = utf16Buf[1]; - c = utf16Buf[0]; - } - break; - }; - } - return c; -} - -//---------------------------------------------------------------------------------------- -// -// openRulesCollator - Command line specified a rules file. Read it in -// and open a collator with it. -// -//---------------------------------------------------------------------------------------- -UCollator *openRulesCollator() { - UCharFile f(opt_rules); - if (f.error()) { - return 0; - } - - int bufLen = 10000; - UChar *buf = (UChar *)malloc(bufLen * sizeof(UChar)); - int i = 0; - - for(;;) { - buf[i] = f.get(); - if (f.eof()) { - break; - } - if (f.error()) { - return 0; - } - i++; - if (i >= bufLen) { - bufLen += 10000; - buf = (UChar *)realloc(buf, bufLen); - } - } - buf[i] = 0; - - UErrorCode status = U_ZERO_ERROR; - UCollator *coll = ucol_openRules(buf, u_strlen(buf), UCOL_OFF, - UCOL_DEFAULT_STRENGTH, NULL, &status); - if (U_FAILURE(status)) { - fprintf(stderr, "ICU ucol_openRules() open failed.: %d\n", status); - return 0; - } - free(buf); - return coll; -} - - - - - -//---------------------------------------------------------------------------------------- -// -// Main -- process command line, read in and pre-process the test file, -// call other functions to do the actual tests. -// -//---------------------------------------------------------------------------------------- -int main(int argc, const char** argv) { - if (ProcessOptions(argc, argv, opts) != TRUE || opt_help || opt_fName == 0) { - printf(gUsageString); - exit (1); - } - - // Make sure that we've only got one API selected. - if (opt_unix || opt_win) opt_icu = FALSE; - if (opt_unix) opt_win = FALSE; - - // - // Set up an ICU collator - // - UErrorCode status = U_ZERO_ERROR; - - if (opt_rules != 0) { - gCol = openRulesCollator(); - if (gCol == 0) {return -1;} - } - else { - gCol = ucol_open(opt_locale, &status); - if (U_FAILURE(status)) { - fprintf(stderr, "Collator creation failed.: %d\n", status); - return -1; - } - } - if (status==U_USING_DEFAULT_WARNING && opt_terse==FALSE) { - fprintf(stderr, "Warning, U_USING_DEFAULT_WARNING for %s\n", opt_locale); - } - if (status==U_USING_FALLBACK_WARNING && opt_terse==FALSE) { - fprintf(stderr, "Warning, U_USING_FALLBACK_ERROR for %s\n", opt_locale); - } - - if (opt_norm) { - ucol_setAttribute(gCol, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); - } - if (opt_french && opt_frenchoff) { - fprintf(stderr, "collperf: Error, specified both -french and -frenchoff options."); - exit(-1); - } - if (opt_french) { - ucol_setAttribute(gCol, UCOL_FRENCH_COLLATION, UCOL_ON, &status); - } - if (opt_frenchoff) { - ucol_setAttribute(gCol, UCOL_FRENCH_COLLATION, UCOL_OFF, &status); - } - if (opt_lower) { - ucol_setAttribute(gCol, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, &status); - } - if (opt_upper) { - ucol_setAttribute(gCol, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, &status); - } - if (opt_case) { - ucol_setAttribute(gCol, UCOL_CASE_LEVEL, UCOL_ON, &status); - } - if (opt_shifted) { - ucol_setAttribute(gCol, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status); - } - if (opt_level != 0) { - switch (opt_level) { - case 1: - ucol_setAttribute(gCol, UCOL_STRENGTH, UCOL_PRIMARY, &status); - break; - case 2: - ucol_setAttribute(gCol, UCOL_STRENGTH, UCOL_SECONDARY, &status); - break; - case 3: - ucol_setAttribute(gCol, UCOL_STRENGTH, UCOL_TERTIARY, &status); - break; - case 4: - ucol_setAttribute(gCol, UCOL_STRENGTH, UCOL_QUATERNARY, &status); - break; - case 5: - ucol_setAttribute(gCol, UCOL_STRENGTH, UCOL_IDENTICAL, &status); - break; - default: - fprintf(stderr, "-level param must be between 1 and 5\n"); - exit(-1); - } - } - - if (U_FAILURE(status)) { - fprintf(stderr, "Collator attribute setting failed.: %d\n", status); - return -1; - } - - - // - // Set up a Windows LCID - // - if (opt_langid != 0) { - gWinLCID = MAKELCID(opt_langid, SORT_DEFAULT); - } - else { - gWinLCID = uloc_getLCID(opt_locale); - } - - - // - // Set the UNIX locale - // - if (opt_unix) { - if (setlocale(LC_ALL, opt_locale) == 0) { - fprintf(stderr, "setlocale(LC_ALL, %s) failed.\n", opt_locale); - exit(-1); - } - } - - // Read in the input file. - // File assumed to be utf-16. - // Lines go onto heap buffers. Global index array to line starts is created. - // Lines themselves are null terminated. - // - - UCharFile f(opt_fName); - if (f.error()) { - exit(-1); - } - - const int MAXLINES = 40000; - gFileLines = new Line[MAXLINES]; - UChar buf[1024]; - int column = 0; - - // Read the file, split into lines, and save in memory. - // Loop runs once per utf-16 value from the input file, - // (The number of bytes read from file per loop iteration depends on external encoding.) - for (;;) { - - UChar c = f.get(); - if (f.error()){ - exit(-1); - } - - - // We now have a good UTF-16 value in c. - - // Watch for CR, LF, EOF; these finish off a line. - if (c == 0xd) { - continue; - } - - if (f.eof() || c == 0x0a || c==0x2028) { // Unipad inserts 2028 line separators! - buf[column++] = 0; - if (column > 1) { - gFileLines[gNumFileLines].name = new UChar[column]; - gFileLines[gNumFileLines].len = column-1; - memcpy(gFileLines[gNumFileLines].name, buf, column * sizeof(UChar)); - gNumFileLines++; - column = 0; - if (gNumFileLines >= MAXLINES) { - fprintf(stderr, "File too big. Max number of lines is %d\n", MAXLINES); - exit(-1); - } - - } - if (c == 0xa || c == 0x2028) - continue; - else - break; // EOF - } - buf[column++] = c; - if (column >= 1023) - { - static UBool warnFlag = TRUE; - if (warnFlag) { - fprintf(stderr, "Warning - file line longer than 1023 chars truncated.\n"); - warnFlag = FALSE; - } - column--; - } - } - - if (opt_terse == FALSE) { - printf("file \"%s\", %d lines.\n", opt_fName, gNumFileLines); - } - - - // Convert the lines to the UNIX encoding. - if (opt_unix) { - UnixConvert(); - } - - // - // Pre-compute ICU sort keys for the lines of the file. - // - int line; - int t; - - for (line=0; line<gNumFileLines; line++) { - t = ucol_getSortKey(gCol, gFileLines[line].name, -1, (unsigned char *)buf, sizeof(buf)); - gFileLines[line].icuSortKey = new char[t]; - - if (t > sizeof(buf)) { - t = ucol_getSortKey(gCol, gFileLines[line].name, -1, (unsigned char *)gFileLines[line].icuSortKey , t); - } - else - { - memcpy(gFileLines[line].icuSortKey, buf, t); - } - } - - - - // - // Pre-compute Windows sort keys for the lines of the file. - // - for (line=0; line<gNumFileLines; line++) { - t=LCMapStringW(gWinLCID, LCMAP_SORTKEY, gFileLines[line].name, -1, buf, sizeof(buf)); - gFileLines[line].winSortKey = new char[t]; - if (t > sizeof(buf)) { - t = LCMapStringW(gWinLCID, LCMAP_SORTKEY, gFileLines[line].name, -1, (unsigned short *)(gFileLines[line].winSortKey), t); - } - else - { - memcpy(gFileLines[line].winSortKey, buf, t); - } - } - - // - // Pre-compute UNIX sort keys for the lines of the file. - // - if (opt_unix) { - for (line=0; line<gNumFileLines; line++) { - t=strxfrm((char *)buf, gFileLines[line].unixName, sizeof(buf)); - gFileLines[line].unixSortKey = new char[t]; - if (t > sizeof(buf)) { - t = strxfrm(gFileLines[line].unixSortKey, gFileLines[line].unixName, sizeof(buf)); - } - else - { - memcpy(gFileLines[line].unixSortKey, buf, t); - } - } - } - - - // - // Dump file lines, CEs, Sort Keys if requested. - // - if (opt_dump) { - int i; - for (line=0; line<gNumFileLines; line++) { - for (i=0;;i++) { - UChar c = gFileLines[line].name[i]; - if (c == 0) - break; - if (c < 0x20 || c > 0x7e) { - printf("\\u%.4x", c); - } - else { - printf("%c", c); - } - } - printf("\n"); - - printf(" CEs: "); - UCollationElements *CEiter = ucol_openElements(gCol, gFileLines[line].name, -1, &status); - int32_t ce; - i = 0; - for (;;) { - ce = ucol_next(CEiter, &status); - if (ce == UCOL_NULLORDER) { - break; - } - printf(" %.8x", ce); - if (++i > 8) { - printf("\n "); - i = 0; - } - } - printf("\n"); - ucol_closeElements(CEiter); - - - printf(" ICU Sort Key: "); - for (i=0; ; i++) { - unsigned char c = gFileLines[line].icuSortKey[i]; - printf("%02x ", c); - if (c == 0) { - break; - } - if (i > 0 && i % 20 == 0) { - printf("\n "); - } - } - printf("\n"); - } - } - - - // - // Pre-sort the lines. - // - int i; - gSortedLines = new Line *[gNumFileLines]; - for (i=0; i<gNumFileLines; i++) { - gSortedLines[i] = &gFileLines[i]; - } - - if (opt_win) { - qsort(gSortedLines, gNumFileLines, sizeof(Line *), Winstrcmp); - } - else if (opt_unix) { - qsort(gSortedLines, gNumFileLines, sizeof(Line *), UNIXstrcmp); - } - else /* ICU */ - { - qsort(gSortedLines, gNumFileLines, sizeof(Line *), ICUstrcmp); - } - - - // - // Make up a randomized order, will be used for sorting tests. - // - gRandomLines = new Line *[gNumFileLines]; - for (i=0; i<gNumFileLines; i++) { - gRandomLines[i] = &gFileLines[i]; - } - qsort(gRandomLines, gNumFileLines, sizeof(Line *), ICURandomCmp); - - - - - // - // We've got the file read into memory. Go do something with it. - // - - if (opt_qsort) doQSort(); - if (opt_binsearch) doBinarySearch(); - if (opt_keygen) doKeyGen(); - if (opt_keyhist) doKeyHist(); - if (opt_itertest) doIterTest(); - - return 0; - -} diff --git a/Build/source/libs/icu-xetex/test/collperf/collperf.dsp b/Build/source/libs/icu-xetex/test/collperf/collperf.dsp deleted file mode 100644 index 4fc8ded9666..00000000000 --- a/Build/source/libs/icu-xetex/test/collperf/collperf.dsp +++ /dev/null @@ -1,160 +0,0 @@ -# Microsoft Developer Studio Project File - Name="collperf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=collperf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "collperf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "collperf.mak" CFG="collperf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "collperf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "collperf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "collperf - Win64 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "collperf - Win64 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "collperf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob2 /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib\\" - -!ELSEIF "$(CFG)" == "collperf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\\" - -!ELSEIF "$(CFG)" == "collperf - Win64 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IX86 /machine:IA64 -# ADD LINK32 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:IX86 /libpath:"..\..\..\lib\\" /machine:IA64 - -!ELSEIF "$(CFG)" == "collperf - Win64 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FR /FD /GZ /Wp64 /Zm600 /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:IX86 /pdbtype:sept /machine:IA64 -# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /libpath:"..\..\..\lib\\" /machine:IA64 - -!ENDIF - -# Begin Target - -# Name "collperf - Win32 Release" -# Name "collperf - Win32 Debug" -# Name "collperf - Win64 Release" -# Name "collperf - Win64 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\collperf.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/Build/source/libs/icu-xetex/test/collperf/readme.html b/Build/source/libs/icu-xetex/test/collperf/readme.html deleted file mode 100644 index 40940d10e31..00000000000 --- a/Build/source/libs/icu-xetex/test/collperf/readme.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> - -<HEAD> - <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"> - <meta name="Copyright" content="Copyright (c) 2002, International Business Machines Corporation and others. All Rights Reserved."> - <META NAME="GENERATOR" Content="Visual Page 2.0 for Windows"> - <TITLE>collperf</TITLE> -</HEAD> - -<BODY BGCOLOR="white"> - -<H2>collperf</H2> -<P>collperf is a test program for comparing collation performance and key lengths of ICU, Windows native collation -and Unix/POSIX collation. It operates on a file of lines (names, for example), and performs one of three tests:</P> - -<OL> - <LI>Sort Key generation. Report on key lengths and key generation times. - <LI>Binary search. Report the average time required to look up each of the names (file lines) from the file in - a sorted list of all of the names. - <LI>Quick Sort. Report the time required to sort the file in memory, using the C library qsort function. The file - order is randomized prior to the sort. -</OL> - -<P> -<P><B>Usage Summary</B></P> - -<BLOCKQUOTE> - <P> - <TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0"> - <TR> - <TD WIDTH="100%"> - <P><TT>collperf -help</TT> - <BLOCKQUOTE> - <PRE><TT>Usage: strperf options... --help Display this message. --file file_name utf-16 format file of names --locale name ICU locale to use. Default is en_US --langid 0x1234 Windows Language ID number. Default 0x409 (en_US) - see http://msdn.microsoft.com/library/psdk/winbase/nls_8xo3.htm --win Run test using Windows native services. (ICU is default) --unix Run test using Unix strxfrm, strcoll services. --uselen Use API with string lengths. Default is null-terminated strings --usekeys Run tests using sortkeys rather than strcoll --loop nnnn Loopcount for test. Adjust for reasonable total running time. --terse Terse numbers-only output. Intended for use by scripts. --french French accent ordering --norm Normalizing mode on --shifted Shifted mode --lower Lower case first --upper Upper case first --case Enable separate case level --level n Sort level, 1 to 5, for Primary, Secndary, Tertiary, Quaternary, Identical --binsearch Binary Search timing test --keygen Sort Key Generation timing test --qsort Quicksort timing test</TT></PRE> - </BLOCKQUOTE> - </TD> - </TR> - </TABLE> -</P> -</BLOCKQUOTE> - -<P><B>Example</B></P> - -<BLOCKQUOTE> - <P> - <TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0"> - <TR> - <TD WIDTH="100%"><TT>C:\>collperf -loop 200 -file latin.txt -keygen -shifted -level 4<BR> - file "latin.txt", 7604 lines.<BR> - Sort Key Generation: total # of keys = 197704<BR> - Sort Key Generation: time per key = 4253 ns<BR> - Key Length / character = 1.730054</TT></TD> - </TR> - </TABLE> - -</BLOCKQUOTE> - -<P> - -</BODY> - -</HTML>
\ No newline at end of file diff --git a/Build/source/libs/icu-xetex/test/hdrtst/Makefile.in b/Build/source/libs/icu-xetex/test/hdrtst/Makefile.in index 52c2f8ea3d4..ff8d964b095 100644 --- a/Build/source/libs/icu-xetex/test/hdrtst/Makefile.in +++ b/Build/source/libs/icu-xetex/test/hdrtst/Makefile.in @@ -1,5 +1,5 @@ ## -## Copyright (c) 1999-2005, International Business Machines Corporation and +## Copyright (c) 1999-2006, International Business Machines Corporation and ## others. All Rights Reserved. ## ## @@ -33,7 +33,7 @@ all: @echo Please read this Makefile for more information. @echo run \'$(MAKE) check\' to run the test -check: dtest ctest cpptest lotest doclean +check: dtest ctest cpptest lotest doclean drafttest deprtest internaltest obsoletetest @echo "All header tests have finished. If deprecation #errors appeared, " @echo " add files to hdrtst/dfiles.txt" @echo "#################################################################" @@ -108,7 +108,75 @@ ctest: RES=$$? ; \ echo $$RES ; \ done + +drafttest: + @echo "U_HIDE_DRAFT_API Test #######################################################" + @rm -f Makefile.sub + @echo Building test harness for header files in ../../common and ../../i18n + @echo 'the number after the hyphen (-) refers to the exit code - should be zero!' + @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \ + incfile=`basename $$file .h` ; \ + echo -n " unicode/$$incfile.h - " ; \ + echo '#define U_HIDE_DRAFT_API' > hd_$$incfile.c; \ + echo '#include "'unicode/$$incfile'.h"' >> ht_$$incfile.c ; \ + echo 'void junk(void);' >> hd_$$incfile.c ; \ + echo 'void junk(){}' >> hd_$$incfile.c ; \ + $(COMPILE.cc) -c $(cppflags) hd_$$incfile.c ; \ + RES=$$? ; \ + echo $$RES ; \ + done + +deprtest: + @echo "U_HIDE_DEPRECATED_API Test #######################################################" + @rm -f Makefile.sub + @echo Building test harness for header files in ../../common and ../../i18n + @echo 'the number after the hyphen (-) refers to the exit code - should be zero!' + @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \ + incfile=`basename $$file .h` ; \ + echo -n " unicode/$$incfile.h - " ; \ + echo '#define U_HIDE_DEPRECATED_API' > hdp_$$incfile.c; \ + echo '#include "'unicode/$$incfile'.h"' >> hdp_$$incfile.c ; \ + echo 'void junk(void);' >> hdp_$$incfile.c ; \ + echo 'void junk(){}' >> hdp_$$incfile.c ; \ + $(COMPILE.cc) -c $(cppflags) hdp_$$incfile.c ; \ + RES=$$? ; \ + echo $$RES ; \ + done + +internaltest: + @echo "U_HIDE_INTERNAL_API Test #######################################################" + @rm -f Makefile.sub + @echo Building test harness for header files in ../../common and ../../i18n + @echo 'the number after the hyphen (-) refers to the exit code - should be zero!' + @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \ + incfile=`basename $$file .h` ; \ + echo -n " unicode/$$incfile.h - " ; \ + echo '#define U_HIDE_INTERNAL_API' > hin_$$incfile.c; \ + echo '#include "'unicode/$$incfile'.h"' >> hin_$$incfile.c ; \ + echo 'void junk(void);' >> hin_$$incfile.c ; \ + echo 'void junk(){}' >> hin_$$incfile.c ; \ + $(COMPILE.cc) -c $(cppflags) hin_$$incfile.c ; \ + RES=$$? ; \ + echo $$RES ; \ + done +obsoletetest: + @echo "U_HIDE_OBSOLETE_API Test #######################################################" + @rm -f Makefile.sub + @echo Building test harness for header files in ../../common and ../../i18n + @echo 'the number after the hyphen (-) refers to the exit code - should be zero!' + @for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \ + incfile=`basename $$file .h` ; \ + echo -n " unicode/$$incfile.h - " ; \ + echo '#define U_HIDE_OBSOLETE_API' > hob_$$incfile.c; \ + echo '#include "'unicode/$$incfile'.h"' >> hob_$$incfile.c ; \ + echo 'void junk(void);' >> hob_$$incfile.c ; \ + echo 'void junk(){}' >> hob_$$incfile.c ; \ + $(COMPILE.cc) -c $(cppflags) hob_$$incfile.c ; \ + RES=$$? ; \ + echo $$RES ; \ + done + clean: -@rm -f *.h *.c *.cpp *.o *.junk @@ -117,3 +185,4 @@ distclean: clean .PHONY: doclean check all cpptest lotest dtest ctest clean distclean + diff --git a/Build/source/libs/icu-xetex/test/intltest/Makefile.in b/Build/source/libs/icu-xetex/test/intltest/Makefile.in index 72b802a6fac..990a7c675c9 100644 --- a/Build/source/libs/icu-xetex/test/intltest/Makefile.in +++ b/Build/source/libs/icu-xetex/test/intltest/Makefile.in @@ -1,6 +1,10 @@ +#****************************************************************************** +# +# Copyright (C) 1999-2006, International Business Machines +# Corporation and others. All Rights Reserved. +# +#****************************************************************************** ## Makefile.in for ICU - test/intltest -## Copyright (c) 1999-2005, International Business Machines Corporation and -## others. All Rights Reserved. ## Source directory information srcdir = @srcdir@ @@ -8,6 +12,7 @@ top_srcdir = @top_srcdir@ top_builddir = ../.. +## All the flags and other definitions are included here. include $(top_builddir)/icudefs.mk ## Build directory information @@ -27,17 +32,20 @@ BUILDDIR := $(BUILDDIR:test\\intltest/../../=) # Simplify the path for Windows 98 BUILDDIR := $(BUILDDIR:TEST\\INTLTEST/../../=) -CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +ifneq ($(top_builddir),$(top_srcdir)) +CPPFLAGS += -I$(top_builddir)/common +endif +CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"' LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) -OBJECTS = allcoll.o apicoll.o astrotst.o callimts.o calregts.o caltest.o \ +OBJECTS = aliastst.o allcoll.o apicoll.o astrotst.o callimts.o calregts.o caltest.o \ caltztst.o canittst.o citrtest.o cntabcol.o convtest.o currcoll.o \ dadrcoll.o dcfmapts.o decoll.o dtfmapts.o dtfmrgts.o dtfmtrtts.o dtfmttst.o \ encoll.o escoll.o ficoll.o frcoll.o g7coll.o intltest.o \ itercoll.o itformat.o itmajor.o itutil.o jacoll.o lcukocol.o \ loctest.o miscdtfm.o mnkytst.o msfmrgts.o nmfmapts.o nmfmtrt.o \ -numfmtst.o numrgts.o pptest.o regcoll.o restest.o restsnew.o \ +numfmtst.o numrgts.o pptest.o regcoll.o restest.o restsnew.o rndmcoll.o \ sdtfmtts.o svccoll.o tchcfmt.o \ tfsmalls.o tmsgfmt.o trcoll.o tscoll.o tsdate.o tsdcfmsy.o tsdtfmsy.o \ tsmthred.o tsnmfmt.o tsputil.o tstnrapi.o tstnorm.o tzbdtest.o \ @@ -47,13 +55,16 @@ testutil.o transrt.o trnserr.o normconf.o sfwdchit.o \ jamotest.o srchtest.o reptest.o regextst.o \ itrbnf.o itrbnfrt.o itrbnfp.o ucaconf.o icusvtst.o \ uobjtest.o idnaref.o idnaconf.o nptrans.o punyref.o testidn.o testidna.o incaltst.o \ -calcasts.o v32test.o uvectest.o textfile.o tokiter.o utxttest.o +calcasts.o v32test.o uvectest.o textfile.o tokiter.o utxttest.o wbnf.o \ +windttst.o winnmtst.o winutil.o csdetest.o DEPS = $(OBJECTS:.o=.d) +-include Makefile.local + ## List of phony targets -.PHONY : all all-local install install-local clean clean-local \ +.PHONY : all all-local install install-local clean clean-local \ distclean distclean-local dist dist-local check check-local ## Clear suffix list @@ -80,8 +91,6 @@ clean-local: distclean-local: clean-local $(RMV) Makefile --include Makefile.local - check-local: all-local $(INVOKE) ./$(TARGET) $(INTLTEST_OPTS) || true diff --git a/Build/source/libs/icu-xetex/test/intltest/aliastst.cpp b/Build/source/libs/icu-xetex/test/intltest/aliastst.cpp new file mode 100644 index 00000000000..3abb2959edb --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/aliastst.cpp @@ -0,0 +1,287 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 2005-2006, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ + +#include "aliastst.h" +#include "unicode/calendar.h" +#include "unicode/smpdtfmt.h" +#include "unicode/datefmt.h" +#include "unicode/unistr.h" +#include "unicode/coll.h" +#include "unicode/resbund.h" +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + +const char* _LOCALE_ALIAS[][2] = { + {"in", "id"}, + {"in_ID", "id_ID"}, + {"iw", "he"}, + {"iw_IL", "he_IL"}, + {"ji", "yi"}, + {"en_BU", "en_MM"}, + {"en_DY", "en_BJ"}, + {"en_HV", "en_BF"}, + {"en_NH", "en_VU"}, + {"en_RH", "en_ZW"}, + {"en_TP", "en_TL"}, + {"en_ZR", "en_CD"} +}; + +const int _LOCALE_NUMBER = 12; + +void LocaleAliasTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ){ + switch (index) { + TESTCASE(0, TestCalendar); + TESTCASE(1, TestDateFormat); + TESTCASE(2, TestCollation); + TESTCASE(3, TestULocale); + TESTCASE(4, TestUResourceBundle); + TESTCASE(5, TestDisplayName); + // keep the last index in sync with the condition in default: + + default: + if (index <= 5) { // keep this in sync with the last index! + name = "(test omitted by !UCONFIG_NO_FORMATTING)"; + } else { + name = ""; + } + break; //needed to end loop + } +} + +void LocaleAliasTest::TestCalendar() { +#if !UCONFIG_NO_FORMATTING + UErrorCode status = U_ZERO_ERROR; + for (int i=0; i<_LOCALE_NUMBER; i++) { + Locale oldLoc(_LOCALE_ALIAS[i][0]); + Locale newLoc(_LOCALE_ALIAS[i][1]); + if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){ + logln(UnicodeString(newLoc.getName())+" is not available. Skipping!"); + continue; + } + logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName()); + Calendar* c1 = Calendar::createInstance(oldLoc, status); + Calendar* c2 = Calendar::createInstance(newLoc, status); + + //Test function "getLocale(ULocale.VALID_LOCALE)" + const char* l1 = c1->getLocaleID(ULOC_VALID_LOCALE, status); + const char* l2 = c2->getLocaleID(ULOC_VALID_LOCALE, status); + if (strcmp(newLoc.getName(), l1)!=0) { + errln("CalendarTest: newLoc!=l1: newLoc= "+UnicodeString(newLoc.getName()) +" l1= "+UnicodeString(l1)); + } + if (strcmp(l1, l2)!=0) { + errln("CalendarTest: l1!=l2: l1= "+UnicodeString(l1) +" l2= "+UnicodeString(l2)); + } + if(!(c1==c2)){ + errln("CalendarTest: c1!=c2. newLoc= "+UnicodeString(newLoc.getName()) +" oldLoc= "+UnicodeString(oldLoc.getName())); + } + logln("Calendar(getLocale) old:"+UnicodeString(l1)+" new:"+UnicodeString(l2)); + delete c1; + delete c2; + } +#endif +} +void LocaleAliasTest::TestDateFormat() { +#if !UCONFIG_NO_FORMATTING + UErrorCode status = U_ZERO_ERROR; + for (int i=0; i<_LOCALE_NUMBER; i++) { + Locale oldLoc(_LOCALE_ALIAS[i][0]); + Locale newLoc(_LOCALE_ALIAS[i][1]); + if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){ + logln(UnicodeString(newLoc.getName())+" is not available. Skipping!"); + continue; + } + logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName()); + + DateFormat* df1 = DateFormat::createDateInstance(DateFormat::FULL, oldLoc); + DateFormat* df2 = DateFormat::createDateInstance(DateFormat::FULL, newLoc); + + //Test function "getLocale" + const char* l1 = df1->getLocaleID(ULOC_VALID_LOCALE, status); + const char* l2 = df2->getLocaleID(ULOC_VALID_LOCALE, status); + if (strcmp(newLoc.getName(), l1)!=0) { + errln("CalendarTest: newLoc!=l1: newLoc= "+UnicodeString(newLoc.getName()) +" l1= "+UnicodeString(l1)); + } + if (strcmp(l1, l2)!=0) { + errln("TestDateFormat: l1!=l2: l1= "+UnicodeString(l1) +" l2= "+UnicodeString(l2)); + } + if(!(df1==df2)){ + errln("TestDateFormat: c1!=c2. newLoc= "+UnicodeString(newLoc.getName()) +" oldLoc= "+UnicodeString(oldLoc.getName())); + } + logln("DateFormat(getLocale) old:%s new:%s",l1,l2); + + delete df1; + delete df2; + } +#endif +} +void LocaleAliasTest::TestCollation() { +#if !UCONFIG_NO_COLLATION + UErrorCode status = U_ZERO_ERROR; + for (int i=0; i<_LOCALE_NUMBER; i++) { + Locale oldLoc(_LOCALE_ALIAS[i][0]); + Locale newLoc(_LOCALE_ALIAS[i][1]); + if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){ + logln(UnicodeString(newLoc.getName())+" is not available. Skipping!"); + continue; + } + logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName()); + + Collator* c1 = Collator::createInstance(oldLoc, status); + Collator* c2 = Collator::createInstance(newLoc, status); + + Locale l1 = c1->getLocale(ULOC_VALID_LOCALE, status); + Locale l2 = c2->getLocale(ULOC_VALID_LOCALE, status); + + if (strcmp(newLoc.getName(), l1.getName())!=0) { + errln("CalendarTest: newLoc!=l1: newLoc= "+UnicodeString(newLoc.getName()) +" l1= "+UnicodeString(l1.getName())); + } + if (strcmp(l1.getName(), l2.getName())!=0) { + errln("CollationTest: l1!=l2: l1= "+UnicodeString(l1.getName()) +" l2= "+UnicodeString(l2.getName())); + } + if(!(c1==c2)){ + errln("CollationTest: c1!=c2. newLoc= "+UnicodeString(newLoc.getName()) +" oldLoc= "+UnicodeString(oldLoc.getName())); + } + logln("Collator(getLocale) old:%s new:%s", l1.getName(), l2.getName()); + delete c1; + delete c2; + } +#endif +} +void LocaleAliasTest::TestULocale() { + for (int i=0; i<_LOCALE_NUMBER; i++) { + Locale oldLoc(_LOCALE_ALIAS[i][0]); + Locale newLoc(_LOCALE_ALIAS[i][1]); + if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){ + logln(UnicodeString(newLoc.getName())+" is not available. Skipping!"); + continue; + } + logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName()); + + UnicodeString name1, name2; + oldLoc.getDisplayName(name1); + newLoc.getDisplayName(name2); + if (name1!=name2) { + errln("DisplayNames are not equal. newLoc= "+UnicodeString(newLoc.getName()) +" oldLoc= "+UnicodeString(oldLoc.getName())); + } + log("ULocale(getDisplayName) old:"); + log(name1); + log(" new:"); + logln(name2); + } +} +LocaleAliasTest::LocaleAliasTest(){ + UErrorCode status = U_ZERO_ERROR; + resIndex = ures_open(NULL,"res_index", &status); + if(U_FAILURE(status)){ + errln("Could not open res_index.res. Exiting. Error: %s\n", u_errorName(status)); + resIndex=NULL; + } + defLocale = Locale::getDefault(); + Locale::setDefault(Locale::getUS(), status); +} +LocaleAliasTest::~LocaleAliasTest(){ + /* reset the default locale */ + UErrorCode status = U_ZERO_ERROR; + Locale::setDefault(defLocale, status); + ures_close(resIndex); + if(U_FAILURE(status)){ + errln("Could not reset the default locale. Exiting. Error: %s\n", u_errorName(status)); + } +} +UBool LocaleAliasTest::isLocaleAvailable(const char* loc){ + if(resIndex==NULL){ + return FALSE; + } + UErrorCode status = U_ZERO_ERROR; + int32_t len = 0; + ures_getStringByKey(resIndex, loc,&len, &status); + if(U_FAILURE(status)){ + return FALSE; + } + return TRUE; +} +void LocaleAliasTest::TestDisplayName() { + int32_t availableNum =0; + const Locale* available = Locale::getAvailableLocales(availableNum); + for (int i=0; i<_LOCALE_NUMBER; i++) { + Locale oldLoc(_LOCALE_ALIAS[i][0]); + Locale newLoc(_LOCALE_ALIAS[i][1]); + if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){ + logln(UnicodeString(newLoc.getName())+" is not available. Skipping!"); + continue; + } + for(int j=0; j<availableNum; j++){ + UnicodeString dipLocName = UnicodeString(available[j].getName()); + const UnicodeString oldCountry = oldLoc.getDisplayCountry(dipLocName); + const UnicodeString newCountry = newLoc.getDisplayCountry(dipLocName); + const UnicodeString oldLang = oldLoc.getDisplayLanguage(dipLocName); + const UnicodeString newLang = newLoc.getDisplayLanguage(dipLocName); + + // is there display name for the current country ID + if(newCountry != newLoc.getCountry()){ + if(oldCountry!=newCountry){ + errln("getCountry() failed for "+ UnicodeString(oldLoc.getName()) +" oldCountry= "+ prettify(oldCountry) +" newCountry = "+prettify(newCountry)+ " in display locale "+ UnicodeString(available[j].getName())); + } + } + //there is a display name for the current lang ID + if(newLang != newLoc.getLanguage()){ + if(oldLang != newLang){ + errln("getLanguage() failed for " + UnicodeString(oldLoc.getName()) + " oldLang = "+ prettify(oldLang) +" newLang = "+prettify(newLang)+ " in display locale "+UnicodeString(available[j].getName())); + } + } + } + } +} +void LocaleAliasTest::TestUResourceBundle() { + + UErrorCode status = U_ZERO_ERROR; + for (int i=0; i<_LOCALE_NUMBER; i++) { + Locale oldLoc(_LOCALE_ALIAS[i][0]); + Locale newLoc(_LOCALE_ALIAS[i][1]); + if(!isLocaleAvailable(_LOCALE_ALIAS[i][1])){ + logln(UnicodeString(newLoc.getName())+" is not available. Skipping!"); + continue; + } + logln("\nold locale:%s new locale:%s",oldLoc.getName(),newLoc.getName()); + + ResourceBundle* rb1 = NULL; + ResourceBundle* rb2 = NULL; + + const char* testdatapath=loadTestData(status); + + UnicodeString us1("NULL"); + UnicodeString us2("NULL"); + rb1 = new ResourceBundle(testdatapath, oldLoc, status); + if (U_FAILURE(U_ZERO_ERROR)) { + + } else { + us1 = rb1->getStringEx("locale", status); + } + rb2 = new ResourceBundle(testdatapath, newLoc, status); + if (U_FAILURE(U_ZERO_ERROR)){ + + } else { + us2 = rb2->getStringEx("locale", status); + } + UnicodeString uNewLoc(newLoc.getName()); + if (us1.compare(uNewLoc)!=0 || us1.compare(us2)!=0 || status!=U_ZERO_ERROR) { + + } + log("UResourceBundle(getStringEx) old:"); + log(us1); + log(" new:"); + logln(us2); + + if (rb1!=NULL) { + delete rb1; + } + if (rb2!=NULL) { + delete rb2; + } + } + +} diff --git a/Build/source/libs/icu-xetex/test/intltest/aliastst.h b/Build/source/libs/icu-xetex/test/intltest/aliastst.h new file mode 100644 index 00000000000..e9a0db4638d --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/aliastst.h @@ -0,0 +1,30 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 2005-2006, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ +#ifndef _ALIASTST +#define _ALIASTST + +#include "intltest.h" +#include "unicode/locid.h" +#include "unicode/ures.h" + +class LocaleAliasTest: public IntlTest { +public: + void TestCalendar(); + void TestDateFormat(); + void TestCollation(); + void TestULocale(); + void TestUResourceBundle(); + void TestDisplayName(); + void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); + LocaleAliasTest(); + virtual ~LocaleAliasTest(); +private: + UResourceBundle* resIndex; + UBool isLocaleAvailable(const char*); + Locale defLocale; +}; + +#endif diff --git a/Build/source/libs/icu-xetex/test/intltest/apicoll.cpp b/Build/source/libs/icu-xetex/test/intltest/apicoll.cpp index e0e138aebd4..ff8404f897e 100644 --- a/Build/source/libs/icu-xetex/test/intltest/apicoll.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/apicoll.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ //=============================================================================== @@ -39,6 +39,7 @@ #include "unicode/chariter.h" #include "unicode/schriter.h" #include "unicode/ustring.h" +#include "unicode/ucol.h" #include "sfwdchit.h" #include "cmemory.h" @@ -101,8 +102,9 @@ CollationAPITest::TestProperty(/* char* par */) ICU 2.4 currVersionArray = {0x21, 0x40, 0x04, 0x04}; ICU 2.6 currVersionArray = {0x21, 0x40, 0x03, 0x03}; ICU 2.8 currVersionArray = {0x29, 0x80, 0x00, 0x04}; + ICU 3.4 currVersionArray = {0x31, 0xC0, 0x00, 0x04}; */ - UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x04}; + UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x05}; UVersionInfo versionArray; int i = 0; @@ -912,12 +914,43 @@ CollationAPITest::TestDuplicate(/* char* par */) } Collator *col2 = col1->clone(); doAssert((*col1 == *col2), "Cloned object is not equal to the orginal"); - UnicodeString ruleset("< a, A < b, B < c, C < d, D, e, E"); - RuleBasedCollator *col3 = new RuleBasedCollator(ruleset, status); + UnicodeString *ruleset = new UnicodeString("< a, A < b, B < c, C < d, D, e, E"); + RuleBasedCollator *col3 = new RuleBasedCollator(*ruleset, status); doAssert((*col1 != *col3), "Cloned object is equal to some dummy"); *col3 = *((RuleBasedCollator*)col1); doAssert((*col1 == *col3), "Copied object is not equal to the orginal"); + + if (U_FAILURE(status)) { + logln("Collation tailoring failed."); + return; + } + + UCollationResult res; + UnicodeString first((UChar)0x0061); + UnicodeString second((UChar)0x0062); + UnicodeString copiedEnglishRules(((RuleBasedCollator*)col1)->getRules()); + delete col1; + delete ruleset; + + // Try using the cloned collators after deleting the original data + res = col2->compare(first, second, status); + if(res != UCOL_LESS) { + errln("a should be less then b after tailoring"); + } + if (((RuleBasedCollator*)col2)->getRules() != copiedEnglishRules) { + errln(UnicodeString("English rule difference. ") + + copiedEnglishRules + UnicodeString("\ngetRules=") + ((RuleBasedCollator*)col2)->getRules()); + } + res = col3->compare(first, second, status); + if(res != UCOL_LESS) { + errln("a should be less then b after tailoring"); + } + if (col3->getRules() != copiedEnglishRules) { + errln(UnicodeString("English rule difference. ") + + copiedEnglishRules + UnicodeString("\ngetRules=") + col3->getRules()); + } + delete col2; delete col3; } @@ -1019,11 +1052,17 @@ void CollationAPITest::TestSortKey() col->setAttribute(UCOL_STRENGTH, UCOL_IDENTICAL, status); uint8_t key2compat[] = { + /* 3.6 key, from UCA 5.0 */ + 0x29, 0x2b, 0x2d, 0x2f, 0x29, 0x01, + 0x09, 0x01, 0x09, 0x01, 0x28, 0x01, + 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 + /* 3.4 key, from UCA 4.1 */ + /* 0x28, 0x2a, 0x2c, 0x2e, 0x28, 0x01, 0x09, 0x01, 0x09, 0x01, 0x27, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 - + */ /* 2.6.1 key */ /* 0x26, 0x28, 0x2A, 0x2C, 0x26, 0x01, @@ -2144,6 +2183,56 @@ void CollationAPITest::TestNULLCharTailoring() delete coll; } +void CollationAPITest::TestClone() { + logln("\ninit c0"); + UErrorCode status = U_ZERO_ERROR; + RuleBasedCollator* c0 = (RuleBasedCollator*)Collator::createInstance(status); + c0->setStrength(Collator::TERTIARY); + dump("c0", c0, status); + + logln("\ninit c1"); + RuleBasedCollator* c1 = (RuleBasedCollator*)Collator::createInstance(status); + c1->setStrength(Collator::TERTIARY); + UColAttributeValue val = c1->getAttribute(UCOL_CASE_FIRST, status); + if(val == UCOL_LOWER_FIRST){ + c1->setAttribute(UCOL_CASE_FIRST, UCOL_UPPER_FIRST, status); + }else{ + c1->setAttribute(UCOL_CASE_FIRST, UCOL_LOWER_FIRST, status); + } + dump("c0", c0, status); + dump("c1", c1, status); + + logln("\ninit c2"); + RuleBasedCollator* c2 = (RuleBasedCollator*)c1->clone(); + val = c2->getAttribute(UCOL_CASE_FIRST, status); + if(val == UCOL_LOWER_FIRST){ + c2->setAttribute(UCOL_CASE_FIRST, UCOL_UPPER_FIRST, status); + }else{ + c2->setAttribute(UCOL_CASE_FIRST, UCOL_LOWER_FIRST, status); + } + if(U_FAILURE(status)){ + errln("set and get attributes of collator failed. %s\n", u_errorName(status)); + return; + } + dump("c0", c0, status); + dump("c1", c1, status); + dump("c2", c2, status); + if(*c1 == *c2){ + errln("The cloned objects refer to same data"); + } + delete c0; + delete c1; + delete c2; +} + + void CollationAPITest::dump(UnicodeString msg, RuleBasedCollator* c, UErrorCode& status) { + const char* bigone = "One"; + const char* littleone = "one"; + + logln(msg + " " + c->compare(bigone, littleone) + + " s: " + c->getStrength() + + " u: " + c->getAttribute(UCOL_CASE_FIRST, status)); +} void CollationAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par */) { if (exec) logln("TestSuite CollationAPITest: "); @@ -2171,6 +2260,7 @@ void CollationAPITest::runIndexedTest( int32_t index, UBool exec, const char* &n case 20: name = "TestUClassID"; if (exec) TestUClassID(); break; case 21: name = "TestSubclass"; if (exec) TestSubclass(); break; case 22: name = "TestNULLCharTailoring"; if (exec) TestNULLCharTailoring(); break; + case 23: name = "TestClone"; if (exec) TestClone(); break; default: name = ""; break; } } diff --git a/Build/source/libs/icu-xetex/test/intltest/apicoll.h b/Build/source/libs/icu-xetex/test/intltest/apicoll.h index d08400c1440..f3a4d2a7fda 100644 --- a/Build/source/libs/icu-xetex/test/intltest/apicoll.h +++ b/Build/source/libs/icu-xetex/test/intltest/apicoll.h @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -164,11 +164,14 @@ public: */ void TestNULLCharTailoring(); + void TestClone(); private: // If this is too small for the test data, just increase it. // Just don't make it too large, otherwise the executable will get too big enum EToken_Len { MAX_TOKEN_LEN = 16 }; + void dump(UnicodeString msg, RuleBasedCollator* c, UErrorCode& status); + }; #endif /* #if !UCONFIG_NO_COLLATION */ diff --git a/Build/source/libs/icu-xetex/test/intltest/astrotst.cpp b/Build/source/libs/icu-xetex/test/intltest/astrotst.cpp index 0a40f540459..ba7b5711396 100644 --- a/Build/source/libs/icu-xetex/test/intltest/astrotst.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/astrotst.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1996-2004, International Business Machines Corporation and + * Copyright (c) 1996-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -277,6 +277,10 @@ void AstroTest::TestSunriseTimes(void) { DateFormat *df_t = DateFormat::createTimeInstance(DateFormat::MEDIUM,Locale::getUS()); DateFormat *df_d = DateFormat::createDateInstance(DateFormat::MEDIUM,Locale::getUS()); DateFormat *df_dt = DateFormat::createDateTimeInstance(DateFormat::MEDIUM, DateFormat::MEDIUM, Locale::getUS()); + if(!df_t || !df_d || !df_dt) { + errln("couldn't create dateformats."); + return; + } df_t->adoptTimeZone(tz->clone()); df_d->adoptTimeZone(tz->clone()); df_dt->adoptTimeZone(tz->clone()); diff --git a/Build/source/libs/icu-xetex/test/intltest/callimts.cpp b/Build/source/libs/icu-xetex/test/intltest/callimts.cpp index a0e9333f8fb..40ad122bf47 100644 --- a/Build/source/libs/icu-xetex/test/intltest/callimts.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/callimts.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -91,6 +91,10 @@ CalendarLimitTest::TestCalendarLimit() if (failure(status, "Calendar::createInstance")) return; cal->adoptTimeZone(TimeZone::createTimeZone("GMT")); DateFormat *fmt = DateFormat::createDateTimeInstance(); + if(!fmt || !cal) { + dataerrln("can't open cal and/or fmt"); + return; + } fmt->adoptCalendar(cal); ((SimpleDateFormat*) fmt)->applyPattern("HH:mm:ss.SSS zzz, EEEE, MMMM d, yyyy G"); diff --git a/Build/source/libs/icu-xetex/test/intltest/calregts.cpp b/Build/source/libs/icu-xetex/test/intltest/calregts.cpp index d38bf8a9475..145956410e2 100644 --- a/Build/source/libs/icu-xetex/test/intltest/calregts.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/calregts.cpp @@ -1,7 +1,7 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and - * others. All Rights Reserved. + * Copyright (c) 1997-2006, International Business Machines Corporation + * and others. All Rights Reserved. ********************************************************************/ #include "unicode/utypes.h" @@ -215,6 +215,16 @@ CalendarRegressionTest::test4031502() UErrorCode status = U_ZERO_ERROR; StringEnumeration* ids = TimeZone::createEnumeration(); UBool bad = FALSE; + TimeZone* tz =TimeZone::createTimeZone("Asia/Riyadh87"); + failure(status, "new TimeZone"); + GregorianCalendar *cl = new GregorianCalendar(tz, status); + failure(status, "new GregorianCalendar"); + cl->clear(); + cl->set(1900, 15, 5, 5, 8, 13); + cl->get(UCAL_HOUR, status); + failure(status, "cl->get(UCAL_HOUR, status)"); + status = U_ZERO_ERROR; + delete cl; for (int32_t i=0; i<ids->count(status); ++i) { TimeZone *zone = TimeZone::createTimeZone(*ids->snext(status)); GregorianCalendar *cal = new GregorianCalendar(zone, status); @@ -1355,6 +1365,7 @@ void CalendarRegressionTest::test4125881() return; } DateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"),status); + if(!assertSuccess("trying to construct", status))return; cal->clear(); for (int32_t y=-20; y<=10; ++y) { cal->set(UCAL_ERA, y < 1 ? GregorianCalendar::BC : GregorianCalendar::AD); @@ -1384,6 +1395,7 @@ void CalendarRegressionTest::test4125892() { return; } DateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"),status); + if(!assertSuccess("trying to construct", status))return; cal->clear(); cal->set(UCAL_ERA, GregorianCalendar::BC); cal->set(UCAL_YEAR, 81); // 81 BC is a leap year (proleptically) @@ -1949,7 +1961,7 @@ void CalendarRegressionTest::TestJ81() { UErrorCode status = U_ZERO_ERROR; UnicodeString temp, temp2, temp3; int32_t i; - GregorianCalendar cal(TimeZone::createTimeZone("GMT"), status); + GregorianCalendar cal(TimeZone::createTimeZone("GMT"), Locale::getUS(), status); SimpleDateFormat fmt("HH:mm 'w'w 'd'D E d MMM yyyy", Locale::getUS(), status); if (U_FAILURE(status)) { errln("Error: Cannot create calendar or format"); diff --git a/Build/source/libs/icu-xetex/test/intltest/caltest.cpp b/Build/source/libs/icu-xetex/test/intltest/caltest.cpp index 9e909f7a435..8f021a821ee 100644 --- a/Build/source/libs/icu-xetex/test/intltest/caltest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/caltest.cpp @@ -1,6 +1,6 @@ /************************************************************************ * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ************************************************************************/ @@ -567,7 +567,7 @@ void CalendarTest::TestDisambiguation765() { UErrorCode status = U_ZERO_ERROR; - Calendar *c = Calendar::createInstance(status); + Calendar *c = Calendar::createInstance("en_US", status); if (U_FAILURE(status)) { errln("Calendar::createInstance failed"); return; } c->setLenient(FALSE); c->clear(); @@ -676,15 +676,19 @@ CalendarTest::verify765(const UnicodeString& msg, Calendar* c, int32_t year, int { UnicodeString str; UErrorCode status = U_ZERO_ERROR; - if (c->get(UCAL_YEAR, status) == year && - c->get(UCAL_MONTH, status) == month && - c->get(UCAL_DATE, status) == day) { + int32_t y = c->get(UCAL_YEAR, status); + int32_t m = c->get(UCAL_MONTH, status); + int32_t d = c->get(UCAL_DATE, status); + if ( y == year && + m == month && + d == day) { if (U_FAILURE(status)) { errln("FAIL: Calendar::get failed"); return; } logln("PASS: " + msg + dateToString(c->getTime(status), str)); if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; } } else { - errln("FAIL: " + msg + dateToString(c->getTime(status), str) + "; expected " + (int32_t)year + "/" + (int32_t)(month + 1) + "/" + (int32_t)day); + errln("FAIL: " + msg + dateToString(c->getTime(status), str) + "; expected " + (int32_t)year + "/" + (int32_t)(month + 1) + "/" + (int32_t)day + + "; got " + (int32_t)y + "/" + (int32_t)(m + 1) + "/" + (int32_t)d + " for Locale: " + c->getLocaleID(ULOC_ACTUAL_LOCALE,status)); if (U_FAILURE(status)) { errln("Calendar::getTime failed"); return; } } } diff --git a/Build/source/libs/icu-xetex/test/intltest/caltest.h b/Build/source/libs/icu-xetex/test/intltest/caltest.h index fce3d9782c9..577b47340c3 100644 --- a/Build/source/libs/icu-xetex/test/intltest/caltest.h +++ b/Build/source/libs/icu-xetex/test/intltest/caltest.h @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation + * Copyright (c) 1997-2005, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ diff --git a/Build/source/libs/icu-xetex/test/intltest/canittst.cpp b/Build/source/libs/icu-xetex/test/intltest/canittst.cpp index 58fe8aa76ae..8e97744c4d7 100644 --- a/Build/source/libs/icu-xetex/test/intltest/canittst.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/canittst.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2002-2005, International Business Machines Corporation and + * Copyright (c) 2002-2006, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************** * @@ -90,10 +90,10 @@ void CanonicalIteratorTest::TestExhaustive() { || type == U_SURROGATE) continue; s = i; - characterTest(s, i, it); + characterTest(s, i, it); s += (UChar32)0x0345; //"\\u0345"; - characterTest(s, i, it); + characterTest(s, i, it); } } @@ -176,7 +176,7 @@ void CanonicalIteratorTest::characterTest(UnicodeString &s, UChar32 ch, Canonica UBool gotComp = FALSE; UBool gotSource = FALSE; - Normalizer::decompose(s, FALSE, 0, decomp, status); + Normalizer::decompose(s, FALSE, 0, decomp, status); Normalizer::compose(s, FALSE, 0, comp, status); // skip characters that don't have either decomp. diff --git a/Build/source/libs/icu-xetex/test/intltest/canittst.h b/Build/source/libs/icu-xetex/test/intltest/canittst.h index 2a907718394..650cc089db0 100644 --- a/Build/source/libs/icu-xetex/test/intltest/canittst.h +++ b/Build/source/libs/icu-xetex/test/intltest/canittst.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2002-2005, International Business Machines Corporation and + * Copyright (c) 2002-2006, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************** * @@ -46,7 +46,7 @@ public: //static UnicodeString collectionToString(Collection col); private: void expectEqual(const UnicodeString &message, const UnicodeString &item, const UnicodeString &a, const UnicodeString &b); - void characterTest(UnicodeString &s, UChar32 ch, CanonicalIterator &it); + void characterTest(UnicodeString &s, UChar32 ch, CanonicalIterator &it); Transliterator *nameTrans; Transliterator *hexTrans; diff --git a/Build/source/libs/icu-xetex/test/intltest/citrtest.cpp b/Build/source/libs/icu-xetex/test/intltest/citrtest.cpp index 4dac28ec3d1..75bd1e583f7 100644 --- a/Build/source/libs/icu-xetex/test/intltest/citrtest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/citrtest.cpp @@ -1,6 +1,6 @@ /**************************************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. * Modification History: * @@ -143,7 +143,7 @@ CharIterTest::CharIterTest() } void CharIterTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { - if (exec) logln("TestSuite LocaleTest: "); + if (exec) logln("TestSuite CharIterTest: "); switch (index) { case 0: name = "TestConstructionAndEquality"; if (exec) TestConstructionAndEquality(); break; case 1: name = "TestConstructionAndEqualityUChariter"; if (exec) TestConstructionAndEqualityUChariter(); break; @@ -911,36 +911,51 @@ void CharIterTest::TestUCharIterator() { if(cIter.getIndex(&cIter, (enum UCharIteratorOrigin)-1) != -1) { - errln("error: UCharIterator(char iter).getIndex did not return error value"); + errln("error: UCharIterator(char iter).getIndex did not return error value"); } if(cIter.move(&cIter, 0, (enum UCharIteratorOrigin)-1) != -1) { - errln("error: UCharIterator(char iter).move did not return error value"); + errln("error: UCharIterator(char iter).move did not return error value"); } if(rIter.getIndex(&rIter, (enum UCharIteratorOrigin)-1) != -1) { - errln("error: UCharIterator(repl iter).getIndex did not return error value"); + errln("error: UCharIterator(repl iter).getIndex did not return error value"); } if(rIter.move(&rIter, 0, (enum UCharIteratorOrigin)-1) != -1) { - errln("error: UCharIterator(repl iter).move did not return error value"); + errln("error: UCharIterator(repl iter).move did not return error value"); } if(sIter.getIndex(&sIter, (enum UCharIteratorOrigin)-1) != -1) { - errln("error: UCharIterator(string iter).getIndex did not return error value"); + errln("error: UCharIterator(string iter).getIndex did not return error value"); } if(sIter.move(&sIter, 0, (enum UCharIteratorOrigin)-1) != -1) { - errln("error: UCharIterator(string iter).move did not return error value"); + errln("error: UCharIterator(string iter).move did not return error value"); } + /* Testing function coverage on bad input */ + UErrorCode status = U_ZERO_ERROR; + uiter_setString(&sIter, NULL, 1); + uiter_setState(&sIter, 1, &status); + if (status != U_UNSUPPORTED_ERROR) { + errln("error: uiter_setState returned %s instead of U_UNSUPPORTED_ERROR", u_errorName(status)); + } + status = U_ZERO_ERROR; + uiter_setState(NULL, 1, &status); + if (status != U_ILLEGAL_ARGUMENT_ERROR) { + errln("error: uiter_setState returned %s instead of U_ILLEGAL_ARGUMENT_ERROR", u_errorName(status)); + } + if (uiter_getState(&sIter) != UITER_NO_STATE) { + errln("error: uiter_getState did not return UITER_NO_STATE on bad input"); + } } // subclass test, and completing API coverage ------------------------------- diff --git a/Build/source/libs/icu-xetex/test/intltest/cntabcol.cpp b/Build/source/libs/icu-xetex/test/intltest/cntabcol.cpp index 49f254c21cd..28f38cb6f79 100644 --- a/Build/source/libs/icu-xetex/test/intltest/cntabcol.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/cntabcol.cpp @@ -1,8 +1,8 @@ /******************************************************************** - * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and - * others. All Rights Reserved. - ********************************************************************/ +* COPYRIGHT: +* Copyright (c) 1997-2006, International Business Machines Corporation and +* others. All Rights Reserved. +********************************************************************/ #include "unicode/utypes.h" @@ -13,168 +13,223 @@ U_NAMESPACE_USE ContractionTableTest::ContractionTableTest() { - status = U_ZERO_ERROR; - /*testMapping = ucmpe32_open(0, 0, 0, &status);*/ - testMapping = utrie_open(NULL, NULL, 0, 0, 0, TRUE); + testMapping = utrie_open(NULL, NULL, 0, 0, 0, TRUE); } ContractionTableTest::~ContractionTableTest() { - /*ucmpe32_close(testMapping);*/ - utrie_close(testMapping); + utrie_close(testMapping); } void ContractionTableTest::TestGrowTable(/* char* par */) { - uint32_t i = 0, res = 0; - testTable = uprv_cnttab_open(testMapping, &status); + UErrorCode status = U_ZERO_ERROR; + uint32_t i = 0, res = 0; + testTable = uprv_cnttab_open(testMapping, &status); - // fill up one contraction so that it has to expand - for(i = 0; i<65536; i++) { - uprv_cnttab_addContraction(testTable, 0, (UChar)i, i, &status); - if(U_FAILURE(status)) { - errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); - break; - } - } - // test whether the filled up contraction really contains the data we input - if(U_SUCCESS(status)) { + // fill up one contraction so that it has to expand for(i = 0; i<65536; i++) { - res = uprv_cnttab_getCE(testTable, 0, i, &status); - if(U_FAILURE(status)) { - errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); - break; - } - if(res != i) { - errln("Error: expected %i, got %i\n", i, res); - break; - } - } - } - uprv_cnttab_close(testTable); + uprv_cnttab_addContraction(testTable, 0, (UChar)i, i, &status); + if(U_FAILURE(status)) { + errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); + break; + } + } + // test whether the filled up contraction really contains the data we input + if(U_SUCCESS(status)) { + for(i = 0; i<65536; i++) { + res = uprv_cnttab_getCE(testTable, 0, i, &status); + if(U_FAILURE(status)) { + errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); + break; + } + if(res != i) { + errln("Error: expected %i, got %i\n", i, res); + break; + } + } + } + uprv_cnttab_close(testTable); } void ContractionTableTest::TestSetContraction(){ - testTable = uprv_cnttab_open(testMapping, &status); - // This should make a new contraction - uprv_cnttab_setContraction(testTable, 1, 0, 0x41, 0x41, &status); - if(U_FAILURE(status)) { - errln("Error setting a non existing contraction error = %i (%s)\n", status, u_errorName(status)); - } - // if we try to change the non existing offset, we should get an error - status = U_ZERO_ERROR; - // currently this tests whether there is enough space, maybe it should test whether the element is actually in - // range. Also, maybe a silent growing should take place.... - uprv_cnttab_setContraction(testTable, 1, 0x401, 0x41, 0x41, &status); - if(status != U_INDEX_OUTOFBOUNDS_ERROR) { - errln("changing a non-existing offset should have resulted in an error\n"); - } - status = U_ZERO_ERROR; - uprv_cnttab_close(testTable); + UErrorCode status = U_ZERO_ERROR; + testTable = uprv_cnttab_open(testMapping, &status); + // This should make a new contraction + uprv_cnttab_setContraction(testTable, 1, 0, 0x41, 0x41, &status); + if(U_FAILURE(status)) { + errln("Error setting a non existing contraction error = %i (%s)\n", status, u_errorName(status)); + } + // if we try to change the non existing offset, we should get an error + status = U_ZERO_ERROR; + // currently this tests whether there is enough space, maybe it should test whether the element is actually in + // range. Also, maybe a silent growing should take place.... + uprv_cnttab_setContraction(testTable, 1, 0x401, 0x41, 0x41, &status); + if(status != U_INDEX_OUTOFBOUNDS_ERROR) { + errln("changing a non-existing offset should have resulted in an error\n"); + } + status = U_ZERO_ERROR; + uprv_cnttab_close(testTable); } void ContractionTableTest::TestAddATableElement(){ - testTable = uprv_cnttab_open(testMapping, &status); - uint32_t i = 0, res = 0; + UErrorCode status = U_ZERO_ERROR; + testTable = uprv_cnttab_open(testMapping, &status); + uint32_t i = 0, res = 0; - // fill up one contraction so that it has to expand - for(i = 0; i<0x1000; i++) { - uprv_cnttab_addContraction(testTable, i, (UChar)i, i, &status); - if(U_FAILURE(status)) { - errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); - break; - } - } - // test whether the filled up contraction really contains the data we input - if(U_SUCCESS(status)) { + // fill up one contraction so that it has to expand for(i = 0; i<0x1000; i++) { - res = uprv_cnttab_getCE(testTable, i, 0, &status); - if(U_FAILURE(status)) { - errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); - break; - } - if(res != i) { - errln("Error: expected %i, got %i\n", i, res); - break; - } - } - } - uprv_cnttab_close(testTable); + uprv_cnttab_addContraction(testTable, i, (UChar)i, i, &status); + if(U_FAILURE(status)) { + errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); + break; + } + } + // test whether the filled up contraction really contains the data we input + if(U_SUCCESS(status)) { + for(i = 0; i<0x1000; i++) { + res = uprv_cnttab_getCE(testTable, i, 0, &status); + if(U_FAILURE(status)) { + errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); + break; + } + if(res != i) { + errln("Error: expected %i, got %i\n", i, res); + break; + } + } + } + uprv_cnttab_close(testTable); } void ContractionTableTest::TestClone(){ - testTable = uprv_cnttab_open(testMapping, &status); - int32_t i = 0, res = 0; - // we must construct table in order to copy codepoints and CEs - // fill up one contraction so that it has to expand - for(i = 0; i<0x500; i++) { - uprv_cnttab_addContraction(testTable, i, (UChar)i, i, &status); - if(U_FAILURE(status)) { - errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); - break; - } - } - uprv_cnttab_constructTable(testTable, 0, &status); - if(U_FAILURE(status)) { - errln("Error constructing table error = %i (%s)\n", status, u_errorName(status)); - } else { - testClone = uprv_cnttab_clone(testTable, &status); - if(U_SUCCESS(status)) { - for(i = 0; i<0x500; i++) { - res = uprv_cnttab_getCE(testTable, i, 0, &status); + UErrorCode status = U_ZERO_ERROR; + testTable = uprv_cnttab_open(testMapping, &status); + int32_t i = 0, res = 0; + // we must construct table in order to copy codepoints and CEs + // fill up one contraction so that it has to expand + for(i = 0; i<0x500; i++) { + uprv_cnttab_addContraction(testTable, i, (UChar)i, i, &status); if(U_FAILURE(status)) { - errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); - break; + errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); + break; } - if(res != i) { - errln("Error: expected %i, got %i\n", i, res); - break; + } + uprv_cnttab_constructTable(testTable, 0, &status); + if(U_FAILURE(status)) { + errln("Error constructing table error = %i (%s)\n", status, u_errorName(status)); + } else { + testClone = uprv_cnttab_clone(testTable, &status); + if(U_SUCCESS(status)) { + for(i = 0; i<0x500; i++) { + res = uprv_cnttab_getCE(testTable, i, 0, &status); + if(U_FAILURE(status)) { + errln("Error occurred at position %i, error = %i (%s)\n", i, status, u_errorName(status)); + break; + } + if(res != i) { + errln("Error: expected %i, got %i\n", i, res); + break; + } + } } - } - } - uprv_cnttab_close(testClone); - } - uprv_cnttab_close(testTable); - testTable = uprv_cnttab_open(testMapping, &status); - if(U_FAILURE(status)) { - errln("Error opening table error = %i (%s)\n", status, u_errorName(status)); - } - uprv_cnttab_close(testTable); + uprv_cnttab_close(testClone); + } + uprv_cnttab_close(testTable); + testTable = uprv_cnttab_open(testMapping, &status); + if(U_FAILURE(status)) { + errln("Error opening table error = %i (%s)\n", status, u_errorName(status)); + } + uprv_cnttab_close(testTable); } void ContractionTableTest::TestChangeContraction(){ - testTable = uprv_cnttab_open(testMapping, &status); - uint32_t i = 0, res = 0; - res = uprv_cnttab_changeContraction(testTable, 0, 0x41, 0xAB, &status); - if(res != 0) { - errln("found a non existing contraction!\n"); - } - - for(i = 0; i < 0x20; i+=2) { - uprv_cnttab_addContraction(testTable, 0, (UChar)i, i, &status); - } - - res = uprv_cnttab_changeContraction(testTable, 0, 0x41, 0xAB, &status); - if(res != UCOL_NOT_FOUND) { - errln("managed to change a non existing contraction!\n"); - } - - for(i = 1; i < 0x20; i+=2) { - res = uprv_cnttab_changeContraction(testTable, 0, (UChar)i, 0xAB, &status); + UErrorCode status = U_ZERO_ERROR; + testTable = uprv_cnttab_open(testMapping, &status); + uint32_t i = 0, res = 0; + res = uprv_cnttab_changeContraction(testTable, 0, 0x41, 0xAB, &status); + if(res != 0) { + errln("found a non existing contraction!\n"); + } + + for(i = 0; i < 0x20; i+=2) { + uprv_cnttab_addContraction(testTable, 0, (UChar)i, i, &status); + } + + res = uprv_cnttab_changeContraction(testTable, 0, 0x41, 0xAB, &status); if(res != UCOL_NOT_FOUND) { - errln("managed to change a non existing contraction!\n"); + errln("managed to change a non existing contraction!\n"); + } + + for(i = 1; i < 0x20; i+=2) { + res = uprv_cnttab_changeContraction(testTable, 0, (UChar)i, 0xAB, &status); + if(res != UCOL_NOT_FOUND) { + errln("managed to change a non existing contraction!\n"); + } } - } - uprv_cnttab_close(testTable); + uprv_cnttab_close(testTable); } void ContractionTableTest::TestChangeLastCE(){ - testTable = uprv_cnttab_open(testMapping, &status); - uint32_t res = uprv_cnttab_changeLastCE(testTable, 1, 0xABCD, &status); - if(res!=0) { - errln("managed to change the last CE in an non-existing contraction!\n"); - } - uprv_cnttab_close(testTable); + UErrorCode status = U_ZERO_ERROR; + testTable = uprv_cnttab_open(testMapping, &status); + uint32_t res = uprv_cnttab_changeLastCE(testTable, 1, 0xABCD, &status); + if(res!=0) { + errln("managed to change the last CE in an non-existing contraction!\n"); + } + uprv_cnttab_close(testTable); } +void ContractionTableTest::TestErrorCodeChecking(){ + UErrorCode status = U_REGEX_SET_CONTAINS_STRING; + + uprv_cnttab_open(NULL, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + uprv_cnttab_clone(NULL, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + uprv_cnttab_changeLastCE(NULL, 0, 0, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + uprv_cnttab_insertContraction(NULL, 0, 0, 0, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + uprv_cnttab_addContraction(NULL, 0, 0, 0, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + uprv_cnttab_setContraction(NULL, 0, 0, 0, 0, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + uprv_cnttab_findCP(NULL, 0, 0, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + if (uprv_cnttab_getCE(NULL, 0, 0, &status) != UCOL_NOT_FOUND) { + errln("uprv_cnttab_getCE didn't return UCOL_NOT_FOUND\n"); + } + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + if (uprv_cnttab_findCE(NULL, 0, 0, &status) != UCOL_NOT_FOUND) { + errln("uprv_cnttab_findCE didn't return UCOL_NOT_FOUND\n"); + } + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + uprv_cnttab_isTailored(NULL, 0, NULL, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } + uprv_cnttab_changeContraction(NULL, 0, 0, 0, &status); + if (status != U_REGEX_SET_CONTAINS_STRING) { + errln("Status was incorrectly modified to %s\n", u_errorName(status)); + } +} void ContractionTableTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { @@ -186,6 +241,7 @@ void ContractionTableTest::runIndexedTest( int32_t index, UBool exec, const char case 3: name = "TestClone"; if (exec) TestClone(/* par */); break; case 4: name = "TestChangeContraction"; if (exec) TestChangeContraction(/* par */); break; case 5: name = "TestChangeLastCE"; if (exec) TestChangeLastCE(/* par */); break; + case 6: name = "TestErrorCodeChecking"; if (exec) TestErrorCodeChecking(/* par */); break; default: name = ""; break; } } diff --git a/Build/source/libs/icu-xetex/test/intltest/cntabcol.h b/Build/source/libs/icu-xetex/test/intltest/cntabcol.h index 0badb914fd4..0e35d7dec0c 100644 --- a/Build/source/libs/icu-xetex/test/intltest/cntabcol.h +++ b/Build/source/libs/icu-xetex/test/intltest/cntabcol.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2001, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -29,11 +29,11 @@ public: void TestClone(); void TestChangeContraction(); void TestChangeLastCE(); + void TestErrorCodeChecking(); private: CntTable *testTable, *testClone; /*CompactEIntArray *testMapping;*/ UNewTrie *testMapping; - UErrorCode status; }; #endif /* #if !UCONFIG_NO_COLLATION */ diff --git a/Build/source/libs/icu-xetex/test/intltest/convtest.cpp b/Build/source/libs/icu-xetex/test/intltest/convtest.cpp index 791ed3c76c3..05da2ce1c1c 100644 --- a/Build/source/libs/icu-xetex/test/intltest/convtest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/convtest.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2003-2004, International Business Machines +* Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -183,7 +183,7 @@ ConversionTest::TestFromUnicode() { char charset[100], cbopt[4]; const char *option; UnicodeString s, unicode, invalidUChars; - int32_t offsetsLength; + int32_t offsetsLength, index; UConverterFromUCallback callback; TestDataModule *dataModule; @@ -242,15 +242,17 @@ ConversionTest::TestFromUnicode() { } s=testCase->getString("callback", errorCode); + cc.setSub=0; // default: no subchar - // read NUL-separated subchar first, if any - length=u_strlen(p=s.getTerminatedBuffer()); - if(++length<s.length()) { + if((index=s.indexOf((UChar)0))>0) { + // read NUL-separated subchar first, if any // copy the subchar from Latin-1 characters // start after the NUL + p=s.getTerminatedBuffer(); + length=index+1; p+=length; length=s.length()-length; - if(length>=(int32_t)sizeof(cc.subchar)) { + if(length<=0 || length>=(int32_t)sizeof(cc.subchar)) { errorCode=U_ILLEGAL_ARGUMENT_ERROR; } else { int32_t j; @@ -260,13 +262,26 @@ ConversionTest::TestFromUnicode() { } // NUL-terminate the subchar cc.subchar[j]=0; + cc.setSub=1; } // remove the NUL and subchar from s - s.truncate(u_strlen(s.getBuffer())); - } else { - // no subchar - cc.subchar[0]=0; + s.truncate(index); + } else if((index=s.indexOf((UChar)0x3d))>0) /* '=' */ { + // read a substitution string, separated by an equal sign + p=s.getBuffer()+index+1; + length=s.length()-(index+1); + if(length<0 || length>=LENGTHOF(cc.subString)) { + errorCode=U_ILLEGAL_ARGUMENT_ERROR; + } else { + u_memcpy(cc.subString, p, length); + // NUL-terminate the subString + cc.subString[length]=0; + cc.setSub=-1; + } + + // remove the equal sign and subString from s + s.truncate(index); } s.extract(0, 0x7fffffff, cbopt, sizeof(cbopt), ""); @@ -325,6 +340,7 @@ ConversionTest::TestGetUnicodeSet() { ParsePosition pos; UnicodeSet cnvSet, mapSet, mapnotSet, diffSet; + UnicodeSet *cnvSetPtr = &cnvSet; UConverter *cnv; TestDataModule *dataModule; @@ -395,7 +411,7 @@ ConversionTest::TestGetUnicodeSet() { continue; } - ucnv_getUnicodeSet(cnv, (USet *)&cnvSet, (UConverterUnicodeSet)which, &errorCode); + ucnv_getUnicodeSet(cnv, (USet *)cnvSetPtr, (UConverterUnicodeSet)which, &errorCode); ucnv_close(cnv); if(U_FAILURE(errorCode)) { @@ -1051,10 +1067,19 @@ ConversionTest::FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback call // set the subchar int32_t length; - if((length=(int32_t)strlen(cc.subchar))!=0) { + if(cc.setSub>0) { + length=(int32_t)strlen(cc.subchar); ucnv_setSubstChars(cnv, cc.subchar, (int8_t)length, &errorCode); if(U_FAILURE(errorCode)) { - errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setSubChars() failed - %s", + errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setSubstChars() failed - %s", + cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode)); + ucnv_close(cnv); + return FALSE; + } + } else if(cc.setSub<0) { + ucnv_setSubstString(cnv, cc.subString, -1, &errorCode); + if(U_FAILURE(errorCode)) { + errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setSubstString() failed - %s", cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode)); ucnv_close(cnv); return FALSE; diff --git a/Build/source/libs/icu-xetex/test/intltest/convtest.h b/Build/source/libs/icu-xetex/test/intltest/convtest.h index b98aec0c492..8fbde250fab 100644 --- a/Build/source/libs/icu-xetex/test/intltest/convtest.h +++ b/Build/source/libs/icu-xetex/test/intltest/convtest.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2003, International Business Machines +* Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -29,7 +29,9 @@ struct ConversionCase { int32_t caseNr; const char *charset, *cbopt, *name; + UChar subString[16]; char subchar[8]; + int8_t setSub; const uint8_t *bytes; int32_t bytesLength; diff --git a/Build/source/libs/icu-xetex/test/intltest/csdetest.cpp b/Build/source/libs/icu-xetex/test/intltest/csdetest.cpp new file mode 100644 index 00000000000..821afad3a1b --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/csdetest.cpp @@ -0,0 +1,518 @@ +/* + ********************************************************************** + * Copyright (C) 2005-2006, International Business Machines + * Corporation and others. All Rights Reserved. + ********************************************************************** + */ + + +#include "unicode/utypes.h" +#include "unicode/ucsdet.h" +#include "unicode/ucnv.h" +#include "unicode/unistr.h" +#include "unicode/putil.h" + +#include "intltest.h" +#include "csdetest.h" + +#include "xmlparser.h" + +#include <stdlib.h> +#include <string.h> + +#ifdef DEBUG_DETECT +#include <stdio.h> +#endif + +#define ARRAY_SIZE(array) (sizeof array / sizeof array[0]) + +#define NEW_ARRAY(type,count) (type *) /*uprv_*/malloc((count) * sizeof(type)) +#define DELETE_ARRAY(array) /*uprv_*/free((void *) (array)) + +#define CH_SPACE 0x0020 +#define CH_SLASH 0x002F + +//--------------------------------------------------------------------------- +// +// Test class boilerplate +// +//--------------------------------------------------------------------------- +CharsetDetectionTest::CharsetDetectionTest() +{ +} + + +CharsetDetectionTest::~CharsetDetectionTest() +{ +} + + + +void CharsetDetectionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) +{ + if (exec) logln("TestSuite CharsetDetectionTest: "); + switch (index) { + case 0: name = "ConstructionTest"; + if (exec) ConstructionTest(); + break; + + case 1: name = "UTF8Test"; + if (exec) UTF8Test(); + break; + + case 2: name = "UTF16Test"; + if (exec) UTF16Test(); + break; + + case 3: name = "C1BytesTest"; + if (exec) C1BytesTest(); + break; + + case 4: name = "InputFilterTest"; + if (exec) InputFilterTest(); + break; + + case 5: name = "DetectionTest"; + if (exec) DetectionTest(); + break; + + default: name = ""; + break; //needed to end loop + } +} + +static UnicodeString *split(const UnicodeString &src, UChar ch, int32_t &splits) +{ + int32_t offset = -1; + + splits = 1; + while((offset = src.indexOf(ch, offset + 1)) >= 0) { + splits += 1; + } + + UnicodeString *result = new UnicodeString[splits]; + + int32_t start = 0; + int32_t split = 0; + int32_t end; + + while((end = src.indexOf(ch, start)) >= 0) { + src.extractBetween(start, end, result[split++]); + start = end + 1; + } + + src.extractBetween(start, src.length(), result[split]); + + return result; +} + +static char *extractBytes(const UnicodeString &source, const char *codepage, int32_t &length) +{ + int32_t sLength = source.length(); + char *bytes = NULL; + + length = source.extract(0, sLength, NULL, codepage); + + if (length > 0) { + bytes = NEW_ARRAY(char, length + 1); + source.extract(0, sLength, bytes, codepage); + } + + return bytes; +} + +static void freeBytes(char *bytes) +{ + DELETE_ARRAY(bytes); +} + +void CharsetDetectionTest::checkEncoding(const UnicodeString &testString, const UnicodeString &encoding, const UnicodeString &id) +{ + int32_t splits = 0; + int32_t testLength = testString.length(); + UnicodeString *eSplit = split(encoding, CH_SLASH, splits); + UErrorCode status = U_ZERO_ERROR; + int32_t cpLength = eSplit[0].length(); + char codepage[64]; + + u_UCharsToChars(eSplit[0].getBuffer(), codepage, cpLength); + codepage[cpLength] = '\0'; + + UCharsetDetector *csd = ucsdet_open(&status); + + int32_t byteLength = 0; + char *bytes = extractBytes(testString, codepage, byteLength); + + if (bytes == NULL) { +#if !UCONFIG_NO_LEGACY_CONVERSION + errln("Can't open a " + encoding + " converter for " + id); +#endif + return; + } + + ucsdet_setText(csd, bytes, byteLength, &status); + + int32_t matchCount = 0; + const UCharsetMatch **matches = ucsdet_detectAll(csd, &matchCount, &status); + + + UnicodeString name(ucsdet_getName(matches[0], &status)); + UnicodeString lang(ucsdet_getLanguage(matches[0], &status)); + UChar *decoded = NULL; + int32_t dLength = 0; + + if (matchCount == 0) { + errln("Encoding detection failure for " + id + ": expected " + eSplit[0] + ", got no matches"); + goto bail; + } + + if (name.compare(eSplit[0]) != 0) { + errln("Encoding detection failure for " + id + ": expected " + eSplit[0] + ", got " + name); + +#ifdef DEBUG_DETECT + for (int32_t m = 0; m < matchCount; m += 1) { + const char *name = ucsdet_getName(matches[m], &status); + const char *lang = ucsdet_getLanguage(matches[m], &status); + int32_t confidence = ucsdet_getConfidence(matches[m], &status); + + printf("%s (%s) %d\n", name, lang, confidence); + } +#endif + goto bail; + } + + if (splits > 1 && lang.compare(eSplit[1]) != 0) { + errln("Language detection failure for " + id + ", " + eSplit[0] + ": expected " + eSplit[1] + ", got " + lang); + goto bail; + } + + decoded = NEW_ARRAY(UChar, testLength); + dLength = ucsdet_getUChars(matches[0], decoded, testLength, &status); + + if (testString.compare(decoded, dLength) != 0) { + errln("Round-trip error for " + id + ", " + eSplit[0] + ": getUChars() didn't yeild the original string."); + +#ifdef DEBUG_DETECT + for(int32_t i = 0; i < testLength; i += 1) { + if(testString[i] != decoded[i]) { + printf("Strings differ at byte %d\n", i); + break; + } + } +#endif + + } + + DELETE_ARRAY(decoded); + +bail: + freeBytes(bytes); + ucsdet_close(csd); + delete[] eSplit; +} + +const char *CharsetDetectionTest::getPath(char buffer[2048], const char *filename) { + UErrorCode status = U_ZERO_ERROR; + const char *testDataDirectory = IntlTest::getSourceTestData(status); + + if (U_FAILURE(status)) { + errln("ERROR: getPath() failed - %s", u_errorName(status)); + return NULL; + } + + strcpy(buffer, testDataDirectory); + strcat(buffer, filename); + return buffer; +} + +void CharsetDetectionTest::ConstructionTest() +{ + UErrorCode status = U_ZERO_ERROR; + UCharsetDetector *csd = ucsdet_open(&status); + UEnumeration *e = ucsdet_getAllDetectableCharsets(csd, &status); + int32_t count = uenum_count(e, &status); + +#ifdef DEBUG_DETECT + printf("There are %d recognizers.\n", count); +#endif + + for(int32_t i = 0; i < count; i += 1) { + int32_t length; + const char *name = uenum_next(e, &length, &status); + + if(name == NULL || length <= 0) { + errln("ucsdet_getAllDetectableCharsets() returned a null or empty name!"); + } + +#ifdef DEBUG_DETECT + printf("%s\n", name); +#endif + } + + uenum_close(e); + ucsdet_close(csd); +} + +void CharsetDetectionTest::UTF8Test() +{ + UErrorCode status = U_ZERO_ERROR; + UnicodeString ss = "This is a string with some non-ascii characters that will " + "be converted to UTF-8, then shoved through the detection process. " + "\\u0391\\u0392\\u0393\\u0394\\u0395" + "Sure would be nice if our source could contain Unicode directly!"; + UnicodeString s = ss.unescape(); + int32_t byteLength = 0, sLength = s.length(); + char *bytes = extractBytes(s, "UTF-8", byteLength); + UCharsetDetector *csd = ucsdet_open(&status); + const UCharsetMatch *match; + UChar *detected = NEW_ARRAY(UChar, sLength); + + ucsdet_setText(csd, bytes, byteLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + errln("Detection failure for UTF-8: got no matches."); + goto bail; + } + + ucsdet_getUChars(match, detected, sLength, &status); + + if (s.compare(detected, sLength) != 0) { + errln("Round-trip test failed!"); + } + + ucsdet_setDeclaredEncoding(csd, "UTF-8", 5, &status); /* for coverage */ + +bail: + DELETE_ARRAY(detected); + freeBytes(bytes); + ucsdet_close(csd); +} + +void CharsetDetectionTest::UTF16Test() +{ + UErrorCode status = U_ZERO_ERROR; + /* Notice the BOM on the start of this string */ + UChar chars[] = { + 0xFEFF, 0x0623, 0x0648, 0x0631, 0x0648, 0x0628, 0x0627, 0x002C, + 0x0020, 0x0628, 0x0631, 0x0645, 0x062c, 0x064a, 0x0627, 0x062a, + 0x0020, 0x0627, 0x0644, 0x062d, 0x0627, 0x0633, 0x0648, 0x0628, + 0x0020, 0x002b, 0x0020, 0x0627, 0x0646, 0x062a, 0x0631, 0x0646, + 0x064a, 0x062a, 0x0000}; + UnicodeString s(chars); + int32_t beLength = 0, leLength = 0; + char *beBytes = extractBytes(s, "UTF-16BE", beLength); + char *leBytes = extractBytes(s, "UTF-16LE", leLength); + UCharsetDetector *csd = ucsdet_open(&status); + const UCharsetMatch *match; + const char *name; + int32_t conf; + + ucsdet_setText(csd, beBytes, beLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + errln("Encoding detection failure for UTF-16BE: got no matches."); + goto try_le; + } + + name = ucsdet_getName(match, &status); + conf = ucsdet_getConfidence(match, &status); + + if (strcmp(name, "UTF-16BE") != 0) { + errln("Encoding detection failure for UTF-16BE: got %s", name); + goto try_le; // no point in looking at confidence if we got the wrong character set. + } + + if (conf != 100) { + errln("Did not get 100%% confidence for UTF-16BE: got %d", conf); + } + +try_le: + ucsdet_setText(csd, leBytes, leLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + errln("Encoding detection failure for UTF-16LE: got no matches."); + goto bail; + } + + name = ucsdet_getName(match, &status); + conf = ucsdet_getConfidence(match, &status); + + + if (strcmp(name, "UTF-16LE") != 0) { + errln("Enconding detection failure for UTF-16LE: got %s", name); + goto bail; // no point in looking at confidence if we got the wrong character set. + } + + if (conf != 100) { + errln("Did not get 100%% confidence for UTF-16LE: got %d", conf); + } + +bail: + freeBytes(leBytes); + freeBytes(beBytes); + ucsdet_close(csd); +} + +void CharsetDetectionTest::InputFilterTest() +{ + UErrorCode status = U_ZERO_ERROR; + UnicodeString ss = "<a> <lot> <of> <English> <inside> <the> <markup> Un tr\\u00E8s petit peu de Fran\\u00E7ais. <to> <confuse> <the> <detector>"; + UnicodeString s = ss.unescape(); + int32_t byteLength = 0; + char *bytes = extractBytes(s, "ISO-8859-1", byteLength); + UCharsetDetector *csd = ucsdet_open(&status); + const UCharsetMatch *match; + const char *lang, *name; + + ucsdet_enableInputFilter(csd, TRUE); + + if (!ucsdet_isInputFilterEnabled(csd)) { + errln("ucsdet_enableInputFilter(csd, TRUE) did not enable input filter!"); + } + + + ucsdet_setText(csd, bytes, byteLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + errln("Turning on the input filter resulted in no matches."); + goto turn_off; + } + + name = ucsdet_getName(match, &status); + + if (name == NULL || strcmp(name, "ISO-8859-1") != 0) { + errln("Turning on the input filter resulted in %s rather than ISO-8859-1.", name); + } else { + lang = ucsdet_getLanguage(match, &status); + + if (lang == NULL || strcmp(lang, "fr") != 0) { + errln("Input filter did not strip markup!"); + } + } + +turn_off: + ucsdet_enableInputFilter(csd, FALSE); + ucsdet_setText(csd, bytes, byteLength, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + errln("Turning off the input filter resulted in no matches."); + goto bail; + } + + name = ucsdet_getName(match, &status); + + if (name == NULL || strcmp(name, "ISO-8859-1") != 0) { + errln("Turning off the input filter resulted in %s rather than ISO-8859-1.", name); + } else { + lang = ucsdet_getLanguage(match, &status); + + if (lang == NULL || strcmp(lang, "en") != 0) { + errln("Unfiltered input did not detect as English!"); + } + } + +bail: + freeBytes(bytes); + ucsdet_close(csd); +} + +void CharsetDetectionTest::C1BytesTest() +{ +#if !UCONFIG_NO_LEGACY_CONVERSION + UErrorCode status = U_ZERO_ERROR; + UnicodeString sISO = "This is a small sample of some English text. Just enough to be sure that it detects correctly."; + UnicodeString ssWindows = "This is another small sample of some English text. Just enough to be sure that it detects correctly. It also includes some \\u201CC1\\u201D bytes."; + UnicodeString sWindows = ssWindows.unescape(); + int32_t lISO = 0, lWindows = 0; + char *bISO = extractBytes(sISO, "ISO-8859-1", lISO); + char *bWindows = extractBytes(sWindows, "windows-1252", lWindows); + UCharsetDetector *csd = ucsdet_open(&status); + const UCharsetMatch *match; + const char *name; + + ucsdet_setText(csd, bWindows, lWindows, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + errln("English test with C1 bytes got no matches."); + goto bail; + } + + name = ucsdet_getName(match, &status); + + if (strcmp(name, "windows-1252") != 0) { + errln("English text with C1 bytes does not detect as windows-1252, but as %s", name); + } + + ucsdet_setText(csd, bISO, lISO, &status); + match = ucsdet_detect(csd, &status); + + if (match == NULL) { + errln("English text without C1 bytes got no matches."); + goto bail; + } + + name = ucsdet_getName(match, &status); + + if (strcmp(name, "ISO-8859-1") != 0) { + errln("English text without C1 bytes does not detect as ISO-8859-1, but as %s", name); + } + +bail: + freeBytes(bWindows); + freeBytes(bISO); + + ucsdet_close(csd); +#endif +} + +void CharsetDetectionTest::DetectionTest() +{ +#if !UCONFIG_NO_REGULAR_EXPRESSIONS + UErrorCode status = U_ZERO_ERROR; + char path[2048]; + const char *testFilePath = getPath(path, "csdetest.xml"); + + if (testFilePath == NULL) { + return; /* Couldn't get path: error message already output. */ + } + + UXMLParser *parser = UXMLParser::createParser(status); + if (!assertSuccess("UXMLParser::createParser",status)) return; + UXMLElement *root = parser->parseFile(testFilePath, status); + if (!assertSuccess( "parseFile",status)) return; + + UnicodeString test_case = UNICODE_STRING_SIMPLE("test-case"); + UnicodeString id_attr = UNICODE_STRING_SIMPLE("id"); + UnicodeString enc_attr = UNICODE_STRING_SIMPLE("encodings"); + + const UXMLElement *testCase; + int32_t tc = 0; + + while((testCase = root->nextChildElement(tc)) != NULL) { + if (testCase->getTagName().compare(test_case) == 0) { + const UnicodeString *id = testCase->getAttribute(id_attr); + const UnicodeString *encodings = testCase->getAttribute(enc_attr); + const UnicodeString text = testCase->getText(TRUE); + int32_t encodingCount; + UnicodeString *encodingList = split(*encodings, CH_SPACE, encodingCount); + + for(int32_t e = 0; e < encodingCount; e += 1) { + checkEncoding(text, encodingList[e], *id); + } + + delete[] encodingList; + } + } + + delete root; + delete parser; +#endif +} + + diff --git a/Build/source/libs/icu-xetex/test/intltest/csdetest.h b/Build/source/libs/icu-xetex/test/intltest/csdetest.h new file mode 100644 index 00000000000..223a640a57b --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/csdetest.h @@ -0,0 +1,39 @@ +/* + ********************************************************************** + * Copyright (C) 2005-2006, International Business Machines + * Corporation and others. All Rights Reserved. + ********************************************************************** + */ + +#ifndef __CSDETEST_H +#define __CSDETEST_H + +#include "unicode/utypes.h" +#include "unicode/unistr.h" + +#include "intltest.h" + +class CharsetDetectionTest: public IntlTest { +public: + + CharsetDetectionTest(); + virtual ~CharsetDetectionTest(); + + virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ); + + virtual void ConstructionTest(); + virtual void UTF8Test(); + virtual void UTF16Test(); + virtual void C1BytesTest(); + virtual void InputFilterTest(); + virtual void DetectionTest(); + +private: + void checkEncoding(const UnicodeString &testString, + const UnicodeString &encoding, const UnicodeString &id); + + virtual const char *getPath(char buffer[2048], const char *filename); + +}; + +#endif diff --git a/Build/source/libs/icu-xetex/test/intltest/dtfmrgts.cpp b/Build/source/libs/icu-xetex/test/intltest/dtfmrgts.cpp index 7eae05692d6..b4d5ee4ab82 100644 --- a/Build/source/libs/icu-xetex/test/intltest/dtfmrgts.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/dtfmrgts.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -279,7 +279,7 @@ void DateFormatRegressionTest::Test4059917(void) UnicodeString myDate; fmt = new SimpleDateFormat( UnicodeString("yyyy/MM/dd"), status ); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; myDate = "1997/01/01"; aux917( fmt, myDate ); @@ -287,7 +287,7 @@ void DateFormatRegressionTest::Test4059917(void) fmt = NULL; fmt = new SimpleDateFormat( UnicodeString("yyyyMMdd"), status ); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; myDate = "19970101"; aux917( fmt, myDate ); @@ -335,7 +335,7 @@ void DateFormatRegressionTest::Test4060212(void) logln("Using yyyy-DDD.hh:mm:ss"); UErrorCode status = U_ZERO_ERROR; SimpleDateFormat *formatter = new SimpleDateFormat(UnicodeString("yyyy-DDD.hh:mm:ss"), status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; ParsePosition pos(0); UDate myDate = formatter->parse( dateString, pos ); UnicodeString myString; @@ -362,7 +362,7 @@ void DateFormatRegressionTest::Test4060212(void) delete formatter; formatter = NULL; formatter = new SimpleDateFormat(UnicodeString("yyyy-ddd.hh:mm:ss"), status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; pos.setIndex(0); myDate = formatter->parse( dateString, pos ); myString = fmt->format( myDate, myString ); @@ -703,7 +703,7 @@ void DateFormatRegressionTest::Test4101483(void) { UErrorCode status = U_ZERO_ERROR; SimpleDateFormat *sdf = new SimpleDateFormat(UnicodeString("z"), Locale::getUS(), status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; FieldPosition fp(UDAT_TIMEZONE_FIELD); //Date d = date(9234567890L); UDate d = 9234567890.0; @@ -736,7 +736,7 @@ void DateFormatRegressionTest::Test4103340(void) // and some arbitrary time UDate d = date(97, 3, 1, 1, 1, 1); SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("MMMM"), Locale::getUS(), status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; UnicodeString s; s = dateToString(d, s); @@ -795,7 +795,7 @@ void DateFormatRegressionTest::Test4104136(void) delete sdf; return; } - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; UnicodeString pattern = "'time' hh:mm"; sdf->applyPattern(pattern); logln("pattern: \"" + pattern + "\""); @@ -1002,7 +1002,7 @@ void DateFormatRegressionTest::Test4134203(void) UErrorCode status = U_ZERO_ERROR; UnicodeString dateFormat = "MM/dd/yy HH:mm:ss zzz"; SimpleDateFormat *fmt = new SimpleDateFormat(dateFormat, status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; ParsePosition p0(0); UDate d = fmt->parse("01/22/92 04:52:00 GMT", p0); logln(dateToString(d)); @@ -1024,7 +1024,7 @@ void DateFormatRegressionTest::Test4151631(void) logln("pattern=" + pattern); UErrorCode status = U_ZERO_ERROR; SimpleDateFormat *format = new SimpleDateFormat(pattern, Locale::getUS(), status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; UnicodeString result; FieldPosition pos(FieldPosition::DONT_CARE); result = format->format(date(1998-1900, UCAL_JUNE, 30, 13, 30, 0), result, pos); @@ -1048,7 +1048,7 @@ void DateFormatRegressionTest::Test4151706(void) UnicodeString dateString("Thursday, 31-Dec-98 23:00:00 GMT"); UErrorCode status = U_ZERO_ERROR; SimpleDateFormat fmt(UnicodeString("EEEE, dd-MMM-yy HH:mm:ss z"), Locale::getUS(), status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; //try { UDate d = fmt.parse(dateString, status); failure(status, "fmt->parse"); @@ -1075,8 +1075,10 @@ DateFormatRegressionTest::Test4162071(void) UnicodeString format("EEE', 'dd-MMM-yyyy HH:mm:ss z"); // RFC 822/1123 UErrorCode status = U_ZERO_ERROR; SimpleDateFormat df(format, Locale::getUS(), status); - if(U_FAILURE(status)) + if(U_FAILURE(status)) { errln("Couldn't create SimpleDateFormat"); + return; + } //try { UDate x = df.parse(dateString, status); diff --git a/Build/source/libs/icu-xetex/test/intltest/dtfmtrtts.cpp b/Build/source/libs/icu-xetex/test/intltest/dtfmtrtts.cpp index 0bc31ba5b8e..152ec5a595b 100644 --- a/Build/source/libs/icu-xetex/test/intltest/dtfmtrtts.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/dtfmtrtts.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -54,6 +54,7 @@ DateFormatRoundTripTest::runIndexedTest( int32_t index, UBool exec, const char* optionv = (par && *par=='v'); switch (index) { CASE(0,TestDateFormatRoundTrip) + CASE(1, TestCentury) default: name = ""; break; } } @@ -82,6 +83,26 @@ DateFormatRoundTripTest::failure(UErrorCode status, const char* msg, const Unico return FALSE; } +void DateFormatRoundTripTest::TestCentury() +{ + UErrorCode status = U_ZERO_ERROR; + Locale locale("es_PA"); + UnicodeString pattern = "MM/dd/yy hh:mm:ss a z"; + SimpleDateFormat fmt(pattern, locale, status); + if(!assertSuccess("trying to construct", status))return; + UDate date[] = {-55018555891590.05, 0, 0}; + UnicodeString result[2]; + + fmt.format(date[0], result[0]); + date[1] = fmt.parse(result[0], status); + fmt.format(date[1], result[1]); + date[2] = fmt.parse(result[1], status); + + if (date[1] != date[2] || result[0] != result[1]) { + errln("Round trip failure: \"%S\" (%f), \"%S\" (%f)", result[0].getBuffer(), date[1], result[1].getBuffer(), date[2]); + } +} + // == void DateFormatRoundTripTest::TestDateFormatRoundTrip() @@ -90,6 +111,7 @@ void DateFormatRoundTripTest::TestDateFormatRoundTrip() getFieldCal = Calendar::createInstance(status); failure(status, "Calendar::createInstance"); + if(!assertSuccess("trying to construct", status))return; int32_t locCount = 0; @@ -255,7 +277,7 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB // patterns we have, but it may be a problem later. UBool hasEra = (pat.indexOf(UnicodeString("G")) != -1); - UBool hasZone = (pat.indexOf(UnicodeString("Z")) != -1) || (pat.indexOf(UnicodeString("z")) != -1); + UBool hasZone = (pat.indexOf(UnicodeString("Z")) != -1) || (pat.indexOf(UnicodeString("z")) != -1) || (pat.indexOf(UnicodeString("v")) != -1); // Because patterns contain incomplete data representing the Date, // we must be careful of how we do the roundtrip. We start with @@ -289,7 +311,7 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB for(loop = 0; loop < DEPTH; ++loop) { if (loop > 0) { d[loop] = fmt->parse(s[loop-1], status); - failure(status, "fmt->parse", s[loop-1]); + failure(status, "fmt->parse", s[loop-1]+" in locale: " + origLocale.getName()); status = U_ZERO_ERROR; /* any error would have been reported */ } diff --git a/Build/source/libs/icu-xetex/test/intltest/dtfmtrtts.h b/Build/source/libs/icu-xetex/test/intltest/dtfmtrtts.h index 62db9e426e1..1749d0e6826 100644 --- a/Build/source/libs/icu-xetex/test/intltest/dtfmtrtts.h +++ b/Build/source/libs/icu-xetex/test/intltest/dtfmtrtts.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -30,6 +30,7 @@ public: virtual ~DateFormatRoundTripTest(); void TestDateFormatRoundTrip(void); + void TestCentury(void); void test(const Locale& loc); void test(DateFormat *fmt, const Locale &origLocale, UBool timeOnly = FALSE ); int32_t getField(UDate d, int32_t f); diff --git a/Build/source/libs/icu-xetex/test/intltest/dtfmttst.cpp b/Build/source/libs/icu-xetex/test/intltest/dtfmttst.cpp index 4e78305a96f..7d18605ec31 100644 --- a/Build/source/libs/icu-xetex/test/intltest/dtfmttst.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/dtfmttst.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -20,6 +20,20 @@ #include "cstring.h" #include "caltest.h" // for fieldName +#ifdef U_WINDOWS +#include "windttst.h" +#endif + +#define ARRAY_SIZE(array) (sizeof array / sizeof array[0]) + +#define ASSERT_OK(status) if(U_FAILURE(status)) {errln(#status " = %s", u_errorName(status)); return; } + +//-------------------------------------------------------------------- +// Time bomb - allows temporary behavior that expires at a given +// release +//-------------------------------------------------------------------- +static const UVersionInfo ICU_37 = {3,7,0,0}; + // ***************************************************************************** // class DateFormatTest // ***************************************************************************** @@ -54,6 +68,13 @@ void DateFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &nam TESTCASE(23,TestGreekMay); TESTCASE(24,TestGenericTime); TESTCASE(25,TestGenericTimeZoneOrder); + TESTCASE(26,TestTimeZoneStringsAPI); + TESTCASE(27,TestHost); + TESTCASE(28,TestEras); + TESTCASE(29,TestNarrowNames); + TESTCASE(30,TestStandAloneDays); + TESTCASE(31,TestStandAloneMonths); + TESTCASE(32,TestQuarters); default: name = ""; break; } } @@ -175,6 +196,9 @@ DateFormatTest::TestEquals() if (!(*fmtA == *fmtB)) errln((UnicodeString)"FAIL"); delete fmtA; delete fmtB; + + TimeZone* test = TimeZone::createTimeZone("PDT"); + delete test; } // ------------------------------------- @@ -190,13 +214,27 @@ DateFormatTest::TestTwoDigitYearDSTParse(void) SimpleDateFormat *fmt = new SimpleDateFormat((UnicodeString)"dd-MMM-yy h:mm:ss 'o''clock' a z", Locale::getEnglish(), status); //DateFormat* fmt = DateFormat::createDateTimeInstance(DateFormat::MEDIUM, DateFormat::FULL, Locale::ENGLISH); UnicodeString* s = new UnicodeString("03-Apr-04 2:20:47 o'clock AM PST", ""); - int32_t hour = 2; - + TimeZone* defaultTZ = TimeZone::createDefault(); + TimeZone* PST = TimeZone::createTimeZone("PST"); + int32_t defaultOffset = defaultTZ->getRawOffset(); + int32_t PSTOffset = PST->getRawOffset(); + int32_t hour = 2 + (defaultOffset - PSTOffset) / (60*60*1000); + // hour is the expected hour of day, in units of seconds + hour = ((hour < 0) ? hour + 24 : hour) * 60*60; + UnicodeString str; + + if(U_FAILURE(status)) { + errln("Could not set up test. exitting"); + return; + } + UDate d = fmt->parse(*s, status); logln(*s + " P> " + ((DateFormat*)fullFmt)->format(d, str)); int32_t y, m, day, hr, min, sec; dateToFields(d, y, m, day, hr, min, sec); + hour += defaultTZ->inDaylightTime(d, status) ? 1 : 0; + hr = hr*60*60; if (hr != hour) errln((UnicodeString)"FAIL: Should parse to hour " + hour + " but got " + hr); @@ -206,6 +244,8 @@ DateFormatTest::TestTwoDigitYearDSTParse(void) delete s; delete fmt; delete fullFmt; + delete PST; + delete defaultTZ; } // ------------------------------------- @@ -236,7 +276,7 @@ DateFormatTest::escape(UnicodeString& s) /** * This MUST be kept in sync with DateFormatSymbols.gPatternChars. */ -static const char* PATTERN_CHARS = "GyMdkHmsSEDFwWahKzYeugAZvcL"; +static const char* PATTERN_CHARS = "GyMdkHmsSEDFwWahKzYeugAZvcLQq"; /** * A list of the names of all the fields in DateFormat. @@ -269,7 +309,9 @@ static const char* DATEFORMAT_FIELD_NAMES[] = { "TIMEZONE_RFC_FIELD", "GENERIC_TIMEZONE_FIELD", "STAND_ALONE_DAY_FIELD", - "STAND_ALONE_MONTH_FIELD" + "STAND_ALONE_MONTH_FIELD", + "QUARTER_FIELD", + "STAND_ALONE_QUARTER_FIELD" }; static const int32_t DATEFORMAT_FIELD_NAMES_LENGTH = @@ -286,7 +328,13 @@ void DateFormatTest::TestFieldPosition() { // Verify data DateFormatSymbols rootSyms(Locale(""), ec); assertSuccess("DateFormatSymbols", ec); - assertEquals("patternChars", PATTERN_CHARS, rootSyms.getLocalPatternChars(buf)); + + // local pattern chars not accurate when CLDR 1.4 data + // first introduced... + if(isICUVersionAtLeast(ICU_37)) { + assertEquals("patternChars", PATTERN_CHARS, rootSyms.getLocalPatternChars(buf)); + } + assertEquals("patternChars", PATTERN_CHARS, DateFormatSymbols::getPatternUChars()); assertTrue("DATEFORMAT_FIELD_NAMES", DATEFORMAT_FIELD_NAMES_LENGTH == UDAT_FIELD_COUNT); assertTrue("Data", UDAT_FIELD_COUNT == uprv_strlen(PATTERN_CHARS)); @@ -317,16 +365,17 @@ void DateFormatTest::TestFieldPosition() { // Fields are given in order of DateFormat field number const char* EXPECTED[] = { "", "1997", "August", "13", "", "", "34", "12", "", - "Wednesday", "", "", "", "", "PM", "2", "", "PDT", "", "", "", "", "", "", "", "","", + "Wednesday", "", "", "", "", "PM", "2", "", "", "", "", "", "", "", "", "PT", "", "", "", "", "", "1997", "ao\\u00FBt", "13", "", "14", "34", "", "", - "mercredi", "", "", "", "", "", "", "", "HAP (\\u00C9UA)", "", "", "", "", "", "", "", "","", + "mercredi", "", "", "", "", "", "", "", "HAP (\\u00C9UA)", "", "", "", "", "", "", "", "", "", "", "", "AD", "1997", "8", "13", "14", "14", "34", "12", "5", - "Wed", "225", "2", "33", "3", "PM", "2", "2", "PDT", "1997", "4", "1997", "2450674", "52452513", "-0700", "PT", "4","8", + "Wed", "225", "2", "33", "3", "PM", "2", "2", "PDT", "1997", "4", "1997", "2450674", "52452513", "-0700", "PT", "4", "8", "3", "3", "Anno Domini", "1997", "August", "0013", "0014", "0014", "0034", "0012", "5130", - "Wednesday", "0225", "0002", "0033", "0003", "PM", "0002", "0002", "Pacific Daylight Time", "1997", "0004", "1997", "2450674", "52452513", "-0700", "Pacific Time", "Wednesday", "August" + "Wednesday", "0225", "0002", "0033", "0003", "PM", "0002", "0002", "Pacific Daylight Time", "1997", "0004", "1997", "2450674", "52452513", "-0700", + "Pacific Time", "Wednesday", "August", "3rd quarter", "3rd quarter" }; const int32_t EXPECTED_LENGTH = sizeof(EXPECTED)/sizeof(EXPECTED[0]); @@ -347,7 +396,8 @@ void DateFormatTest::TestFieldPosition() { for (i = 0; i < UDAT_FIELD_COUNT; ++i, ++exp) { FieldPosition pos(i); - df->format(aug13, buf.remove(), pos); + buf.remove(); + df->format(aug13, buf, pos); UnicodeString field; buf.extractBetween(pos.getBeginIndex(), pos.getEndIndex(), field); assertEquals((UnicodeString)"field #" + i + " " + DATEFORMAT_FIELD_NAMES[i], @@ -376,7 +426,7 @@ void DateFormatTest::TestGeneral() { "y/M/d H:mm:ss.SSS", "F", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.567", "y/M/d H:mm:ss.SSSS", "pf", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.568", "2004/3/10 16:36:31.5680", }; - expect(DATA, sizeof(DATA)/sizeof(DATA[0]), Locale("en", "", "")); + expect(DATA, ARRAY_SIZE(DATA), Locale("en", "", "")); } // ------------------------------------- @@ -391,6 +441,7 @@ DateFormatTest::TestPartialParse994() { UErrorCode status = U_ZERO_ERROR; SimpleDateFormat* f = new SimpleDateFormat(status); + ASSERT_OK(status); UDate null = 0; tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 10:11:42", date(97, 1 - 1, 17, 10, 11, 42)); tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 10:", null); @@ -452,6 +503,7 @@ DateFormatTest::TestRunTogetherPattern985() UnicodeString now, then; //UBool flag; SimpleDateFormat *formatter = new SimpleDateFormat(format, status); + ASSERT_OK(status); UDate date1 = Calendar::getNow(); ((DateFormat*)formatter)->format(date1, now); logln(now); @@ -478,6 +530,7 @@ DateFormatTest::TestRunTogetherPattern917() SimpleDateFormat* fmt; UnicodeString myDate; fmt = new SimpleDateFormat((UnicodeString)"yyyy/MM/dd", status); + ASSERT_OK(status); myDate = "1997/02/03"; testIt917(fmt, myDate, date(97, 2 - 1, 3)); delete fmt; @@ -573,12 +626,14 @@ DateFormatTest::TestLetterDPattern212() expLittleD = expBigD; // Expect the same, with default lenient parsing logln((UnicodeString)"dateString= " + dateString); SimpleDateFormat *formatter = new SimpleDateFormat(bigD, status); + ASSERT_OK(status); ParsePosition pos(0); UDate myDate = formatter->parse(dateString, pos); logln((UnicodeString)"Using " + bigD + " -> " + myDate); if (myDate != expBigD) errln((UnicodeString)"FAIL: Expected " + dateToString(expBigD)); delete formatter; formatter = new SimpleDateFormat(littleD, status); + ASSERT_OK(status); pos = ParsePosition(0); myDate = formatter->parse(dateString, pos); logln((UnicodeString)"Using " + littleD + " -> " + dateToString(myDate)); @@ -646,6 +701,7 @@ DateFormatTest::TestQuotePattern161() { UErrorCode status = U_ZERO_ERROR; SimpleDateFormat* formatter = new SimpleDateFormat((UnicodeString)"MM/dd/yyyy 'at' hh:mm:ss a zzz", status); + ASSERT_OK(status); UDate currentTime_1 = date(97, UCAL_AUGUST, 13, 10, 42, 28); UnicodeString dateString; ((DateFormat*)formatter)->format(currentTime_1, dateString); UnicodeString exp("08/13/1997 at 10:42:28 AM "); @@ -673,6 +729,10 @@ DateFormatTest::TestBadInput135() }; int32_t strings_length = (int32_t)(sizeof(strings) / sizeof(strings[0])); DateFormat *full = DateFormat::createDateTimeInstance(DateFormat::LONG, DateFormat::LONG); + if(full==NULL) { + errln("could not create date time instance"); + return; + } UnicodeString expected("March 1, 2000 1:23:45 AM "); for (int32_t i = 0; i < strings_length;++i) { const char* text = strings[i]; @@ -985,7 +1045,7 @@ DateFormatTest::TestLocaleDateFormat() // Bug 495 UnicodeString expectedFRENCH ( "lundi 15 septembre 1997 00 h 00 HAP (\\u00C9UA)" ); expectedFRENCH = expectedFRENCH.unescape(); //UnicodeString expectedUS ( "Monday, September 15, 1997 12:00:00 o'clock AM PDT" ); - UnicodeString expectedUS ( "Monday, September 15, 1997 12:00:00 AM PDT" ); + UnicodeString expectedUS ( "Monday, September 15, 1997 12:00:00 AM PT" ); logln((UnicodeString)"Date set to : " + dateToString(testDate)); UnicodeString out; if (dfUS == NULL || dfFrench == NULL){ @@ -1155,6 +1215,7 @@ void DateFormatTest::TestWhiteSpaceParsing() { void DateFormatTest::TestInvalidPattern() { UErrorCode ec = U_ZERO_ERROR; SimpleDateFormat f(UnicodeString("Yesterday"), ec); + ASSERT_OK(ec); UnicodeString out; FieldPosition pos; f.format((UDate)0, out, pos); @@ -1177,6 +1238,273 @@ void DateFormatTest::TestGreekMay() { } } +void DateFormatTest::TestStandAloneMonths() +{ + const char *EN_DATA[] = { + "yyyy MM dd HH:mm:ss", + + "yyyy LLLL dd H:mm:ss", "fp", "2004 03 10 16:36:31", "2004 March 10 16:36:31", "2004 03 10 16:36:31", + "yyyy LLL dd H:mm:ss", "fp", "2004 03 10 16:36:31", "2004 Mar 10 16:36:31", "2004 03 10 16:36:31", + "yyyy LLLL dd H:mm:ss", "F", "2004 03 10 16:36:31", "2004 March 10 16:36:31", + "yyyy LLL dd H:mm:ss", "pf", "2004 Mar 10 16:36:31", "2004 03 10 16:36:31", "2004 Mar 10 16:36:31", + + "LLLL", "fp", "1970 01 01 0:00:00", "January", "1970 01 01 0:00:00", + "LLLL", "fp", "1970 02 01 0:00:00", "February", "1970 02 01 0:00:00", + "LLLL", "fp", "1970 03 01 0:00:00", "March", "1970 03 01 0:00:00", + "LLLL", "fp", "1970 04 01 0:00:00", "April", "1970 04 01 0:00:00", + "LLLL", "fp", "1970 05 01 0:00:00", "May", "1970 05 01 0:00:00", + "LLLL", "fp", "1970 06 01 0:00:00", "June", "1970 06 01 0:00:00", + "LLLL", "fp", "1970 07 01 0:00:00", "July", "1970 07 01 0:00:00", + "LLLL", "fp", "1970 08 01 0:00:00", "August", "1970 08 01 0:00:00", + "LLLL", "fp", "1970 09 01 0:00:00", "September", "1970 09 01 0:00:00", + "LLLL", "fp", "1970 10 01 0:00:00", "October", "1970 10 01 0:00:00", + "LLLL", "fp", "1970 11 01 0:00:00", "November", "1970 11 01 0:00:00", + "LLLL", "fp", "1970 12 01 0:00:00", "December", "1970 12 01 0:00:00", + + "LLL", "fp", "1970 01 01 0:00:00", "Jan", "1970 01 01 0:00:00", + "LLL", "fp", "1970 02 01 0:00:00", "Feb", "1970 02 01 0:00:00", + "LLL", "fp", "1970 03 01 0:00:00", "Mar", "1970 03 01 0:00:00", + "LLL", "fp", "1970 04 01 0:00:00", "Apr", "1970 04 01 0:00:00", + "LLL", "fp", "1970 05 01 0:00:00", "May", "1970 05 01 0:00:00", + "LLL", "fp", "1970 06 01 0:00:00", "Jun", "1970 06 01 0:00:00", + "LLL", "fp", "1970 07 01 0:00:00", "Jul", "1970 07 01 0:00:00", + "LLL", "fp", "1970 08 01 0:00:00", "Aug", "1970 08 01 0:00:00", + "LLL", "fp", "1970 09 01 0:00:00", "Sep", "1970 09 01 0:00:00", + "LLL", "fp", "1970 10 01 0:00:00", "Oct", "1970 10 01 0:00:00", + "LLL", "fp", "1970 11 01 0:00:00", "Nov", "1970 11 01 0:00:00", + "LLL", "fp", "1970 12 01 0:00:00", "Dec", "1970 12 01 0:00:00", + }; + + const char *CS_DATA[] = { + "yyyy MM dd HH:mm:ss", + + "yyyy LLLL dd H:mm:ss", "fp", "2004 04 10 16:36:31", "2004 duben 10 16:36:31", "2004 04 10 16:36:31", + "yyyy MMMM dd H:mm:ss", "fp", "2004 04 10 16:36:31", "2004 dubna 10 16:36:31", "2004 04 10 16:36:31", + "yyyy LLL dd H:mm:ss", "fp", "2004 04 10 16:36:31", "2004 4. 10 16:36:31", "2004 04 10 16:36:31", + "yyyy LLLL dd H:mm:ss", "F", "2004 04 10 16:36:31", "2004 duben 10 16:36:31", + "yyyy MMMM dd H:mm:ss", "F", "2004 04 10 16:36:31", "2004 dubna 10 16:36:31", + "yyyy LLLL dd H:mm:ss", "pf", "2004 duben 10 16:36:31", "2004 04 10 16:36:31", "2004 duben 10 16:36:31", + "yyyy MMMM dd H:mm:ss", "pf", "2004 dubna 10 16:36:31", "2004 04 10 16:36:31", "2004 dubna 10 16:36:31", + + "LLLL", "fp", "1970 01 01 0:00:00", "leden", "1970 01 01 0:00:00", + "LLLL", "fp", "1970 02 01 0:00:00", "\\u00FAnor", "1970 02 01 0:00:00", + "LLLL", "fp", "1970 03 01 0:00:00", "b\\u0159ezen", "1970 03 01 0:00:00", + "LLLL", "fp", "1970 04 01 0:00:00", "duben", "1970 04 01 0:00:00", + "LLLL", "fp", "1970 05 01 0:00:00", "kv\\u011Bten", "1970 05 01 0:00:00", + "LLLL", "fp", "1970 06 01 0:00:00", "\\u010Derven", "1970 06 01 0:00:00", + "LLLL", "fp", "1970 07 01 0:00:00", "\\u010Dervenec", "1970 07 01 0:00:00", + "LLLL", "fp", "1970 08 01 0:00:00", "srpen", "1970 08 01 0:00:00", + "LLLL", "fp", "1970 09 01 0:00:00", "z\\u00E1\\u0159\\u00ED", "1970 09 01 0:00:00", + "LLLL", "fp", "1970 10 01 0:00:00", "\\u0159\\u00EDjen", "1970 10 01 0:00:00", + "LLLL", "fp", "1970 11 01 0:00:00", "listopad", "1970 11 01 0:00:00", + "LLLL", "fp", "1970 12 01 0:00:00", "prosinec", "1970 12 01 0:00:00", + + "LLL", "fp", "1970 01 01 0:00:00", "1.", "1970 01 01 0:00:00", + "LLL", "fp", "1970 02 01 0:00:00", "2.", "1970 02 01 0:00:00", + "LLL", "fp", "1970 03 01 0:00:00", "3.", "1970 03 01 0:00:00", + "LLL", "fp", "1970 04 01 0:00:00", "4.", "1970 04 01 0:00:00", + "LLL", "fp", "1970 05 01 0:00:00", "5.", "1970 05 01 0:00:00", + "LLL", "fp", "1970 06 01 0:00:00", "6.", "1970 06 01 0:00:00", + "LLL", "fp", "1970 07 01 0:00:00", "7.", "1970 07 01 0:00:00", + "LLL", "fp", "1970 08 01 0:00:00", "8.", "1970 08 01 0:00:00", + "LLL", "fp", "1970 09 01 0:00:00", "9.", "1970 09 01 0:00:00", + "LLL", "fp", "1970 10 01 0:00:00", "10.", "1970 10 01 0:00:00", + "LLL", "fp", "1970 11 01 0:00:00", "11.", "1970 11 01 0:00:00", + "LLL", "fp", "1970 12 01 0:00:00", "12.", "1970 12 01 0:00:00", + }; + + expect(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", "")); + expect(CS_DATA, ARRAY_SIZE(CS_DATA), Locale("cs", "", "")); +} + +void DateFormatTest::TestStandAloneDays() +{ + const char *EN_DATA[] = { + "yyyy MM dd HH:mm:ss", + + "cccc", "fp", "1970 01 04 0:00:00", "Sunday", "1970 01 04 0:00:00", + "cccc", "fp", "1970 01 05 0:00:00", "Monday", "1970 01 05 0:00:00", + "cccc", "fp", "1970 01 06 0:00:00", "Tuesday", "1970 01 06 0:00:00", + "cccc", "fp", "1970 01 07 0:00:00", "Wednesday", "1970 01 07 0:00:00", + "cccc", "fp", "1970 01 01 0:00:00", "Thursday", "1970 01 01 0:00:00", + "cccc", "fp", "1970 01 02 0:00:00", "Friday", "1970 01 02 0:00:00", + "cccc", "fp", "1970 01 03 0:00:00", "Saturday", "1970 01 03 0:00:00", + + "ccc", "fp", "1970 01 04 0:00:00", "Sun", "1970 01 04 0:00:00", + "ccc", "fp", "1970 01 05 0:00:00", "Mon", "1970 01 05 0:00:00", + "ccc", "fp", "1970 01 06 0:00:00", "Tue", "1970 01 06 0:00:00", + "ccc", "fp", "1970 01 07 0:00:00", "Wed", "1970 01 07 0:00:00", + "ccc", "fp", "1970 01 01 0:00:00", "Thu", "1970 01 01 0:00:00", + "ccc", "fp", "1970 01 02 0:00:00", "Fri", "1970 01 02 0:00:00", + "ccc", "fp", "1970 01 03 0:00:00", "Sat", "1970 01 03 0:00:00", + }; + + const char *CS_DATA[] = { + "yyyy MM dd HH:mm:ss", + + "cccc", "fp", "1970 01 04 0:00:00", "ned\\u011Ble", "1970 01 04 0:00:00", + "cccc", "fp", "1970 01 05 0:00:00", "pond\\u011Bl\\u00ED", "1970 01 05 0:00:00", + "cccc", "fp", "1970 01 06 0:00:00", "\\u00FAter\\u00FD", "1970 01 06 0:00:00", + "cccc", "fp", "1970 01 07 0:00:00", "st\\u0159eda", "1970 01 07 0:00:00", + "cccc", "fp", "1970 01 01 0:00:00", "\\u010Dtvrtek", "1970 01 01 0:00:00", + "cccc", "fp", "1970 01 02 0:00:00", "p\\u00E1tek", "1970 01 02 0:00:00", + "cccc", "fp", "1970 01 03 0:00:00", "sobota", "1970 01 03 0:00:00", + + "ccc", "fp", "1970 01 04 0:00:00", "ne", "1970 01 04 0:00:00", + "ccc", "fp", "1970 01 05 0:00:00", "po", "1970 01 05 0:00:00", + "ccc", "fp", "1970 01 06 0:00:00", "\\u00FAt", "1970 01 06 0:00:00", + "ccc", "fp", "1970 01 07 0:00:00", "st", "1970 01 07 0:00:00", + "ccc", "fp", "1970 01 01 0:00:00", "\\u010Dt", "1970 01 01 0:00:00", + "ccc", "fp", "1970 01 02 0:00:00", "p\\u00E1", "1970 01 02 0:00:00", + "ccc", "fp", "1970 01 03 0:00:00", "so", "1970 01 03 0:00:00", + }; + + expect(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", "")); + expect(CS_DATA, ARRAY_SIZE(CS_DATA), Locale("cs", "", "")); +} + +void DateFormatTest::TestNarrowNames() +{ + const char *EN_DATA[] = { + "yyyy MM dd HH:mm:ss", + + "yyyy MMMMM dd H:mm:ss", "2004 03 10 16:36:31", "2004 M 10 16:36:31", + "yyyy LLLLL dd H:mm:ss", "2004 03 10 16:36:31", "2004 M 10 16:36:31", + + "MMMMM", "1970 01 01 0:00:00", "J", + "MMMMM", "1970 02 01 0:00:00", "F", + "MMMMM", "1970 03 01 0:00:00", "M", + "MMMMM", "1970 04 01 0:00:00", "A", + "MMMMM", "1970 05 01 0:00:00", "M", + "MMMMM", "1970 06 01 0:00:00", "J", + "MMMMM", "1970 07 01 0:00:00", "J", + "MMMMM", "1970 08 01 0:00:00", "A", + "MMMMM", "1970 09 01 0:00:00", "S", + "MMMMM", "1970 10 01 0:00:00", "O", + "MMMMM", "1970 11 01 0:00:00", "N", + "MMMMM", "1970 12 01 0:00:00", "D", + + "LLLLL", "1970 01 01 0:00:00", "J", + "LLLLL", "1970 02 01 0:00:00", "F", + "LLLLL", "1970 03 01 0:00:00", "M", + "LLLLL", "1970 04 01 0:00:00", "A", + "LLLLL", "1970 05 01 0:00:00", "M", + "LLLLL", "1970 06 01 0:00:00", "J", + "LLLLL", "1970 07 01 0:00:00", "J", + "LLLLL", "1970 08 01 0:00:00", "A", + "LLLLL", "1970 09 01 0:00:00", "S", + "LLLLL", "1970 10 01 0:00:00", "O", + "LLLLL", "1970 11 01 0:00:00", "N", + "LLLLL", "1970 12 01 0:00:00", "D", + + "EEEEE", "1970 01 04 0:00:00", "S", + "EEEEE", "1970 01 05 0:00:00", "M", + "EEEEE", "1970 01 06 0:00:00", "T", + "EEEEE", "1970 01 07 0:00:00", "W", + "EEEEE", "1970 01 01 0:00:00", "T", + "EEEEE", "1970 01 02 0:00:00", "F", + "EEEEE", "1970 01 03 0:00:00", "S", + + "ccccc", "1970 01 04 0:00:00", "S", + "ccccc", "1970 01 05 0:00:00", "M", + "ccccc", "1970 01 06 0:00:00", "T", + "ccccc", "1970 01 07 0:00:00", "W", + "ccccc", "1970 01 01 0:00:00", "T", + "ccccc", "1970 01 02 0:00:00", "F", + "ccccc", "1970 01 03 0:00:00", "S", + }; + + const char *CS_DATA[] = { + "yyyy MM dd HH:mm:ss", + + "yyyy LLLLL dd H:mm:ss", "2004 04 10 16:36:31", "2004 d 10 16:36:31", + "yyyy MMMMM dd H:mm:ss", "2004 04 10 16:36:31", "2004 d 10 16:36:31", + + "MMMMM", "1970 01 01 0:00:00", "l", + "MMMMM", "1970 02 01 0:00:00", "\\u00FA", + "MMMMM", "1970 03 01 0:00:00", "b", + "MMMMM", "1970 04 01 0:00:00", "d", + "MMMMM", "1970 05 01 0:00:00", "k", + "MMMMM", "1970 06 01 0:00:00", "\\u010D", + "MMMMM", "1970 07 01 0:00:00", "\\u010D", + "MMMMM", "1970 08 01 0:00:00", "s", + "MMMMM", "1970 09 01 0:00:00", "z", + "MMMMM", "1970 10 01 0:00:00", "\\u0159", + "MMMMM", "1970 11 01 0:00:00", "l", + "MMMMM", "1970 12 01 0:00:00", "p", + + "LLLLL", "1970 01 01 0:00:00", "l", + "LLLLL", "1970 02 01 0:00:00", "\\u00FA", + "LLLLL", "1970 03 01 0:00:00", "b", + "LLLLL", "1970 04 01 0:00:00", "d", + "LLLLL", "1970 05 01 0:00:00", "k", + "LLLLL", "1970 06 01 0:00:00", "\\u010D", + "LLLLL", "1970 07 01 0:00:00", "\\u010D", + "LLLLL", "1970 08 01 0:00:00", "s", + "LLLLL", "1970 09 01 0:00:00", "z", + "LLLLL", "1970 10 01 0:00:00", "\\u0159", + "LLLLL", "1970 11 01 0:00:00", "l", + "LLLLL", "1970 12 01 0:00:00", "p", + + "EEEEE", "1970 01 04 0:00:00", "N", + "EEEEE", "1970 01 05 0:00:00", "P", + "EEEEE", "1970 01 06 0:00:00", "\\u00DA", + "EEEEE", "1970 01 07 0:00:00", "S", + "EEEEE", "1970 01 01 0:00:00", "\\u010C", + "EEEEE", "1970 01 02 0:00:00", "P", + "EEEEE", "1970 01 03 0:00:00", "S", + + "ccccc", "1970 01 04 0:00:00", "N", + "ccccc", "1970 01 05 0:00:00", "P", + "ccccc", "1970 01 06 0:00:00", "\\u00DA", + "ccccc", "1970 01 07 0:00:00", "S", + "ccccc", "1970 01 01 0:00:00", "\\u010C", + "ccccc", "1970 01 02 0:00:00", "P", + "ccccc", "1970 01 03 0:00:00", "S", + }; + + expectFormat(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", "")); + expectFormat(CS_DATA, ARRAY_SIZE(CS_DATA), Locale("cs", "", "")); +} + +void DateFormatTest::TestEras() +{ + const char *EN_DATA[] = { + "yyyy MM dd", + + "MMMM dd yyyy G", "fp", "1951 07 17", "July 17 1951 AD", "1951 07 17", + "MMMM dd yyyy GG", "fp", "1951 07 17", "July 17 1951 AD", "1951 07 17", + "MMMM dd yyyy GGG", "fp", "1951 07 17", "July 17 1951 AD", "1951 07 17", + "MMMM dd yyyy GGGG", "fp", "1951 07 17", "July 17 1951 Anno Domini", "1951 07 17", + + "MMMM dd yyyy G", "fp", "-438 07 17", "July 17 0439 BC", "-438 07 17", + "MMMM dd yyyy GG", "fp", "-438 07 17", "July 17 0439 BC", "-438 07 17", + "MMMM dd yyyy GGG", "fp", "-438 07 17", "July 17 0439 BC", "-438 07 17", + "MMMM dd yyyy GGGG", "fp", "-438 07 17", "July 17 0439 Before Christ", "-438 07 17", + }; + + expect(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", "")); +} + +void DateFormatTest::TestQuarters() +{ + const char *EN_DATA[] = { + "yyyy MM dd", + + "Q", "fp", "1970 01 01", "1", "1970 01 01", + "QQ", "fp", "1970 04 01", "02", "1970 04 01", + "QQQ", "fp", "1970 07 01", "Q3", "1970 07 01", + "QQQQ", "fp", "1970 10 01", "4th quarter", "1970 10 01", + + "q", "fp", "1970 01 01", "1", "1970 01 01", + "qq", "fp", "1970 04 01", "02", "1970 04 01", + "qqq", "fp", "1970 07 01", "Q3", "1970 07 01", + "qqqq", "fp", "1970 10 01", "4th quarter", "1970 10 01", + }; + + expect(EN_DATA, ARRAY_SIZE(EN_DATA), Locale("en", "", "")); +} + /** * Test parsing. Input is an array that starts with the following * header: @@ -1301,16 +1629,16 @@ void DateFormatTest::expect(const char** data, int32_t data_length, // 'f' const char* datestr = data[i++]; const char* string = data[i++]; - UDate date = ref.parse(datestr, ec); + UDate date = ref.parse(ctou(datestr), ec); if (!assertSuccess("parse", ec)) return; assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")", - string, + ctou(string), fmt.format(date, str.remove())); // 'p' datestr = data[i++]; - date = ref.parse(datestr, ec); + date = ref.parse(ctou(datestr), ec); if (!assertSuccess("parse", ec)) return; - UDate parsedate = fmt.parse(string, ec); + UDate parsedate = fmt.parse(ctou(string), ec); if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) { assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", univ.format(date, str.remove()), @@ -1322,9 +1650,9 @@ void DateFormatTest::expect(const char** data, int32_t data_length, // 'p' const char* string = data[i++]; const char* datestr = data[i++]; - UDate date = ref.parse(datestr, ec); + UDate date = ref.parse(ctou(datestr), ec); if (!assertSuccess("parse", ec)) return; - UDate parsedate = fmt.parse(string, ec); + UDate parsedate = fmt.parse(ctou(string), ec); if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) { assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", univ.format(date, str.remove()), @@ -1333,17 +1661,17 @@ void DateFormatTest::expect(const char** data, int32_t data_length, // 'f' string = data[i++]; assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")", - string, + ctou(string), fmt.format(date, str.remove())); } else if (uprv_strcmp(control, "F") == 0) { const char* datestr = data[i++]; const char* string = data[i++]; - UDate date = ref.parse(datestr, ec); + UDate date = ref.parse(ctou(datestr), ec); if (!assertSuccess("parse", ec)) return; assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")", - string, + ctou(string), fmt.format(date, str.remove())); UDate parsedate = fmt.parse(string, ec); @@ -1361,13 +1689,53 @@ void DateFormatTest::expect(const char** data, int32_t data_length, } } -void DateFormatTest::TestGenericTime() { -#if U_ICU_VERSION_MAJOR_NUM > 3 || U_ICU_VERSION_MINOR_NUM > 4 -# define FIX_FAILING_WALLTIME_TESTS -#else - logln("Warning, skipping some tests here!"); -#endif +/** + * Test formatting. Input is an array that starts + * with the following header: + * + * [0] = pattern string to parse [i+2] with + * + * followed by test cases, each of which is 3 array elements: + * + * [i] = pattern, or null to reuse prior pattern + * [i+1] = data string a + * [i+2] = data string b + * + * Examples: + * Format date [i+1] and expect string [i+2]. + * + * "y/M/d H:mm:ss.SSSS", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.567" + */ +void DateFormatTest::expectFormat(const char** data, int32_t data_length, + const Locale& loc) { + int32_t i = 0; + UErrorCode ec = U_ZERO_ERROR; + UnicodeString str, str2; + SimpleDateFormat fmt("", loc, ec); + SimpleDateFormat ref(data[i++], loc, ec); + SimpleDateFormat univ("EE G yyyy MM dd HH:mm:ss.SSS z", loc, ec); + if (!assertSuccess("construct SimpleDateFormat", ec)) return; + + UnicodeString currentPat; + while (i<data_length) { + const char* pattern = data[i++]; + if (pattern != NULL) { + fmt.applyPattern(pattern); + currentPat = pattern; + } + + const char* datestr = data[i++]; + const char* string = data[i++]; + UDate date = ref.parse(ctou(datestr), ec); + if (!assertSuccess("parse", ec)) return; + assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")", + ctou(string), + fmt.format(date, str.remove())); + } +} + +void DateFormatTest::TestGenericTime() { // any zone pattern should parse any zone const Locale en("en"); const char* ZDATA[] = { @@ -1396,20 +1764,14 @@ void DateFormatTest::TestGenericTime() { "y/M/d H:mm vvv", "pf", "2005/4/3 2:30 PST", "2005 04 03 03:30 PDT", "2005/4/3 3:30 PT", "y/M/d H:mm vvv", "pf", "2005/4/3 2:30 PDT", "2005 04 03 01:30 PST", "2005/4/3 1:30 PT", "y/M/d H:mm", "pf", "2005/4/3 2:30", "2005 04 03 01:30 PST", "2005/4/3 1:30", - // time to parse is ambiguous, PT interpreted as earlier time (?) -#if defined(FIX_FAILING_WALLTIME_TESTS) - "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PDT", // fail -#endif + // time to parse is ambiguous, PT interpreted as LATER time (?) + "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PST", "2004/10/31 1:30 PST", // 1:30a PT -> 1:30a PST (later) "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PST", "2004 10 31 01:30 PST", "2004/10/31 1:30 PST", "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PDT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PDT", -#if defined(FIX_FAILING_WALLTIME_TESTS) - "y/M/d H:mm vvv", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PT", // fail -#endif + "y/M/d H:mm vvv", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PST", "2004/10/31 1:30 PT", // 1:30a PT -> 1:30a PST (later) "y/M/d H:mm vvv", "pf", "2004/10/31 1:30 PST", "2004 10 31 01:30 PST", "2004/10/31 1:30 PT", "y/M/d H:mm vvv", "pf", "2004/10/31 1:30 PDT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PT", -#if defined(FIX_FAILING_WALLTIME_TESTS) - "y/M/d H:mm", "pf", "2004/10/31 1:30", "2004 10 31 01:30 PDT", "2004/10/31 1:30", // fail -#endif + "y/M/d H:mm", "pf", "2004/10/31 1:30", "2004 10 31 01:30 PST", "2004/10/31 1:30", // 1:30a PT -> 1:30a PST (later) }; const int32_t ZDATA_length = sizeof(ZDATA)/ sizeof(ZDATA[0]); expect(ZDATA, ZDATA_length, en); @@ -1424,10 +1786,12 @@ void DateFormatTest::TestGenericTime() { SimpleDateFormat(basepat + "zzz", en, status), SimpleDateFormat(basepat + "zzzz", en, status) }; + ASSERT_OK(status); const int32_t formats_length = sizeof(formats)/sizeof(formats[0]); UnicodeString test; SimpleDateFormat univ("yyyy MM dd HH:mm zzz", en, status); + ASSERT_OK(status); const UnicodeString times[] = { "2004 01 02 03:04 PST", "2004 07 08 09:10 PDT" @@ -1492,6 +1856,73 @@ void DateFormatTest::TestGenericTimeZoneOrder() { expect(XDATA, XDATA_length, en); } +void DateFormatTest::TestTimeZoneStringsAPI() { + // Verify data + UErrorCode status = U_ZERO_ERROR; + DateFormatSymbols symbols(Locale::getUS(), status); + StringEnumeration* keys = symbols.createZoneStringIDs(status); + if(U_FAILURE(status)){ + errln("Could not create the StringEnumeration for Locale::getUS(). Error: %s", u_errorName(status)); + return; + } + + StringEnumeration* keys2 = symbols.createZoneStringIDs(status); + ASSERT_OK(status); + if(*keys2!=*keys){ + errln("operator!= failed for TimeZoneStringsEnum"); + } + const UnicodeString* key = NULL; + + while( (key = keys->snext(status))!=NULL){ + logln(prettify(*key)); + } + if(U_FAILURE(status)){ + errln("Could not iterate over the StringEnumeration. Error: %s", u_errorName(status)); + return; + } + UnicodeString expectedKey("America/Los_Angeles"); + UnicodeString expectedStrs[DateFormatSymbols::TIMEZONE_COUNT]; + expectedStrs[DateFormatSymbols::TIMEZONE_SHORT_GENERIC].setTo("PT"); + expectedStrs[DateFormatSymbols::TIMEZONE_SHORT_STANDARD].setTo("PST"); + expectedStrs[DateFormatSymbols::TIMEZONE_SHORT_DAYLIGHT].setTo("PDT"); + expectedStrs[DateFormatSymbols::TIMEZONE_LONG_GENERIC].setTo("Pacific Time"); + expectedStrs[DateFormatSymbols::TIMEZONE_LONG_STANDARD].setTo("Pacific Standard Time"); + expectedStrs[DateFormatSymbols::TIMEZONE_LONG_DAYLIGHT].setTo("Pacific Daylight Time"); + expectedStrs[DateFormatSymbols::TIMEZONE_EXEMPLAR_CITY].setTo("Los Angeles"); + for(int32_t i=0; i<DateFormatSymbols::TIMEZONE_COUNT; i++){ + UnicodeString result; + result = symbols.getZoneString(expectedKey, (DateFormatSymbols::TimeZoneTranslationType)i, result,status); + if(U_FAILURE(status)){ + errln("Could not retrieve display name. Error: %s", u_errorName(status)); + return; + } + if(expectedStrs[i] != result){ + errln("Did not get the expected string. Expected: "+expectedStrs[i]+ UnicodeString(" Got: ") + result ); + } + } + expectedKey.setTo("America/Los_Angeles",0); + UnicodeString exemplarCity("Phoenix"); + UnicodeString result; + symbols.setZoneString(expectedKey,DateFormatSymbols::TIMEZONE_EXEMPLAR_CITY, exemplarCity, status); + if(U_FAILURE(status)){ + errln("setZoneString() did not succeed. Error: %s", u_errorName(status)); + return; + } + result = symbols.getZoneString(expectedKey, DateFormatSymbols::TIMEZONE_EXEMPLAR_CITY, result,status); + if(result != exemplarCity){ + errln("setZoneString() did not succeed. Expected: " + exemplarCity + " Got: " + result); + } + delete keys; + delete keys2; +} + +void DateFormatTest::TestHost(void) +{ +#ifdef U_WINDOWS + Win32DateTimeTest::testLocales(this); +#endif +} + #endif /* #if !UCONFIG_NO_FORMATTING */ //eof diff --git a/Build/source/libs/icu-xetex/test/intltest/dtfmttst.h b/Build/source/libs/icu-xetex/test/intltest/dtfmttst.h index 8bb51877b2c..e08ff6834cd 100644 --- a/Build/source/libs/icu-xetex/test/intltest/dtfmttst.h +++ b/Build/source/libs/icu-xetex/test/intltest/dtfmttst.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -138,6 +138,8 @@ public: * Further test the formatting of time zones. */ virtual void TestDateFormatZone146(void); + + void TestTimeZoneStringsAPI(void); public: // package /** @@ -161,12 +163,35 @@ public: // package void TestGenericTimeZoneOrder(void); +public: + /** + * Test host-specific formatting. + */ + void TestHost(void); + +public: + /** + * Test patterns added in CLDR 1.4 + */ + void TestEras(void); + + void TestNarrowNames(void); + + void TestStandAloneDays(void); + + void TestStandAloneMonths(void); + + void TestQuarters(void); + private: void expectParse(const char** data, int32_t data_length, const Locale& locale); void expect(const char** data, int32_t data_length, const Locale& loc); + + void expectFormat(const char **data, int32_t data_length, + const Locale &locale); }; #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/Build/source/libs/icu-xetex/test/intltest/escoll.cpp b/Build/source/libs/icu-xetex/test/intltest/escoll.cpp index ae4a6e8ef12..152453bdaf0 100644 --- a/Build/source/libs/icu-xetex/test/intltest/escoll.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/escoll.cpp @@ -1,7 +1,7 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -103,7 +103,7 @@ void CollationSpanishTest::runIndexedTest( int32_t index, UBool exec, const char if((!myCollation) && exec) { errln(__FILE__ " cannot test - failed to create collator."); - name = ""; + name = "some test"; return; } switch (index) { diff --git a/Build/source/libs/icu-xetex/test/intltest/ficoll.cpp b/Build/source/libs/icu-xetex/test/intltest/ficoll.cpp index 90098d368df..128122d5ea2 100644 --- a/Build/source/libs/icu-xetex/test/intltest/ficoll.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/ficoll.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -90,7 +90,7 @@ void CollationFinnishTest::runIndexedTest( int32_t index, UBool exec, const char if((!myCollation) && exec) { errln(__FILE__ " cannot test - failed to create collator."); - name = ""; + name = "some test"; return; } switch (index) { diff --git a/Build/source/libs/icu-xetex/test/intltest/frcoll.cpp b/Build/source/libs/icu-xetex/test/intltest/frcoll.cpp index 96849e05e31..fd8702c6112 100644 --- a/Build/source/libs/icu-xetex/test/intltest/frcoll.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/frcoll.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -202,7 +202,7 @@ void CollationFrenchTest::runIndexedTest( int32_t index, UBool exec, const char* if((!myCollation) && exec) { errln(__FILE__ " cannot test - failed to create collator."); - name = ""; + name = "some test"; return; } diff --git a/Build/source/libs/icu-xetex/test/intltest/idnaconf.cpp b/Build/source/libs/icu-xetex/test/intltest/idnaconf.cpp index 51cac655206..cf199438467 100644 --- a/Build/source/libs/icu-xetex/test/intltest/idnaconf.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/idnaconf.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2005, International Business Machines + * Copyright (C) 2005-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -52,7 +52,7 @@ IdnaConfTest::~IdnaConfTest(){ delete [] base; } - +#if !UCONFIG_NO_IDNA /* this function is modified from RBBITest::ReadAndConvertFile() * */ @@ -161,13 +161,13 @@ UBool IdnaConfTest::ReadOneLine(UnicodeString& buf){ buf.remove(); int t = 0; while (curOffset < len){ - if (t = isNewlineMark()) { // end of line + if ((t = isNewlineMark())) { // end of line curOffset += t; break; } UChar c = base[curOffset]; if (c == BACKSLASH && curOffset < len -1){ // escaped new line mark - if (t = isNewlineMark()){ + if ((t = isNewlineMark())){ curOffset += 1 + t; // BACKSLAH and NewlineMark continue; } @@ -284,12 +284,13 @@ void IdnaConfTest::Test(void){ UnicodeString value; // skip everything before the first "=====" and "=====" itself - for (;;){ - ReadOneLine(s); - if (s.compare(C_TAG, -1) == 0){ //"=====" + do { + if (!ReadOneLine(s)) { + errln("End of file prematurely found"); break; } } + while (s.compare(C_TAG, -1) != 0); //"=====" while(ReadOneLine(s)){ s.trim(); @@ -334,8 +335,12 @@ void IdnaConfTest::Test(void){ Call(); // for last record } - - +#else +void IdnaConfTest::Test(void) +{ + // test nothing... +} +#endif void IdnaConfTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/){ switch (index) { diff --git a/Build/source/libs/icu-xetex/test/intltest/idnaref.cpp b/Build/source/libs/icu-xetex/test/intltest/idnaref.cpp index 26691661a99..61045c567c3 100644 --- a/Build/source/libs/icu-xetex/test/intltest/idnaref.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/idnaref.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2003-2005, International Business Machines + * Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -34,7 +34,7 @@ static const UChar ACE_PREFIX[] ={ 0x0078,0x006E,0x002d,0x002d } ; #define MAX_LABEL_LENGTH 63 #define HYPHEN 0x002D /* The Max length of the labels should not be more than 64 */ -#define MAX_LABEL_BUFFER_SIZE 100 +#define MAX_LABEL_BUFFER_SIZE 100 #define MAX_IDN_BUFFER_SIZE 300 #define CAPITAL_A 0x0041 @@ -43,7 +43,7 @@ static const UChar ACE_PREFIX[] ={ 0x0078,0x006E,0x002d,0x002d } ; #define FULL_STOP 0x002E -inline static UBool +inline static UBool startsWithPrefix(const UChar* src , int32_t srcLength){ UBool startsWithPrefix = TRUE; @@ -59,7 +59,7 @@ startsWithPrefix(const UChar* src , int32_t srcLength){ return startsWithPrefix; } -inline static UChar +inline static UChar toASCIILower(UChar ch){ if(CAPITAL_A <= ch && ch <= CAPITAL_Z){ return ch + LOWER_CASE_DELTA; @@ -68,7 +68,7 @@ toASCIILower(UChar ch){ } inline static int32_t -compareCaseInsensitiveASCII(const UChar* s1, int32_t s1Len, +compareCaseInsensitiveASCII(const UChar* s1, int32_t s1Len, const UChar* s2, int32_t s2Len){ if(s1Len != s2Len){ return (s1Len > s2Len) ? s1Len : s2Len; @@ -81,10 +81,10 @@ compareCaseInsensitiveASCII(const UChar* s1, int32_t s1Len, if(i == s1Len) { return 0; } - + c1 = s1[i]; c2 = s2[i]; - + /* Case-insensitive comparison */ if(c1!=c2) { rc=(int32_t)toASCIILower(c1)-(int32_t)toASCIILower(c2); @@ -93,7 +93,7 @@ compareCaseInsensitiveASCII(const UChar* s1, int32_t s1Len, } } } - + } static UErrorCode getError(enum punycode_status status){ @@ -125,8 +125,8 @@ static inline int32_t convertUCharsToASCII(const UChar* src,char* dest, int32_t } return i; } -// wrapper around the reference Punycode implementation -static int32_t convertToPuny(const UChar* src, int32_t srcLength, +// wrapper around the reference Punycode implementation +static int32_t convertToPuny(const UChar* src, int32_t srcLength, UChar* dest, int32_t destCapacity, UErrorCode& status){ uint32_t b1Stack[MAX_LABEL_BUFFER_SIZE]; @@ -149,7 +149,7 @@ static int32_t convertToPuny(const UChar* src, int32_t srcLength, } status = U_ZERO_ERROR; // reset error - + u_strToUTF32((UChar32*)b1,b1Len,&b1Len,src,srcLength,&status); } if(U_FAILURE(status)){ @@ -160,7 +160,7 @@ static int32_t convertToPuny(const UChar* src, int32_t srcLength, error = punycode_encode(b1Len,b1,caseFlags, (uint32_t*)&b2Len, b2); status = getError(error); - + if(status == U_BUFFER_OVERFLOW_ERROR){ /* we do not have enough room so grow the buffer*/ b2 = (char*) uprv_malloc( b2Len * sizeof(char)); @@ -177,7 +177,7 @@ static int32_t convertToPuny(const UChar* src, int32_t srcLength, if(U_FAILURE(status)){ goto CLEANUP; } - + if(b2Len < destCapacity){ convertASCIIToUChars(b2,dest,b2Len); }else{ @@ -236,23 +236,17 @@ CLEANUP: } uprv_free(caseFlags); - return destLen; + return destLen; } - -#if U_ICU_VERSION_MAJOR_NUM>3 || (U_ICU_VERSION_MAJOR_NUM==3 && U_ICU_VERSION_MINOR_NUM>4) -# error Time bomb: Remove the definition of U_IDNA_ZERO_LENGTH_LABEL_ERROR from __FILE__ -#else -# define U_IDNA_ZERO_LENGTH_LABEL_ERROR U_IDNA_ERROR_LIMIT -#endif U_CFUNC int32_t U_EXPORT2 -idnaref_toASCII(const UChar* src, int32_t srcLength, +idnaref_toASCII(const UChar* src, int32_t srcLength, UChar* dest, int32_t destCapacity, int32_t options, UParseError* parseError, UErrorCode* status){ - + if(status == NULL || U_FAILURE(*status)){ return 0; } @@ -263,8 +257,8 @@ idnaref_toASCII(const UChar* src, int32_t srcLength, UChar b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE]; //initialize pointers to stack buffers UChar *b1 = b1Stack, *b2 = b2Stack; - int32_t b1Len=0, b2Len=0, - b1Capacity = MAX_LABEL_BUFFER_SIZE, + int32_t b1Len=0, b2Len=0, + b1Capacity = MAX_LABEL_BUFFER_SIZE, b2Capacity = MAX_LABEL_BUFFER_SIZE , reqLength=0; @@ -273,18 +267,18 @@ idnaref_toASCII(const UChar* src, int32_t srcLength, UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0); UBool* caseFlags = NULL; - + // assume the source contains all ascii codepoints UBool srcIsASCII = TRUE; // assume the source contains all LDH codepoints - UBool srcIsLDH = TRUE; + UBool srcIsLDH = TRUE; int32_t j=0; if(srcLength == -1){ srcLength = u_strlen(src); } - // step 1 + // step 1 for( j=0;j<srcLength;j++){ if(src[j] > 0x7F){ srcIsASCII = FALSE; @@ -297,9 +291,9 @@ idnaref_toASCII(const UChar* src, int32_t srcLength, if(U_FAILURE(*status)){ goto CLEANUP; } - + b1Len = prep->process(src,srcLength,b1, b1Capacity,allowUnassigned,parseError,*status); - + if(*status == U_BUFFER_OVERFLOW_ERROR){ // redo processing of string /* we do not have enough room so grow the buffer*/ @@ -310,29 +304,29 @@ idnaref_toASCII(const UChar* src, int32_t srcLength, } *status = U_ZERO_ERROR; // reset error - + b1Len = prep->process(src,srcLength,b1, b1Len,allowUnassigned, parseError, *status); } // error bail out if(U_FAILURE(*status)){ goto CLEANUP; - } + } if(b1Len == 0){ *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR; goto CLEANUP; - } + } srcIsASCII = TRUE; // step 3 & 4 for( j=0;j<b1Len;j++){ - if(b1[j] > 0x7F){// check if output of usprep_prepare is all ASCII + if(b1[j] > 0x7F){// check if output of usprep_prepare is all ASCII srcIsASCII = FALSE; }else if(prep->isLDHChar(b1[j])==FALSE){ // if the char is in ASCII range verify that it is an LDH character{ srcIsLDH = FALSE; } } - + if(useSTD3ASCIIRules == TRUE){ // verify 3a and 3b if( srcIsLDH == FALSE /* source contains some non-LDH characters */ @@ -361,14 +355,14 @@ idnaref_toASCII(const UChar* src, int32_t srcLength, if(*status == U_BUFFER_OVERFLOW_ERROR){ // redo processing of string /* we do not have enough room so grow the buffer*/ - b2 = (UChar*) uprv_malloc(b2Len * U_SIZEOF_UCHAR); + b2 = (UChar*) uprv_malloc(b2Len * U_SIZEOF_UCHAR); if(b2 == NULL){ *status = U_MEMORY_ALLOCATION_ERROR; goto CLEANUP; } *status = U_ZERO_ERROR; // reset error - + b2Len = convertToPuny(b1, b1Len, b2, b2Len, *status); //b2Len = u_strToPunycode(b2,b2Len,b1,b1Len, caseFlags, status); @@ -389,7 +383,7 @@ idnaref_toASCII(const UChar* src, int32_t srcLength, uprv_memcpy(dest+ACE_PREFIX_LENGTH, b2, b2Len * U_SIZEOF_UCHAR); }else{ - *status = U_IDNA_ACE_PREFIX_ERROR; + *status = U_IDNA_ACE_PREFIX_ERROR; goto CLEANUP; } } @@ -406,7 +400,7 @@ CLEANUP: uprv_free(b2); } uprv_free(caseFlags); - + // delete prep; return u_terminateUChars(dest, destCapacity, reqLength, status); @@ -429,18 +423,18 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength, } - + UChar b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE], b3Stack[MAX_LABEL_BUFFER_SIZE]; //initialize pointers to stack buffers UChar *b1 = b1Stack, *b2 = b2Stack, *b1Prime=NULL, *b3=b3Stack; int32_t b1Len, b2Len, b1PrimeLen, b3Len, - b1Capacity = MAX_LABEL_BUFFER_SIZE, + b1Capacity = MAX_LABEL_BUFFER_SIZE, b2Capacity = MAX_LABEL_BUFFER_SIZE, b3Capacity = MAX_LABEL_BUFFER_SIZE, reqLength=0; // UParseError parseError; - + NamePrepTransform* prep = TestIDNA::getInstance(*status); b1Len = 0; UBool* caseFlags = NULL; @@ -456,7 +450,7 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength, if(U_FAILURE(*status)){ goto CLEANUP; } - // step 1: find out if all the codepoints in src are ASCII + // step 1: find out if all the codepoints in src are ASCII if(srcLength==-1){ srcLength = 0; for(;src[srcLength]!=0;){ @@ -498,7 +492,7 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength, } *status = U_ZERO_ERROR; // reset error - + b1Len = prep->process(src,srcLength,b1, b1Len,allowUnassigned, parseError, *status); } //bail out on error @@ -542,12 +536,12 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength, } *status = U_ZERO_ERROR; // reset error - + b2Len = convertFromPuny(b1Prime,b1PrimeLen, b2, b2Len, *status); //b2Len = u_strFromPunycode(b2, b2Len,b1Prime,b1PrimeLen,caseFlags, status); } - - + + //step 6:Apply toASCII b3Len = idnaref_toASCII(b2,b2Len,b3,b3Capacity,options,parseError, status); @@ -561,9 +555,9 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength, } *status = U_ZERO_ERROR; // reset error - + b3Len = idnaref_toASCII(b2,b2Len,b3,b3Len, options, parseError, status); - + } //bail out on error if(U_FAILURE(*status)){ @@ -572,7 +566,7 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength, //step 7: verify if(compareCaseInsensitiveASCII(b1, b1Len, b3, b3Len) !=0){ - *status = U_IDNA_VERIFICATION_ERROR; + *status = U_IDNA_VERIFICATION_ERROR; goto CLEANUP; } @@ -593,7 +587,7 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength, // failPos is always set the index of failure uprv_syntaxError(src,failPos, srcLength,parseError); }else if(src[0] == HYPHEN){ - // fail position is 0 + // fail position is 0 uprv_syntaxError(src,0,srcLength,parseError); }else{ // the last index in the source is always length-1 @@ -619,7 +613,7 @@ CLEANUP: uprv_free(b2); } uprv_free(caseFlags); - + // delete prep; return u_terminateUChars(dest, destCapacity, reqLength, status); @@ -642,7 +636,7 @@ getNextSeparator(UChar *src,int32_t srcLength,NamePrepTransform* prep, if(prep->isLabelSeparator(src[i],*status)){ *limit = src + (i+1); // go past the delimiter return i; - + } } }else{ @@ -681,7 +675,7 @@ idnaref_IDNToASCII( const UChar* src, int32_t srcLength, // UParseError parseError; NamePrepTransform* prep = TestIDNA::getInstance(*status); - + //initialize pointers to stack buffers UChar b1Stack[MAX_LABEL_BUFFER_SIZE]; UChar *b1 = b1Stack; @@ -690,7 +684,7 @@ idnaref_IDNToASCII( const UChar* src, int32_t srcLength, UChar* labelStart = (UChar*)src; int32_t remainingLen = srcLength; int32_t b1Capacity = MAX_LABEL_BUFFER_SIZE; - + //get the options // UBool allowUnassigned = (UBool)((options & IDNAREF_ALLOW_UNASSIGNED) != 0); // UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0); @@ -703,7 +697,7 @@ idnaref_IDNToASCII( const UChar* src, int32_t srcLength, if(srcLength == -1){ for(;;){ - + if(*delimiter == 0){ break; } @@ -711,8 +705,8 @@ idnaref_IDNToASCII( const UChar* src, int32_t srcLength, labelLen = getNextSeparator(labelStart, -1, prep, &delimiter, &done, status); b1Len = 0; if(!(labelLen==0 && done)){// make sure this is not a root label separator. - - b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Capacity, + + b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Capacity, options, parseError, status); if(*status == U_BUFFER_OVERFLOW_ERROR){ @@ -725,12 +719,12 @@ idnaref_IDNToASCII( const UChar* src, int32_t srcLength, } *status = U_ZERO_ERROR; // reset error - + b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Len, options, parseError, status); - + } - } + } if(U_FAILURE(*status)){ goto CLEANUP; @@ -755,13 +749,13 @@ idnaref_IDNToASCII( const UChar* src, int32_t srcLength, } }else{ for(;;){ - + if(delimiter == src+srcLength){ break; } labelLen = getNextSeparator(labelStart, remainingLen, prep, &delimiter, &done, status); - + b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Capacity, options,parseError, status); @@ -775,12 +769,12 @@ idnaref_IDNToASCII( const UChar* src, int32_t srcLength, } *status = U_ZERO_ERROR; // reset error - - b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Len, + + b1Len = idnaref_toASCII(labelStart, labelLen, b1, b1Len, options, parseError, status); - + } - + if(U_FAILURE(*status)){ goto CLEANUP; } @@ -807,11 +801,11 @@ idnaref_IDNToASCII( const UChar* src, int32_t srcLength, CLEANUP: - + if(b1 != b1Stack){ uprv_free(b1); } - + // delete prep; return u_terminateUChars(dest, destCapacity, reqLength, status); @@ -823,7 +817,7 @@ idnaref_IDNToUnicode( const UChar* src, int32_t srcLength, int32_t options, UParseError* parseError, UErrorCode* status){ - + if(status == NULL || U_FAILURE(*status)){ return 0; } @@ -833,11 +827,11 @@ idnaref_IDNToUnicode( const UChar* src, int32_t srcLength, } int32_t reqLength = 0; - + UBool done = FALSE; NamePrepTransform* prep = TestIDNA::getInstance(*status); - + //initialize pointers to stack buffers UChar b1Stack[MAX_LABEL_BUFFER_SIZE]; UChar *b1 = b1Stack; @@ -846,25 +840,25 @@ idnaref_IDNToUnicode( const UChar* src, int32_t srcLength, UChar* labelStart = (UChar*)src; int32_t remainingLen = srcLength; int32_t b1Capacity = MAX_LABEL_BUFFER_SIZE; - + //get the options // UBool allowUnassigned = (UBool)((options & IDNAREF_ALLOW_UNASSIGNED) != 0); // UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0); - + if(U_FAILURE(*status)){ goto CLEANUP; } - + if(srcLength == -1){ for(;;){ - + if(*delimiter == 0){ break; } labelLen = getNextSeparator(labelStart, -1, prep, &delimiter, &done, status); - - if(labelLen==0 && done==FALSE){ + + if(labelLen==0 && done==FALSE){ *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR; } b1Len = idnaref_toUnicode(labelStart, labelLen, b1, b1Capacity, @@ -880,12 +874,12 @@ idnaref_IDNToUnicode( const UChar* src, int32_t srcLength, } *status = U_ZERO_ERROR; // reset error - - b1Len = idnaref_toUnicode( labelStart, labelLen, b1, b1Len, + + b1Len = idnaref_toUnicode( labelStart, labelLen, b1, b1Len, options, parseError, status); - + } - + if(U_FAILURE(*status)){ goto CLEANUP; } @@ -908,17 +902,17 @@ idnaref_IDNToUnicode( const UChar* src, int32_t srcLength, } }else{ for(;;){ - + if(delimiter == src+srcLength){ break; } labelLen = getNextSeparator(labelStart, remainingLen, prep, &delimiter, &done, status); - - if(labelLen==0 && done==FALSE){ + + if(labelLen==0 && done==FALSE){ *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR; - } - + } + b1Len = idnaref_toUnicode( labelStart,labelLen, b1, b1Capacity, options, parseError, status); @@ -932,12 +926,12 @@ idnaref_IDNToUnicode( const UChar* src, int32_t srcLength, } *status = U_ZERO_ERROR; // reset error - - b1Len = idnaref_toUnicode( labelStart, labelLen, b1, b1Len, + + b1Len = idnaref_toUnicode( labelStart, labelLen, b1, b1Len, options, parseError, status); - + } - + if(U_FAILURE(*status)){ goto CLEANUP; } @@ -963,13 +957,13 @@ idnaref_IDNToUnicode( const UChar* src, int32_t srcLength, } CLEANUP: - + if(b1 != b1Stack){ uprv_free(b1); } - + // delete prep; - + return u_terminateUChars(dest, destCapacity, reqLength, status); } @@ -987,7 +981,7 @@ idnaref_compare( const UChar *s1, int32_t length1, UChar *b1 = b1Stack, *b2 = b2Stack; int32_t b1Len, b2Len, b1Capacity = MAX_IDN_BUFFER_SIZE, b2Capacity = MAX_IDN_BUFFER_SIZE; int32_t result = -1; - + UParseError parseError; b1Len = idnaref_IDNToASCII(s1, length1, b1, b1Capacity, options, &parseError, status); @@ -1001,9 +995,9 @@ idnaref_compare( const UChar *s1, int32_t length1, } *status = U_ZERO_ERROR; // reset error - + b1Len = idnaref_IDNToASCII(s1,length1,b1,b1Len, options, &parseError, status); - + } b2Len = idnaref_IDNToASCII(s2,length2,b2,b2Capacity,options, &parseError, status); @@ -1017,9 +1011,9 @@ idnaref_compare( const UChar *s1, int32_t length1, } *status = U_ZERO_ERROR; // reset error - + b2Len = idnaref_IDNToASCII(s2,length2,b2,b2Len,options, &parseError, status); - + } // when toASCII is applied all label separators are replaced with FULL_STOP result = compareCaseInsensitiveASCII(b1,b1Len,b2,b2Len); diff --git a/Build/source/libs/icu-xetex/test/intltest/intltest.cpp b/Build/source/libs/icu-xetex/test/intltest/intltest.cpp index 008fc2ef633..3f440b8f9de 100644 --- a/Build/source/libs/icu-xetex/test/intltest/intltest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/intltest.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -95,7 +95,7 @@ Int64ToUnicodeString(int64_t num) #ifdef U_WINDOWS sprintf(buffer, "%I64d", num); #else - sprintf(buffer, "%lld", num); + sprintf(buffer, "%lld", (long long)num); #endif assert(danger == 'p'); diff --git a/Build/source/libs/icu-xetex/test/intltest/intltest.vcproj b/Build/source/libs/icu-xetex/test/intltest/intltest.vcproj index d02e923d8e3..67fe8756eed 100644 --- a/Build/source/libs/icu-xetex/test/intltest/intltest.vcproj +++ b/Build/source/libs/icu-xetex/test/intltest/intltest.vcproj @@ -28,6 +28,7 @@ RuntimeLibrary="1" BufferSecurityCheck="TRUE" DisableLanguageExtensions="TRUE" + TreatWChar_tAsBuiltInType="TRUE" PrecompiledHeaderFile=".\Debug/intltest.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" @@ -88,6 +89,7 @@ StringPooling="TRUE" RuntimeLibrary="0" DisableLanguageExtensions="TRUE" + TreatWChar_tAsBuiltInType="TRUE" PrecompiledHeaderFile=".\Release/intltest.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" @@ -255,6 +257,12 @@ RelativePath=".\regcoll.h"> </File> <File + RelativePath=".\rndmcoll.cpp"> + </File> + <File + RelativePath=".\rndmcoll.h"> + </File> + <File RelativePath=".\srchtest.cpp"> </File> <File @@ -290,6 +298,12 @@ <File RelativePath=".\ucaconf.h"> </File> + <File + RelativePath=".\wbnf.cpp"> + </File> + <File + RelativePath=".\wbnf.h"> + </File> </Filter> <Filter Name="collections" @@ -312,6 +326,18 @@ Filter=""> <File RelativePath=".\strtest.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> </File> <File RelativePath=".\strtest.h"> @@ -558,6 +584,42 @@ <File RelativePath=".\tztest.h"> </File> + <File + RelativePath=".\windttst.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> + </File> + <File + RelativePath=".\windttst.h"> + </File> + <File + RelativePath=".\winnmtst.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> + </File> + <File + RelativePath=".\winnmtst.h"> + </File> </Filter> <Filter Name="idna" @@ -600,6 +662,12 @@ Name="locales & resources" Filter=""> <File + RelativePath=".\aliastst.cpp"> + </File> + <File + RelativePath=".\aliastst.h"> + </File> + <File RelativePath=".\loctest.cpp"> </File> <File @@ -657,6 +725,24 @@ <File RelativePath=".\tokiter.h"> </File> + <File + RelativePath=".\winutil.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> + </File> + <File + RelativePath=".\winutil.h"> + </File> </Filter> <Filter Name="normalization" @@ -824,6 +910,16 @@ RelativePath=".\convtest.h"> </File> </Filter> + <Filter + Name="charset detection" + Filter=""> + <File + RelativePath=".\csdetest.cpp"> + </File> + <File + RelativePath=".\csdetest.h"> + </File> + </Filter> </Files> <Globals> </Globals> diff --git a/Build/source/libs/icu-xetex/test/intltest/itformat.cpp b/Build/source/libs/icu-xetex/test/intltest/itformat.cpp index c7233002e5c..c5e30d2af3b 100644 --- a/Build/source/libs/icu-xetex/test/intltest/itformat.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/itformat.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ diff --git a/Build/source/libs/icu-xetex/test/intltest/itmajor.cpp b/Build/source/libs/icu-xetex/test/intltest/itmajor.cpp index bcb74d14c91..97b89ea43cc 100644 --- a/Build/source/libs/icu-xetex/test/intltest/itmajor.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/itmajor.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1998-2004, International Business Machines Corporation and + * Copyright (c) 1998-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -32,6 +32,7 @@ #include "icusvtst.h" #include "testidna.h" #include "convtest.h" +#include "csdetest.h" #define CASE_SUITE(id, suite) case id: \ name = #suite; \ @@ -169,6 +170,15 @@ void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &nam #endif break; + case 13: name = "csdet"; + if (exec) { + logln("TestSuite CharsetDetection---"); logln(); + CharsetDetectionTest test; + callTest(test, par); + } + + break; + default: name = ""; break; } diff --git a/Build/source/libs/icu-xetex/test/intltest/itrbnf.cpp b/Build/source/libs/icu-xetex/test/intltest/itrbnf.cpp index 248f4ad3c92..a44c8c7eedd 100644 --- a/Build/source/libs/icu-xetex/test/intltest/itrbnf.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/itrbnf.cpp @@ -180,6 +180,12 @@ IntlTestRBNF::TestAPI() { if(!(ruleCtorResult == *formatter)) { errln("Formatter constructed from the original rules should be semantically equivalent to the original!"); } + + // Jitterbug 4452, for coverage + RuleBasedNumberFormat nf(spelloutRules, (UnicodeString)"", Locale::getUS(), perror, status); + if(!(nf == *formatter)) { + errln("Formatter constructed from the original rules should be semantically equivalent to the original!"); + } } ures_close(en); } @@ -297,6 +303,16 @@ IntlTestRBNF::TestAPI() { logln("Formatted 4 int64_t, expected " + expected + " got " + result); } + //Jitterbug 4452, for coverage + result.remove(); + FieldPosition pos2; + formatter->format((int64_t)4, formatter->getRuleSetName(0), result, pos2, status = U_ZERO_ERROR); + if(result != expected) { + errln("Formatted 4 int64_t, expected " + expected + " got " + result); + } else { + logln("Formatted 4 int64_t, expected " + expected + " got " + result); + } + // clean up logln("Cleaning up"); delete formatter; diff --git a/Build/source/libs/icu-xetex/test/intltest/itutil.cpp b/Build/source/libs/icu-xetex/test/intltest/itutil.cpp index a6368138b86..b7aafc82269 100644 --- a/Build/source/libs/icu-xetex/test/intltest/itutil.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/itutil.cpp @@ -23,7 +23,8 @@ #include "uobjtest.h" #include "utxttest.h" #include "v32test.h" -#include "uvectest.h" +#include "uvectest.h" +#include "aliastst.h" //#include "custrtest.h" //#include "ccitrtst.h" //#include "cloctest.h" @@ -148,19 +149,17 @@ void IntlTestUtilities::runIndexedTest( int32_t index, UBool exec, const char* & UTextTest test; callTest( test, par ); } - break;; - + break; - /* - case 8: - name = "LocaleTest"; + case 13: + name = "LocaleAliasTest"; if (exec) { - logln("LocaleTest---"); logln(""); - CLocaleTest test; + logln("LocaleAliasTest---"); logln(""); + LocaleAliasTest test; callTest( test, par ); } break; - */ + default: name = ""; break; //needed to end loop } } diff --git a/Build/source/libs/icu-xetex/test/intltest/loctest.cpp b/Build/source/libs/icu-xetex/test/intltest/loctest.cpp index c18ea0a3f25..06264a7fba9 100644 --- a/Build/source/libs/icu-xetex/test/intltest/loctest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/loctest.cpp @@ -1,11 +1,10 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ #include "loctest.h" -#include <stdio.h> #include "unicode/decimfmt.h" #include "unicode/ucurr.h" #include "unicode/smpdtfmt.h" @@ -13,7 +12,7 @@ #include "unicode/brkiter.h" #include "unicode/coll.h" #include "cstring.h" -#include "uassert.h" +#include <stdio.h> const char* rawData[33][8] = { @@ -50,14 +49,14 @@ const char* rawData[33][8] = { // display langage (French) { "anglais", "fran\\u00E7ais", "catalan", "grec", "norv\\u00E9gien", "italien", "xx", "chinois" }, // display script (French) - { "", "", "", "", "", "", "", "han simplifi\\u00E9" }, + { "", "", "", "", "", "", "", "id\\u00E9ogrammes han (variante simplifi\\u00E9e)" }, // display country (French) { "\\u00C9tats-Unis", "France", "Espagne", "Gr\\u00E8ce", "Norv\\u00E8ge", "", "YY", "Chine" }, // display variant (French) { "", "", "", "", "NY", "", "", "" }, // display name (French) //{ "anglais (Etats-Unis)", "francais (France)", "catalan (Espagne)", "grec (Grece)", "norvegien (Norvege,Nynorsk)", "italien", "xx (YY)" }, - { "anglais (\\u00C9tats-Unis)", "fran\\u00E7ais (France)", "catalan (Espagne)", "grec (Gr\\u00E8ce)", "norv\\u00E9gien (Norv\\u00E8ge, NY)", "italien", "xx (YY)", "chinois (han simplifi\\u00E9, Chine)" }, // STILL not right + { "anglais (\\u00C9tats-Unis)", "fran\\u00E7ais (France)", "catalan (Espagne)", "grec (Gr\\u00E8ce)", "norv\\u00E9gien (Norv\\u00E8ge, NY)", "italien", "xx (YY)", "chinois (id\\u00E9ogrammes han (variante simplifi\\u00E9e), Chine)" }, // STILL not right /* display language (Catalan) */ @@ -119,38 +118,25 @@ const char* rawData[33][8] = { { "English (United States)", "French (France)", "Catalan (Spain)", "Greek (Greece)", "Norwegian (Norway,NY)", "Italian", "xx (YY)", "" } }; -// * test macros + /* Usage: - test_compare( Function to be performed, - Test of the function, - expected result of the test, - printable result - ) + test_assert( Test (should be TRUE) ) Example: - test_compare(i=3,i,3, someNumberFormatter(i)); - test_compare(0,1+1,2,someNumberFormatter(1+1)); - - Note that in the second example the expression is 0, because the fcn produces it's own result. + test_assert(i==3); - Macro is ugly but makes the tests pretty. + the macro is ugly but makes the tests pretty. */ -#define test_compare(expression,test,expected,printableResult) \ +#define test_assert(test) \ { \ - expression; \ - \ - if((test) != (expected)) \ - errln("FAIL: " + UnicodeString(#expression) + "; -> " + printableResult + "\n" + \ - " (" + UnicodeString(#test) + " != " + UnicodeString(#expected) + ")" ); \ + if(!(test)) \ + errln("FAIL: " #test " was not true. In " __FILE__ " on line %d", __LINE__ ); \ else \ - logln(UnicodeString(#expression) + " -> " + printableResult + " (" + UnicodeString(#test) + ")"); \ + logln("PASS: asserted " #test); \ } - - - /* Usage: test_assert_print( Test (should be TRUE), printable ) @@ -164,13 +150,13 @@ const char* rawData[33][8] = { #define test_assert_print(test,print) \ { \ if(!(test)) \ - errln("FAIL: " + UnicodeString(#test) + " was not true." + "-> " + UnicodeString(print) ); \ + errln("FAIL: " #test " was not true. " + UnicodeString(print) ); \ else \ - logln("PASS: asserted " + UnicodeString(#test) + "-> " + UnicodeString(print)); \ + logln("PASS: asserted " #test "-> " + UnicodeString(print)); \ } -#define test_dumpLocale(l) { UnicodeString s(l.getName(),""); logln(#l + UnicodeString(" = ") + s); } +#define test_dumpLocale(l) { logln(#l " = " + UnicodeString(l.getName(), "")); } LocaleTest::LocaleTest() : dataTable(NULL) @@ -511,24 +497,6 @@ LocaleTest::TestDisplayNames() } } -/* - Usage: - test_assert( Test (should be TRUE) ) - - Example: - test_assert(i==3); - - the macro is ugly but makes the tests pretty. -*/ - -#define test_assert(test) \ - { \ - if(!(test)) \ - errln("FAIL: " + UnicodeString(#test) + " was not true. " + UnicodeString(__FILE__ " line ") + __LINE__ ); \ - else \ - logln("PASS: asserted " + UnicodeString(#test) ); \ - } - void LocaleTest::TestSimpleObjectStuff() { Locale test1("aa", "AA"); Locale test2("aa", "AA"); @@ -877,8 +845,8 @@ LocaleTest::TestGetLangsAndCountries() ; /* TODO: Change this test to be more like the cloctst version? */ - if (testCount != 473) - errln("Expected getISOLanguages() to return 473 languages; it returned %d", testCount); + if (testCount != 485) + errln("Expected getISOLanguages() to return 481 languages; it returned %d", testCount); else { for (i = 0; i < 15; i++) { int32_t j; @@ -908,9 +876,9 @@ LocaleTest::TestGetLangsAndCountries() for(testCount=0;test[testCount];testCount++) ; - if (testCount != 240) - errln("Expected getISOLanguages to return 240 languages; it returned" + testCount); - else { + if (testCount != 244){ + errln("Expected getISOCountries to return 240 countries; it returned %d", testCount); + }else { for (i = 0; i < spot2Len; i++) { int32_t j; for (j = 0; j < testCount; j++) @@ -925,7 +893,7 @@ LocaleTest::TestGetLangsAndCountries() errln("Couldn't find " + spotCheck2[i] + " in country list."); } } - for (i = 0; i < testCount; i++) { + for (i = 0; i < testCount; i++) { UnicodeString testee(test[i],""); UnicodeString uc(test[i],""); if (testee != uc.toUpper()) @@ -1037,7 +1005,7 @@ LocaleTest::TestAtypicalLocales() "espagnol (Allemagne)", "Croatie", CharsToUnicodeString("Su\\u00E8de"), - CharsToUnicodeString("R\\u00E9publique dominicaine"), + CharsToUnicodeString("Dominicaine, r\\u00E9publique"), "Belgique" }; UnicodeString spanishDisplayNames [] = { CharsToUnicodeString("alem\\u00E1n (Canad\\u00E1)"), @@ -1819,7 +1787,10 @@ void LocaleTest::TestGetLocale(void) { if (U_FAILURE(ec)) { errln("FAIL: NumberFormat::createInstance failed"); } else { - U_ASSERT(dec->getDynamicClassID() == DecimalFormat::getStaticClassID()); + if (dec->getDynamicClassID() != DecimalFormat::getStaticClassID()) { + errln("FAIL: NumberFormat::createInstance does not return a DecimalFormat"); + return; + } valid = dec->getLocale(ULOC_VALID_LOCALE, ec); actual = dec->getLocale(ULOC_ACTUAL_LOCALE, ec); if (U_FAILURE(ec)) { @@ -1829,7 +1800,10 @@ void LocaleTest::TestGetLocale(void) { } const DecimalFormatSymbols* sym = dec->getDecimalFormatSymbols(); - U_ASSERT(sym != 0); + if (sym == NULL) { + errln("FAIL: getDecimalFormatSymbols returned NULL"); + return; + } valid = sym->getLocale(ULOC_VALID_LOCALE, ec); actual = sym->getLocale(ULOC_ACTUAL_LOCALE, ec); if (U_FAILURE(ec)) { @@ -1850,7 +1824,10 @@ void LocaleTest::TestGetLocale(void) { if (dat == 0){ dataerrln("Error calling DateFormat::createDateInstance()"); } else { - U_ASSERT(dat->getDynamicClassID() == SimpleDateFormat::getStaticClassID()); + if (dat->getDynamicClassID() != SimpleDateFormat::getStaticClassID()) { + errln("FAIL: NumberFormat::createInstance does not return a DecimalFormat"); + return; + } valid = dat->getLocale(ULOC_VALID_LOCALE, ec); actual = dat->getLocale(ULOC_ACTUAL_LOCALE, ec); if (U_FAILURE(ec)) { @@ -1860,7 +1837,10 @@ void LocaleTest::TestGetLocale(void) { } const DateFormatSymbols* sym = dat->getDateFormatSymbols(); - U_ASSERT(sym != 0); + if (sym == NULL) { + errln("FAIL: getDateFormatSymbols returned NULL"); + return; + } valid = sym->getLocale(ULOC_VALID_LOCALE, ec); actual = sym->getLocale(ULOC_ACTUAL_LOCALE, ec); if (U_FAILURE(ec)) { @@ -2087,8 +2067,9 @@ void LocaleTest::TestCanonicalization(void) { "en-BOONT", "BOGUS", "en__BOONT" }, /* registered name */ { "de-1901", "de_1901", "de__1901" }, /* registered name */ { "de-1906", "de_1906", "de__1906" }, /* registered name */ - { "sr-SP-Cyrl", "sr_SP_CYRL", "sr_Cyrl_SP" }, /* .NET name */ - { "sr-SP-Latn", "sr_SP_LATN", "sr_Latn_SP" }, /* .NET name */ + { "sr-SP-Cyrl", "sr_SP_CYRL", "sr_Cyrl_CS" }, /* .NET name */ + { "sr-SP-Latn", "sr_SP_LATN", "sr_Latn_CS" }, /* .NET name */ + { "sr_YU_CYRILLIC", "sr_YU_CYRILLIC", "sr_Cyrl_CS" }, /* Linux name */ { "uz-UZ-Cyrl", "uz_UZ_CYRL", "uz_Cyrl_UZ" }, /* .NET name */ { "uz-UZ-Latn", "uz_UZ_LATN", "uz_Latn_UZ" }, /* .NET name */ { "zh-CHS", "zh_CHS", "zh_Hans" }, /* .NET name */ diff --git a/Build/source/libs/icu-xetex/test/intltest/miscdtfm.cpp b/Build/source/libs/icu-xetex/test/intltest/miscdtfm.cpp index e1415ecf3a1..0a5fb0bb1ed 100644 --- a/Build/source/libs/icu-xetex/test/intltest/miscdtfm.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/miscdtfm.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -122,7 +122,7 @@ DateFormatMiscTests::test4097450() { log(dformat[i] + "\t" + dstring[i] + "\t"); formatter = new SimpleDateFormat(dformat[i], status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; //try { UnicodeString str; FieldPosition pos(FieldPosition::DONT_CARE); @@ -157,9 +157,9 @@ DateFormatMiscTests::test4099975() { UErrorCode status = U_ZERO_ERROR; DateFormatSymbols* symbols = new DateFormatSymbols(Locale::getUS(), status); - failure(status, "new DateFormatSymbols"); + if(failure(status, "new DateFormatSymbols")) return; SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("E hh:mm"), *symbols, status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; UnicodeString format0; format0 = df->format(d, format0); UnicodeString localizedPattern0; @@ -189,9 +189,9 @@ DateFormatMiscTests::test4099975() { UErrorCode status = U_ZERO_ERROR; DateFormatSymbols* symbols = new DateFormatSymbols(Locale::getUS(), status); - failure(status, "new DateFormatSymbols"); + if(failure(status, "new DateFormatSymbols")) return; SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("E hh:mm"), status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; df->setDateFormatSymbols(*symbols); UnicodeString format0; format0 = df->format(d, format0); @@ -220,9 +220,9 @@ DateFormatMiscTests::test4099975() { UErrorCode status = U_ZERO_ERROR; DateFormatSymbols* symbols = new DateFormatSymbols(Locale::getUS(), status); - failure(status, "new DateFormatSymbols"); + if(failure(status, "new DateFormatSymbols")) return; SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("E hh:mm"), symbols, status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; UnicodeString format0; format0 = df->format(d, format0); UnicodeString localizedPattern0; @@ -251,7 +251,7 @@ DateFormatMiscTests::test4099975() DateFormatSymbols* symbols = new DateFormatSymbols(Locale::getUS(), status); failure(status, "new DateFormatSymbols"); SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("E hh:mm"), status); - failure(status, "new SimpleDateFormat"); + if(failure(status, "new SimpleDateFormat")) return; df-> adoptDateFormatSymbols(symbols); UnicodeString format0; format0 = df->format(d, format0); @@ -308,11 +308,17 @@ DateFormatMiscTests::test4117335() 0x6e96, 0x6642 }; + UChar jdtLongC [] = {0x65E5, 0x672C, 0x590F, 0x6642, 0x9593}; + UnicodeString jstLong(jstLongC, 5, 5); UnicodeString jstShort = "JST"; - + UnicodeString tzID = "Asia/Tokyo"; + + UnicodeString jdtLong(jdtLongC, 5, 5); + + UnicodeString jdtShort = "JDT"; UErrorCode status = U_ZERO_ERROR; DateFormatSymbols *symbols = new DateFormatSymbols(Locale::getJapan(), status); if(U_FAILURE(status)) { @@ -338,25 +344,32 @@ DateFormatMiscTests::test4117335() int32_t rowCount, colCount; const UnicodeString **zones = symbols->getZoneStrings(rowCount, colCount); - int pos = 5; - logln(UnicodeString("Long zone name = ") + zones[pos][1]); - if (zones[pos][1] != jstLong) { - errln("*** Should have been " + prettify(jstLong)+ " but it is: " + prettify(zones[pos][1])); + //don't hard code the index .. compute it. + int32_t index = -1; + for (int32_t i = 0; i < rowCount; ++i) { + if (tzID == (zones[i][0])) { + index = i; + break; + } + } + logln(UnicodeString("Long zone name = ") + zones[index][1]); + if (zones[index][1] != jstLong) { + errln("*** Should have been " + prettify(jstLong)+ " but it is: " + prettify(zones[index][1])); //throw new Exception("Error in long TZ name"); } - logln(UnicodeString("Short zone name = ") + zones[pos][2]); - if (zones[pos][2] != jstShort) { - errln("*** Should have been " + prettify(jstShort) + " but it is: " + prettify(zones[pos][2])); + logln(UnicodeString("Short zone name = ") + zones[index][2]); + if (zones[index][2] != jstShort) { + errln("*** Should have been " + prettify(jstShort) + " but it is: " + prettify(zones[index][2])); //throw new Exception("Error in short TZ name"); } - logln(UnicodeString("Long zone name = ") + zones[pos][3]); - if (zones[pos][3] != jstLong) { - errln("*** Should have been " + prettify(jstLong) + " but it is: " + prettify(zones[pos][3])); + logln(UnicodeString("Long zone name = ") + zones[index][3]); + if (zones[index][3] != jdtLong) { + errln("*** Should have been " + prettify(jstLong) + " but it is: " + prettify(zones[index][3])); //throw new Exception("Error in long TZ name"); } - logln(UnicodeString("SHORT zone name = ") + zones[pos][4]); - if (zones[pos][4] != jstShort) { - errln("*** Should have been " + prettify(jstShort)+ " but it is: " + prettify(zones[pos][4])); + logln(UnicodeString("SHORT zone name = ") + zones[index][4]); + if (zones[index][4] != jdtShort) { + errln("*** Should have been " + prettify(jstShort)+ " but it is: " + prettify(zones[index][4])); //throw new Exception("Error in short TZ name"); } delete symbols; diff --git a/Build/source/libs/icu-xetex/test/intltest/nmfmtrt.cpp b/Build/source/libs/icu-xetex/test/intltest/nmfmtrt.cpp index 77da5c6823f..0a6e9e81df1 100644 --- a/Build/source/libs/icu-xetex/test/intltest/nmfmtrt.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/nmfmtrt.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -225,7 +225,9 @@ void NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value) { fmt->setMaximumFractionDigits(999); - + if(fmt->getDynamicClassID() == DecimalFormat::getStaticClassID()) { + ((DecimalFormat *)fmt)->setRoundingIncrement(0.0); + } UErrorCode status = U_ZERO_ERROR; UnicodeString s, s2, temp; if(isDouble(value)) diff --git a/Build/source/libs/icu-xetex/test/intltest/numfmtst.cpp b/Build/source/libs/icu-xetex/test/intltest/numfmtst.cpp index 3e969e395c5..04e1010814e 100644 --- a/Build/source/libs/icu-xetex/test/intltest/numfmtst.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/numfmtst.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* Modification History: @@ -24,6 +24,7 @@ #include "tokiter.h" #include "charstr.h" #include "putilimp.h" +#include "winnmtst.h" #include <float.h> #include <string.h> @@ -79,7 +80,9 @@ void NumberFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &n CASE(29,TestCurrencyAmount); CASE(30,TestCurrencyUnit); CASE(31,TestCoverage); - + CASE(32,TestJB3832); + CASE(33,TestHost); + CASE(34,TestCurrencyFormat); default: name = ""; break; } } @@ -127,10 +130,10 @@ NumberFormatTest::TestAPI(void) class StubNumberForamt :public NumberFormat{ public: StubNumberForamt(){}; - virtual UnicodeString& format(double number,UnicodeString& appendTo,FieldPosition& pos) const { + virtual UnicodeString& format(double ,UnicodeString& appendTo,FieldPosition& ) const { return appendTo; } - virtual UnicodeString& format(int32_t number,UnicodeString& appendTo,FieldPosition& pos) const { + virtual UnicodeString& format(int32_t ,UnicodeString& appendTo,FieldPosition& ) const { return appendTo.append((UChar)0x0033); } virtual UnicodeString& format(int64_t number,UnicodeString& appendTo,FieldPosition& pos) const { @@ -139,12 +142,12 @@ public: virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErrorCode& ) const { return appendTo; } - virtual void parse(const UnicodeString& text, - Formattable& result, - ParsePosition& parsePosition) const {} - virtual void parse( const UnicodeString& text, - Formattable& result, - UErrorCode& status) const {} + virtual void parse(const UnicodeString& , + Formattable& , + ParsePosition& ) const {} + virtual void parse( const UnicodeString& , + Formattable& , + UErrorCode& ) const {} virtual UClassID getDynamicClassID(void) const { static char classID = 0; return (UClassID)&classID; @@ -644,7 +647,8 @@ static const char* testCases[][2]= { {"eu_ES_PREEURO", "\\u20A7 1.150" }, {"gl_ES_PREEURO", "\\u20A7 1.150" }, {"it_IT_PREEURO", "\\u20A4 1.150" }, - {"pt_PT_PREEURO", "1,150$50 Esc."} + {"pt_PT_PREEURO", "1,150$50 Esc."}, + {"en_US@currency=JPY", "\\u00A51,150"} }; /** * Test localized currency patterns. @@ -1583,7 +1587,8 @@ void NumberFormatTest::TestSymbolsWithBadLocale(void) { + prettify(mySymbols.getSymbol((DecimalFormatSymbols::ENumberFormatSymbol)symbolEnum))); if (mySymbols.getSymbol((DecimalFormatSymbols::ENumberFormatSymbol)symbolEnum).length() == 0 - && symbolEnum != (int)DecimalFormatSymbols::kGroupingSeparatorSymbol) + && symbolEnum != (int)DecimalFormatSymbols::kGroupingSeparatorSymbol + && symbolEnum != (int)DecimalFormatSymbols::kMonetaryGroupingSeparatorSymbol) { errln("DecimalFormatSymbols has an empty string at index %d.", symbolEnum); } @@ -2171,5 +2176,85 @@ void NumberFormatTest::expectPad(DecimalFormat& fmt, const UnicodeString& pat, ", expected " + pos + " " + width + " " + pad); } } +void NumberFormatTest::TestJB3832(){ + const char* localeID = "pt_PT@currency=PTE"; + Locale loc(localeID); + UErrorCode status = U_ZERO_ERROR; + UnicodeString expected("1,150$50 Esc."); + UnicodeString s; + NumberFormat* currencyFmt = NumberFormat::createCurrencyInstance(loc, status); + if(U_FAILURE(status)){ + errln("Could not create currency formatter for locale %s", localeID); + return; + } + currencyFmt->format(1150.50, s); + if(s!=expected){ + errln(UnicodeString("FAIL: Expected: ")+expected + + UnicodeString(" Got: ") + s + + UnicodeString( " for locale: ")+ UnicodeString(localeID) ); + } + if (U_FAILURE(status)){ + errln("FAIL: Status %s", u_errorName(status)); + } + delete currencyFmt; +} + +void NumberFormatTest::TestHost() +{ +#ifdef U_WINDOWS + Win32NumberTest::testLocales(this); +#endif +} + +void NumberFormatTest::TestCurrencyFormat() +{ + // This test is here to increase code coverage. + UErrorCode status = U_ZERO_ERROR; + MeasureFormat *cloneObj; + UnicodeString str; + Formattable toFormat, result; + static const UChar ISO_CODE[4] = {0x0047, 0x0042, 0x0050, 0}; + + Locale saveDefaultLocale = Locale::getDefault(); + Locale::setDefault( Locale::getUK(), status ); + if (U_FAILURE(status)) { + errln("couldn't set default Locale!"); + return; + } + + MeasureFormat *measureObj = MeasureFormat::createCurrencyFormat(status); + Locale::setDefault( saveDefaultLocale, status ); + if (U_FAILURE(status)){ + errln("FAIL: Status %s", u_errorName(status)); + return; + } + cloneObj = (MeasureFormat *)measureObj->clone(); + if (cloneObj == NULL) { + errln("Clone doesn't work"); + return; + } + toFormat.adoptObject(new CurrencyAmount(1234.56, ISO_CODE, status)); + measureObj->format(toFormat, str, status); + measureObj->parseObject(str, result, status); + if (U_FAILURE(status)){ + errln("FAIL: Status %s", u_errorName(status)); + } + if (result != toFormat) { + errln("measureObj does not round trip. Formatted string was \"" + str + "\" Got: " + toString(result) + " Expected: " + toString(toFormat)); + } + status = U_ZERO_ERROR; + str.truncate(0); + cloneObj->format(toFormat, str, status); + cloneObj->parseObject(str, result, status); + if (U_FAILURE(status)){ + errln("FAIL: Status %s", u_errorName(status)); + } + if (result != toFormat) { + errln("Clone does not round trip. Formatted string was \"" + str + "\" Got: " + toString(result) + " Expected: " + toString(toFormat)); + } + delete measureObj; + delete cloneObj; + +} #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/Build/source/libs/icu-xetex/test/intltest/numfmtst.h b/Build/source/libs/icu-xetex/test/intltest/numfmtst.h index 5f565f03b79..2c7e5bbefbd 100644 --- a/Build/source/libs/icu-xetex/test/intltest/numfmtst.h +++ b/Build/source/libs/icu-xetex/test/intltest/numfmtst.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -116,9 +116,14 @@ class NumberFormatTest: public CalendarTimeZoneTest { void TestPerMill(void); void TestIllegalPatterns(void); - + void TestCases(void); + void TestJB3832(void); + + void TestHost(void); + + void TestCurrencyFormat(void); private: static UBool equalValue(const Formattable& a, const Formattable& b); diff --git a/Build/source/libs/icu-xetex/test/intltest/numrgts.cpp b/Build/source/libs/icu-xetex/test/intltest/numrgts.cpp index b22a118dcf2..cb82463c4b9 100644 --- a/Build/source/libs/icu-xetex/test/intltest/numrgts.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/numrgts.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -19,6 +19,7 @@ #include "unicode/resbund.h" #include "unicode/calendar.h" #include "unicode/datefmt.h" +#include "unicode/ucurr.h" #include "putilimp.h" class MyNumberFormatTest : public NumberFormat @@ -878,11 +879,11 @@ void NumberFormatRegressionTest::Test4070798 (void) 0x35, 0x00a0, 0x37, 0x38, 0x39, 0x2c, 0x39, 0x39, 0x20, 0x46 }; UChar chars3 [] = { - 0x2d, 0x35, 0x37, 0x38, 0x00a0, 0x39, 0x39, 0x39, 0x25 + 0x2d, 0x35, 0x37, 0x38, 0x00a0, 0x39, 0x39, 0x39, 0x00a0, 0x25 }; UnicodeString expectedDefault(chars1, 10, 10); UnicodeString expectedCurrency(chars2, 10, 10); - UnicodeString expectedPercent(chars3, 9, 9); + UnicodeString expectedPercent(chars3, 10, 10); UErrorCode status = U_ZERO_ERROR; char loc[256]={0}; @@ -954,11 +955,11 @@ void NumberFormatRegressionTest::Test4071005 (void) 0x35, 0x00a0, 0x37, 0x38, 0x39, 0x2c, 0x39, 0x39, 0x20, 0x24 }; UChar chars3 [] = { - 0x2d, 0x35, 0x37, 0x38, 0x00a0, 0x39, 0x39, 0x39, 0x25 + 0x2d, 0x35, 0x37, 0x38, 0x00a0, 0x39, 0x39, 0x39, 0x00a0, 0x25 }; UnicodeString expectedDefault(chars1, 10, 10); UnicodeString expectedCurrency(chars2, 10, 10); - UnicodeString expectedPercent(chars3, 9, 9); + UnicodeString expectedPercent(chars3, 10, 10); UErrorCode status = U_ZERO_ERROR; formatter = NumberFormat::createInstance(Locale::getCanadaFrench(), status); @@ -1683,6 +1684,21 @@ void NumberFormatRegressionTest::Test4122840(void) DecimalFormat *fmt2 = new DecimalFormat(buf, *symbols, status); failure(status, "new DecimalFormat"); + // Get the currency (if there is one) so we can set the rounding and fraction + const UChar *currency = fmt1->getCurrency(); + if (*currency != 0) { + double rounding = ucurr_getRoundingIncrement(currency, &status); + int32_t frac = ucurr_getDefaultFractionDigits(currency, &status); + if (U_SUCCESS(status)) { + fmt2->setRoundingIncrement(rounding); + fmt2->setMinimumFractionDigits(frac); + fmt2->setMaximumFractionDigits(frac); + } + else { + failure(status, "Fetching currency rounding/fractions"); + } + } + UnicodeString result2; fmt2->format(1.111, result2, pos); @@ -2385,6 +2401,17 @@ void NumberFormatRegressionTest::Test4212072(void) { if (U_FAILURE(status)) { continue; } + + // Make sure we set the currency attributes appropriately + if (j == 1) { // Currency format + f2.setCurrency(f2.getCurrency(), status); + } + failure(status, + UnicodeString("setCurrency() for (") + pat + ")", avail[i]); + if (U_FAILURE(status)) { + continue; + } + if (*df != f2) { UnicodeString l, p; errln(UnicodeString("FAIL: ") + type[j] + avail[i].getDisplayName(l) + diff --git a/Build/source/libs/icu-xetex/test/intltest/rbbiapts.cpp b/Build/source/libs/icu-xetex/test/intltest/rbbiapts.cpp index 9a9c0669a6c..54f4db99cf3 100644 --- a/Build/source/libs/icu-xetex/test/intltest/rbbiapts.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/rbbiapts.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1999-2005, International Business Machines Corporation and + * Copyright (c) 1999-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /************************************************************************ @@ -20,6 +20,7 @@ #include "rbbiapts.h" #include "rbbidata.h" #include "cstring.h" +#include "ubrkimpl.h" #include "unicode/ustring.h" #include "unicode/utext.h" @@ -147,8 +148,8 @@ void RBBIAPITest::TestCloneEquals() void RBBIAPITest::TestBoilerPlate() { UErrorCode status = U_ZERO_ERROR; - BreakIterator* a = BreakIterator::createLineInstance(Locale("hi"), status); - BreakIterator* b = BreakIterator::createLineInstance(Locale("hi_IN"),status); + BreakIterator* a = BreakIterator::createWordInstance(Locale("hi"), status); + BreakIterator* b = BreakIterator::createWordInstance(Locale("hi_IN"),status); if (U_FAILURE(status)) { errln("Creation of break iterator failed %s", u_errorName(status)); return; @@ -156,7 +157,7 @@ void RBBIAPITest::TestBoilerPlate() if(*a!=*b){ errln("Failed: boilerplate method operator!= does not return correct results"); } - BreakIterator* c = BreakIterator::createLineInstance(Locale("th"),status); + BreakIterator* c = BreakIterator::createWordInstance(Locale("ja"),status); if(a && c){ if(*c==*a){ errln("Failed: boilerplate method opertator== does not return correct results"); @@ -259,8 +260,10 @@ void RBBIAPITest::TestGetSetAdoptText() CharacterIterator* text3= new StringCharacterIterator(str2, 3, 10, 3); // "ond str" wordIter1->setText(str1); - if(wordIter1->getText() != *text1) - errln((UnicodeString)"ERROR:1 error in setText or getText "); + CharacterIterator *tci = &wordIter1->getText(); + UnicodeString tstr; + tci->getText(tstr); + TEST_ASSERT(tstr == str1); if(wordIter1->current() != 0) errln((UnicodeString)"ERROR:1 setText did not set the iteration position to the beginning of the text, it is" + wordIter1->current() + (UnicodeString)"\n"); @@ -272,9 +275,14 @@ void RBBIAPITest::TestGetSetAdoptText() charIter1->adoptText(text1Clone); - if( wordIter1->getText() == charIter1->getText() || - wordIter1->getText() != *text2 || charIter1->getText() != *text1 ) - errln((UnicodeString)"ERROR:2 error is getText or setText()"); + TEST_ASSERT(wordIter1->getText() != charIter1->getText()); + tci = &wordIter1->getText(); + tci->getText(tstr); + TEST_ASSERT(tstr == str2); + tci = &charIter1->getText(); + tci->getText(tstr); + TEST_ASSERT(tstr == str1); + RuleBasedBreakIterator* rb=(RuleBasedBreakIterator*)wordIter1->clone(); rb->adoptText(text1); @@ -285,13 +293,17 @@ void RBBIAPITest::TestGetSetAdoptText() errln((UnicodeString)"ERROR:2 error in adoptText "); // Adopt where iterator range is less than the entire orignal source string. + // (With the change of the break engine to working with UText internally, + // CharacterIterators starting at positions other than zero are not supported) rb->adoptText(text3); - if(rb->preceding(2) != 3) { - errln((UnicodeString)"ERROR:3 error in adoptText "); - } - if(rb->following(11) != BreakIterator::DONE) { - errln((UnicodeString)"ERROR:4 error in adoptText "); - } + TEST_ASSERT(rb->preceding(2) == 0); + TEST_ASSERT(rb->following(11) == BreakIterator::DONE); + //if(rb->preceding(2) != 3) { + // errln((UnicodeString)"ERROR:3 error in adoptText "); + //} + //if(rb->following(11) != BreakIterator::DONE) { + // errln((UnicodeString)"ERROR:4 error in adoptText "); + //} // UText API // @@ -342,6 +354,13 @@ void RBBIAPITest::TestGetSetAdoptText() pos = wordIter1->previous(); TEST_ASSERT(pos==UBRK_DONE); + status = U_ZERO_ERROR; + UnicodeString sEmpty; + UText *gut2 = utext_openUnicodeString(NULL, &sEmpty, &status); + wordIter1->getUText(gut2, status); + TEST_ASSERT_SUCCESS(status); + utext_close(gut2); + utext_close(ut); utext_close(ut2); @@ -858,17 +877,17 @@ void RBBIAPITest::TestBug2190() { void RBBIAPITest::TestRegistration() { #if !UCONFIG_NO_SERVICE UErrorCode status = U_ZERO_ERROR; - BreakIterator* thai_word = BreakIterator::createWordInstance("th_TH", status); + BreakIterator* ja_word = BreakIterator::createWordInstance("ja_JP", status); // ok to not delete these if we exit because of error? - BreakIterator* thai_char = BreakIterator::createCharacterInstance("th_TH", status); + BreakIterator* ja_char = BreakIterator::createCharacterInstance("ja_JP", status); BreakIterator* root_word = BreakIterator::createWordInstance("", status); BreakIterator* root_char = BreakIterator::createCharacterInstance("", status); - URegistryKey key = BreakIterator::registerInstance(thai_word, "xx", UBRK_WORD, status); + URegistryKey key = BreakIterator::registerInstance(ja_word, "xx", UBRK_WORD, status); { - if (thai_word && *thai_word == *root_word) { - errln("thai not different from root"); + if (ja_word && *ja_word == *root_word) { + errln("japan not different from root"); } } @@ -876,7 +895,7 @@ void RBBIAPITest::TestRegistration() { BreakIterator* result = BreakIterator::createWordInstance("xx_XX", status); UBool fail = TRUE; if(result){ - fail = *result != *thai_word; + fail = *result != *ja_word; } delete result; if (fail) { @@ -885,14 +904,14 @@ void RBBIAPITest::TestRegistration() { } { - BreakIterator* result = BreakIterator::createCharacterInstance("th_TH", status); + BreakIterator* result = BreakIterator::createCharacterInstance("ja_JP", status); UBool fail = TRUE; if(result){ - fail = *result != *thai_char; + fail = *result != *ja_char; } delete result; if (fail) { - errln("bad result for th_TH/char"); + errln("bad result for ja_JP/char"); } } @@ -977,8 +996,8 @@ void RBBIAPITest::TestRegistration() { } - // that_word was adopted by factory - delete thai_char; + // ja_word was adopted by factory + delete ja_char; delete root_word; delete root_char; #endif @@ -989,7 +1008,7 @@ void RBBIAPITest::RoundtripRule(const char *dataFile) { UParseError parseError; parseError.line = 0; parseError.offset = 0; - UDataMemory *data = udata_open(NULL, "brk", dataFile, &status); + UDataMemory *data = udata_open(U_ICUDATA_BRKITR, "brk", dataFile, &status); uint32_t length; const UChar *builtSource; const uint8_t *rbbiRules; @@ -1025,8 +1044,8 @@ void RBBIAPITest::TestRoundtripRules() { RoundtripRule("line"); RoundtripRule("char"); if (!quick) { - RoundtripRule("word_th"); - RoundtripRule("line_th"); + RoundtripRule("word_ja"); + RoundtripRule("word_POSIX"); } } diff --git a/Build/source/libs/icu-xetex/test/intltest/rbbitst.cpp b/Build/source/libs/icu-xetex/test/intltest/rbbitst.cpp index 4e02c7e800c..34deb932b62 100644 --- a/Build/source/libs/icu-xetex/test/intltest/rbbitst.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/rbbitst.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1999-2005, International Business Machines Corporation and + * Copyright (c) 1999-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /************************************************************************ @@ -29,6 +29,7 @@ #include <string.h> #include "uvector.h" #include "uvectr32.h" +#include "triedict.h" #include <string.h> #include <stdio.h> #include <stdlib.h> @@ -303,7 +304,7 @@ static void printStringBreaks(UnicodeString ustr, int expected[], { UErrorCode status = U_ZERO_ERROR; char name[100]; - printf("code alpha extend alphanum type line name\n"); + printf("code alpha extend alphanum type word sent line name\n"); int j; for (j = 0; j < ustr.length(); j ++) { if (expectedcount > 0) { @@ -320,17 +321,25 @@ static void printStringBreaks(UnicodeString ustr, int expected[], j ++; } u_charName(c, U_UNICODE_CHAR_NAME, name, 100, &status); - printf("%7x %5d %6d %8d %4s %4s %s\n", (int)c, + printf("%7x %5d %6d %8d %4s %4s %4s %4s %s\n", (int)c, u_isUAlphabetic(c), u_hasBinaryProperty(c, UCHAR_GRAPHEME_EXTEND), u_isalnum(c), u_getPropertyValueName(UCHAR_GENERAL_CATEGORY, u_charType(c), U_SHORT_PROPERTY_NAME), - u_getPropertyValueName(UCHAR_LINE_BREAK, + u_getPropertyValueName(UCHAR_WORD_BREAK, u_getIntPropertyValue(c, - UCHAR_LINE_BREAK), + UCHAR_WORD_BREAK), U_SHORT_PROPERTY_NAME), + u_getPropertyValueName(UCHAR_SENTENCE_BREAK, + u_getIntPropertyValue(c, + UCHAR_SENTENCE_BREAK), + U_SHORT_PROPERTY_NAME), + u_getPropertyValueName(UCHAR_LINE_BREAK, + u_getIntPropertyValue(c, + UCHAR_LINE_BREAK), + U_SHORT_PROPERTY_NAME), name); } } @@ -411,64 +420,7 @@ void RBBITest::TestMixedThaiLineBreak() // @suwit - end of changes - // Arabic numerals should always be separated from surrounding Thai text -/* - ADD_DATACHUNK(thaiLineSelection, "\\u0e04\\u0e48\\u0e32", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e07\\u0e34\\u0e19", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e1a\\u0e32\\u0e17", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e41\\u0e15\\u0e30", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e23\\u0e30\\u0e14\\u0e31\\u0e1a", 0, status); - thaiLineSelection->addElement("39"); - ADD_DATACHUNK(thaiLineSelection, "\\u0e1a\\u0e32\\u0e17 ", 0, status); - - // words in non-Thai scripts should always be separated from surrounding Thai text - ADD_DATACHUNK(thaiLineSelection, "\\u0e17\\u0e14", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e2a\\u0e2d\\u0e1a", 0, status); - thaiLineSelection->addElement("Java"); - ADD_DATACHUNK(thaiLineSelection, "\\u0e1a\\u0e19", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e04\\u0e23\\u0e37\\u0e48\\u0e2d\\u0e07", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e44\\u0e2d\\u0e1a\\u0e35\\u0e40\\u0e2d\\u0e47\\u0e21 ", 0, status); - - // Thai numerals should always be separated from the text surrounding them - ADD_DATACHUNK(thaiLineSelection, "\\u0e04\\u0e48\\u0e32", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e07\\u0e34\\u0e19", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e1a\\u0e32\\u0e17", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e41\\u0e15\\u0e30", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e23\\u0e30\\u0e14\\u0e31\\u0e1a", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e53\\u0e59", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e1a\\u0e32\\u0e17 ", 0, status); - - // Thai text should interact correctly with punctuation and symbols - ADD_DATACHUNK(thaiLineSelection, "\\u0e44\\u0e2d\\u0e1a\\u0e35\\u0e40\\u0e2d\\u0e47\\u0e21", 0, status); -// ADD_DATACHUNK(thaiLineSelection, "(\\u0e1b\\u0e23\\u0e30\\u0e40\\u0e17\\u0e28", 0, status); -// ADD_DATACHUNK(thaiLineSelection, "\\u0e44\\u0e17\\u0e22)", 0, status); -ADD_DATACHUNK(thaiLineSelection, "(\\u0e1b\\u0e23\\u0e30\\u0e40\\u0e17\\u0e28\\u0e44\\u0e17\\u0e22)", 0, status); -// I believe the commented-out reading above to be the correct one, but this is what passes with our current dictionary - ADD_DATACHUNK(thaiLineSelection, "\\u0e08\\u0e33\\u0e01\\u0e31\\u0e14", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e1b\\u0e34\\u0e14", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e15\\u0e31\\u0e27\"", 0, status); -*/ - - /* remove the old data sample. - // The Unicode Linebreak TR says do not break before or after quotes. - // So this test is changed ot not break around the quote. - // TODO: should Thai break around the around the quotes, like the original behavior here? -// ADD_DATACHUNK(thaiLineSelection, "\\u0e2e\\u0e32\\u0e23\\u0e4c\\u0e14\\u0e14\\u0e34\\u0e2a\\u0e01\\u0e4c\"", 0, status); -// ADD_DATACHUNK(thaiLineSelection, "\\u0e23\\u0e38\\u0e48\\u0e19", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e2e\\u0e32\\u0e23\\u0e4c\\u0e14\\u0e14\\u0e34\\u0e2a\\u0e01\\u0e4c\"" - "\\u0e23\\u0e38\\u0e48\\u0e19", 0, status); - - ADD_DATACHUNK(thaiLineSelection, "\\u0e43\\u0e2b\\u0e21\\u0e48", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e14\\u0e37\\u0e2d\\u0e19\\u0e21\\u0e34.", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e22.", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e19\\u0e35\\u0e49", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e23\\u0e32\\u0e04\\u0e32", 0, status); - ADD_DATACHUNK(thaiLineSelection, "$200", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e17\\u0e48\\u0e32", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e19\\u0e31\\u0e49\\u0e19 ", 0, status); - ADD_DATACHUNK(thaiLineSelection, "(\"\\u0e2e\\u0e32\\u0e23\\u0e4c\\u0e14\\u0e14\\u0e34\\u0e2a\\u0e01\\u0e4c\").", 0, status); -*/ RuleBasedBreakIterator* e = (RuleBasedBreakIterator *)BreakIterator::createLineInstance(Locale("th"), status); if (U_FAILURE(status)) { @@ -493,9 +445,11 @@ void RBBITest::TestMaiyamok() ADD_DATACHUNK(thaiLineSelection, "\\u0e44\\u0e1b\\u0e46", 0, status); ADD_DATACHUNK(thaiLineSelection, "\\u0e21\\u0e32\\u0e46", 0, status); ADD_DATACHUNK(thaiLineSelection, "\\u0e23\\u0e30\\u0e2b\\u0e27\\u0e48\\u0e32\\u0e07", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e01\\u0e23\\u0e38\\u0e07\\u0e40\\u0e17\\u0e1e", 0, status); + ADD_DATACHUNK(thaiLineSelection, "\\u0e01\\u0e23\\u0e38\\u0e07", 0, status); + ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e17\\u0e1e", 0, status); ADD_DATACHUNK(thaiLineSelection, "\\u0e41\\u0e25\\u0e30", 0, status); - ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e03\\u0e35\\u0e22\\u0e07", 0, status); + ADD_DATACHUNK(thaiLineSelection, "\\u0e40\\u0e03\\u0e35", 0, status); + ADD_DATACHUNK(thaiLineSelection, "\\u0e22\\u0e07", 0, status); ADD_DATACHUNK(thaiLineSelection, "\\u0e43\\u0e2b\\u0e21\\u0e48", 0, status); RuleBasedBreakIterator* e = (RuleBasedBreakIterator *)BreakIterator::createLineInstance( @@ -510,88 +464,6 @@ void RBBITest::TestMaiyamok() delete e; } -void RBBITest::TestThaiWordBreak() { - UErrorCode status = U_ZERO_ERROR; - BITestData thaiWordSelection(status); - - ADD_DATACHUNK(thaiWordSelection, NULL, 0, status); // Break at start of data - - - // @suwit -- Thai sample data from GVT Guideline - // start - ADD_DATACHUNK(thaiWordSelection, "\\u0E2B\\u0E19\\u0E36\\u0E48\\u0E07", 0, status); //5 - ADD_DATACHUNK(thaiWordSelection, "\\u0E04\\u0E33", 0, status); //7 - ADD_DATACHUNK(thaiWordSelection, "\\u0E44\\u0E17\\u0E22", 0, status); //10 - ADD_DATACHUNK(thaiWordSelection, "\\u0E2A\\u0E32\\u0E21\\u0E32\\u0E23\\u0E16", 0, status); //16 - ADD_DATACHUNK(thaiWordSelection, "\\u0E1B\\u0E23\\u0E30\\u0E01\\u0E2D\\u0E1A", 0, status); //22 - ADD_DATACHUNK(thaiWordSelection, "\\u0E14\\u0E49\\u0E27\\u0E22", 0, status); //26 - ADD_DATACHUNK(thaiWordSelection, "\\u0e2b\\u0e25\\u0e32\\u0e22", 0, status); //30 - ADD_DATACHUNK(thaiWordSelection, "\\u0e1e\\u0e22\\u0e32\\u0e07\\u0e04\\u0e4c", 0, status); //36 - - // @suwit - end of changes - - /* remove the old data sample because Thai translation of the Wizard of Oz is not good testcase for wordbreak API. - - ADD_DATACHUNK(thaiWordSelection, "\\u0E1A\\u0E17", 0, status); //2 - ADD_DATACHUNK(thaiWordSelection, "\\u0E17\\u0E35\\u0E48", 0, status); //5 - ADD_DATACHUNK(thaiWordSelection, "\\u0E51", 0, status); //6 - ADD_DATACHUNK(thaiWordSelection, "\\u0E1E\\u0E32\\u0E22\\u0E38", 0, status); //10 - ADD_DATACHUNK(thaiWordSelection, "\\u0E44\\u0E0B\\u0E42\\u0E04\\u0E25\\u0E19", 0, status); //16 - ADD_DATACHUNK(thaiWordSelection, "\\u000D\\u000A", 0, status); //18 - - // This is the correct result - //ADD_DATACHUNK(thaiWordSelection, "\\u0E42\\u0E14\\u0E42\\u0E23\\u0E18\\u0E35", 0, status); //24 - //ADD_DATACHUNK(thaiWordSelection, "\\u0E2D\\u0E32\\u0E28\\u0E31\\u0E22", 0, status); //29 - - // and this is what the dictionary does... - ADD_DATACHUNK(thaiWordSelection, "\\u0E42\\u0E14", 0, status); // 20 - ADD_DATACHUNK(thaiWordSelection, "\\u0E42\\u0E23\\u0E18\\u0E35\\u0E2D\\u0E32\\u0E28\\u0E31\\u0E22", 0, status); //29 - - ADD_DATACHUNK(thaiWordSelection, "\\u0E2D\\u0E22\\u0E39\\u0E48", 0, status); //33 - - // This is the correct result - //ADD_DATACHUNK(thaiWordSelection, "\\u0E17\\u0E48\\u0E32\\u0E21", 0, status); //37 - //ADD_DATACHUNK(thaiWordSelection, "\\u0E01\\u0E25\\u0E32\\u0E07", 0, status); //41 - - // and this is what the dictionary does - ADD_DATACHUNK(thaiWordSelection, "\\u0E17\\u0E48\\u0E32\\u0E21\\u0E01\\u0E25\\u0E32\\u0E07", 0, status); //41 - - ADD_DATACHUNK(thaiWordSelection, "\\u0E17\\u0E38\\u0E48\\u0E07", 0, status); //45 - ADD_DATACHUNK(thaiWordSelection, "\\u0E43\\u0E2B\\u0E0D\\u0E48", 0, status); //49 - ADD_DATACHUNK(thaiWordSelection, "\\u0E43\\u0E19", 0, status); //51 - - // This is the correct result - //ADD_DATACHUNK(thaiWordSelection, "\\u0E41\\u0E04\\u0E19\\u0E0B\\u0E31\\u0E2A", 0, status); //57 - //ADD_DATACHUNK(thaiWordSelection, "\\u0E01\\u0E31\\u0E1A", 0, status); //60 - - // and this is what the dictionary does - ADD_DATACHUNK(thaiWordSelection, "\\u0E41\\u0E04\\u0E19", 0, status); // 54 - ADD_DATACHUNK(thaiWordSelection, "\\u0E0B\\u0E31\\u0E2A\\u0E01\\u0E31\\u0E1A", 0, status); //60 - - ADD_DATACHUNK(thaiWordSelection, "\\u0E25\\u0E38\\u0E07", 0, status); //63 - - // This is the correct result - //ADD_DATACHUNK(thaiWordSelection, "\\u0E40\\u0E2E\\u0E19\\u0E23\\u0E35", 0, status); //68 - //ADD_DATACHUNK(thaiWordSelection, "\\u0E0A\\u0E32\\u0E27", 0, status); //71 - //ADD_DATACHUNK(thaiWordSelection, "\\u0E44\\u0E23\\u0E48", 0, status); //74 - //ADD_DATACHUNK(thaiWordSelection, "\\u0E41\\u0E25\\u0E30", 0, status); //77 - - // and this is what the dictionary does - ADD_DATACHUNK(thaiWordSelection, "\\u0E40\\u0E2E", 0, status); // 65 - ADD_DATACHUNK(thaiWordSelection, "\\u0E19\\u0E23\\u0E35\\u0E0A\\u0E32\\u0E27\\u0E44\\u0E23\\u0E48\\u0E41\\u0E25\\u0E30", 0, status); //77 - */ - - RuleBasedBreakIterator* e = (RuleBasedBreakIterator *)BreakIterator::createWordInstance( - Locale("th"), status); - if (U_FAILURE(status)) - { - errln("Failed to create the BreakIterator for Thai locale in TestThaiWordBreak.\n"); - return; - } - - generalIteratorTest(*e, thaiWordSelection); - delete e; -} void RBBITest::TestBug3818() { @@ -648,6 +520,222 @@ void RBBITest::TestJapaneseWordBreak() { delete e; } +void RBBITest::TestTrieDict() { + UErrorCode status = U_ZERO_ERROR; + + // + // Open and read the test data file. + // + const char *testDataDirectory = IntlTest::getSourceTestData(status); + char testFileName[1000]; + if (testDataDirectory == NULL || strlen(testDataDirectory) + strlen("riwords.txt") + 10 >= sizeof(testFileName)) { + errln("Can't open test data. Path too long."); + return; + } + strcpy(testFileName, testDataDirectory); + strcat(testFileName, "riwords.txt"); + + // Items needing deleting at the end + MutableTrieDictionary *mutableDict = NULL; + CompactTrieDictionary *compactDict = NULL; + UnicodeSet *breaks = NULL; + UChar *testFile = NULL; + StringEnumeration *enumer = NULL; + MutableTrieDictionary *mutable2 = NULL; + StringEnumeration *cloneEnum = NULL; + CompactTrieDictionary *compact2 = NULL; + + + const UnicodeString *originalWord = NULL; + const UnicodeString *cloneWord = NULL; + UChar *current; + UChar *word; + UChar uc; + int32_t wordLen; + int32_t wordCount; + int32_t testCount; + + int len; + testFile = ReadAndConvertFile(testFileName, len, status); + if (U_FAILURE(status)) { + goto cleanup; /* something went wrong, error already output */ + } + + mutableDict = new MutableTrieDictionary(0x0E1C, status); + if (U_FAILURE(status)) { + errln("Error creating MutableTrieDictionary: %s\n", u_errorName(status)); + goto cleanup; + } + + breaks = new UnicodeSet; + breaks->add(0x000A); // Line Feed + breaks->add(0x000D); // Carriage Return + breaks->add(0x2028); // Line Separator + breaks->add(0x2029); // Paragraph Separator + + // Now add each non-comment line of the file as a word. + current = testFile; + word = current; + uc = *current++; + wordLen = 0; + wordCount = 0; + + while (uc) { + if (uc == 0x0023) { // #comment line, skip + while (uc && !breaks->contains(uc)) { + uc = *current++; + } + } + else while (uc && !breaks->contains(uc)) { + ++wordLen; + uc = *current++; + } + if (wordLen > 0) { + mutableDict->addWord(word, wordLen, status); + if (U_FAILURE(status)) { + errln("Could not add word to mutable dictionary; status %s\n", u_errorName(status)); + goto cleanup; + } + wordCount += 1; + } + + // Find beginning of next line + while (uc && breaks->contains(uc)) { + uc = *current++; + } + word = current-1; + wordLen = 0; + } + + if (wordCount < 50) { + errln("Word count (%d) unreasonably small\n", wordCount); + goto cleanup; + } + + enumer = mutableDict->openWords(status); + if (U_FAILURE(status)) { + errln("Could not open mutable dictionary enumerator: %s\n", u_errorName(status)); + goto cleanup; + } + + testCount = 0; + if (wordCount != (testCount = enumer->count(status))) { + errln("MutableTrieDictionary word count (%d) differs from file word count (%d), with status %s\n", + testCount, wordCount, u_errorName(status)); + goto cleanup; + } + + delete enumer; + enumer = NULL; + + // Now compact it + compactDict = new CompactTrieDictionary(*mutableDict, status); + if (U_FAILURE(status)) { + errln("Failed to create CompactTrieDictionary: %s\n", u_errorName(status)); + goto cleanup; + } + + enumer = compactDict->openWords(status); + if (U_FAILURE(status)) { + errln("Could not open compact trie dictionary enumerator: %s\n", u_errorName(status)); + goto cleanup; + } + + if (wordCount != (testCount = enumer->count(status))) { + errln("CompactTrieDictionary word count (%d) differs from file word count (%d), with status %s\n", + testCount, wordCount, u_errorName(status)); + goto cleanup; + } + + delete enumer; + enumer = NULL; + + // Now un-compact it + mutable2 = compactDict->cloneMutable(status); + if (U_FAILURE(status)) { + errln("Could not clone CompactTrieDictionary to MutableTrieDictionary: %s\n", u_errorName(status)); + goto cleanup; + } + + cloneEnum = mutable2->openWords(status); + if (U_FAILURE(status)) { + errln("Could not create cloned mutable enumerator: %s\n", u_errorName(status)); + goto cleanup; + } + + if (wordCount != (testCount = cloneEnum->count(status))) { + errln("Cloned MutableTrieDictionary word count (%d) differs from file word count (%d), with status %s\n", + testCount, wordCount, u_errorName(status)); + goto cleanup; + } + + // Compact original dictionary to clone. Note that we can only compare the same kind of + // dictionary as the order of the enumerators is not guaranteed to be the same between + // different kinds + enumer = mutableDict->openWords(status); + if (U_FAILURE(status)) { + errln("Could not re-open mutable dictionary enumerator: %s\n", u_errorName(status)); + goto cleanup; + } + + originalWord = enumer->snext(status); + cloneWord = cloneEnum->snext(status); + while (U_SUCCESS(status) && originalWord != NULL && cloneWord != NULL) { + if (*originalWord != *cloneWord) { + errln("Original and cloned MutableTrieDictionary word mismatch\n"); + goto cleanup; + } + originalWord = enumer->snext(status); + cloneWord = cloneEnum->snext(status); + } + + if (U_FAILURE(status)) { + errln("Enumeration failed: %s\n", u_errorName(status)); + goto cleanup; + } + + if (originalWord != cloneWord) { + errln("Original and cloned MutableTrieDictionary ended enumeration at different points\n"); + goto cleanup; + } + + // Test the data copying constructor for CompactTrieDict, and the data access APIs. + compact2 = new CompactTrieDictionary(compactDict->data(), status); + if (U_FAILURE(status)) { + errln("CompactTrieDictionary(const void *,...) failed\n"); + goto cleanup; + } + + if (compact2->dataSize() == 0) { + errln("CompactTrieDictionary->dataSize() == 0\n"); + goto cleanup; + } + + // Now count the words via the second dictionary + delete enumer; + enumer = compact2->openWords(status); + if (U_FAILURE(status)) { + errln("Could not open compact trie dictionary 2 enumerator: %s\n", u_errorName(status)); + goto cleanup; + } + + if (wordCount != (testCount = enumer->count(status))) { + errln("CompactTrieDictionary 2 word count (%d) differs from file word count (%d), with status %s\n", + testCount, wordCount, u_errorName(status)); + goto cleanup; + } + +cleanup: + delete compactDict; + delete mutableDict; + delete breaks; + delete[] testFile; + delete enumer; + delete mutable2; + delete cloneEnum; + delete compact2; +} + //--------------------------------------------- // runIndexedTest //--------------------------------------------- @@ -679,23 +767,21 @@ void RBBITest::runIndexedTest( int32_t index, UBool exec, const char* &name, cha if(exec) TestEndBehaviour(); break; case 8: name = "TestMixedThaiLineBreak"; if(exec) TestMixedThaiLineBreak(); break; - case 9: name = "TestThaiWordBreak"; - if(exec) TestThaiWordBreak(); break; - case 10: name = "TestThaiLineBreak"; + case 9: name = "TestThaiLineBreak"; if(exec) TestThaiLineBreak(); break; - case 11: name = "TestMaiyamok"; + case 10: name = "TestMaiyamok"; if(exec) TestMaiyamok(); break; - case 12: name = "TestWordBreaks"; + case 11: name = "TestWordBreaks"; if(exec) TestWordBreaks(); break; - case 13: name = "TestWordBoundary"; + case 12: name = "TestWordBoundary"; if(exec) TestWordBoundary(); break; - case 14: name = "TestLineBreaks"; + case 13: name = "TestLineBreaks"; if(exec) TestLineBreaks(); break; - case 15: name = "TestSentBreaks"; - if(exec) TestSentBreaks(); break; - case 16: name = "TestExtended"; + case 14: name = "TestSentBreaks"; + if(exec) TestSentBreaks(); break; + case 15: name = "TestExtended"; if(exec) TestExtended(); break; - case 17: name = "TestMonkey"; + case 16: name = "TestMonkey"; if(exec) { #if !UCONFIG_NO_REGULAR_EXPRESSIONS TestMonkey(params); @@ -704,12 +790,14 @@ void RBBITest::runIndexedTest( int32_t index, UBool exec, const char* &name, cha #endif } break; - case 18: name = "TestBug3818"; + case 17: name = "TestBug3818"; if(exec) TestBug3818(); break; - case 19: name = "TestJapaneseWordBreak"; + case 18: name = "TestJapaneseWordBreak"; if(exec) TestJapaneseWordBreak(); break; - case 20: name = "TestDebug"; + case 19: name = "TestDebug"; if(exec) TestDebug(); break; + case 20: name = "TestTrieDict"; + if(exec) TestTrieDict(); break; default: name = ""; break; //needed to end loop } @@ -1055,15 +1143,19 @@ void RBBITest::TestBug4153072() { UnicodeString str("...Hello, World!..."); int32_t begin = 3; int32_t end = str.length() - 3; - UBool dummy; + UBool onBoundary; StringCharacterIterator* textIterator = new StringCharacterIterator(str, begin, end, begin); iter->adoptText(textIterator); int index; + // Note: with the switch to UText, there is no way to restrict the + // iteration range to begin at an index other than zero. + // String character iterators created with a non-zero bound are + // treated by RBBI as being empty. for (index = -1; index < begin + 1; ++index) { - dummy = iter->isBoundary(index); - if (index < begin && dummy == TRUE) { - errln((UnicodeString)"Didn't handle preceeding correctly with offset = " + index + + onBoundary = iter->isBoundary(index); + if (index == 0? !onBoundary : onBoundary) { + errln((UnicodeString)"Didn't handle isBoundary correctly with offset = " + index + " and begin index = " + begin); } } @@ -1161,6 +1253,10 @@ void RBBITest::executeTest(TestParams *t) { int32_t prevBP; int32_t i; + if (t->bi == NULL) { + return; + } + t->bi->setText(t->dataToBreak); // // Run the iterator forward @@ -1198,11 +1294,12 @@ void RBBITest::executeTest(TestParams *t) { if (expectedTagVal == -1) { expectedTagVal = 0; } + int32_t line = t->srcLine->elementAti(bp); int32_t rs = ((RuleBasedBreakIterator *)t->bi)->getRuleStatus(); if (rs != expectedTagVal) { errln("Incorrect status for forward break. Pos=%4d File line,col= %4d,%4d.\n" " Actual, Expected status = %4d, %4d", - bp, t->srcLine->elementAti(bp), t->srcCol->elementAti(bp), rs, expectedTagVal); + bp, line, t->srcCol->elementAti(bp), rs, expectedTagVal); } } @@ -1250,11 +1347,12 @@ void RBBITest::executeTest(TestParams *t) { if (expectedTagVal == -1) { expectedTagVal = 0; } + int line = t->srcLine->elementAti(bp); int32_t rs = ((RuleBasedBreakIterator *)t->bi)->getRuleStatus(); if (rs != expectedTagVal) { errln("Incorrect status for reverse break. Pos=%4d File line,col= %4d,%4d.\n" " Actual, Expected status = %4d, %4d", - bp, t->srcLine->elementAti(bp), t->srcCol->elementAti(bp), rs, expectedTagVal); + bp, line, t->srcCol->elementAti(bp), rs, expectedTagVal); } } @@ -1272,6 +1370,7 @@ void RBBITest::executeTest(TestParams *t) { void RBBITest::TestExtended() { +#if !UCONFIG_NO_REGULAR_EXPRESSIONS UErrorCode status = U_ZERO_ERROR; Locale locale(""); @@ -1282,6 +1381,9 @@ void RBBITest::TestExtended() { tp.srcLine = new UVector32(status); tp.srcCol = new UVector32(status); + RegexMatcher localeMatcher("<locale *([\\p{L}\\p{Nd}_]*) *>", 0, status); + TEST_ASSERT_SUCCESS(status); + // // Open and read the test data file. @@ -1335,6 +1437,7 @@ void RBBITest::TestExtended() { int32_t tagValue = 0; // The numeric value of a <nnn> tag. for (charIdx = 0; charIdx < len; ) { + status = U_ZERO_ERROR; UChar c = testString.charAt(charIdx); charIdx++; if (c == CH_CR && charIdx<len && testString.charAt(charIdx) == CH_LF) { @@ -1385,7 +1488,8 @@ void RBBITest::TestExtended() { } if (testString.compare(charIdx-1, 6, "<sent>") == 0) { delete tp.bi; - tp.bi = BreakIterator::createSentenceInstance(locale, status); + tp.bi = NULL; + tp.bi = BreakIterator::createSentenceInstance(locale, status); charIdx += 5; break; } @@ -1395,6 +1499,17 @@ void RBBITest::TestExtended() { charIdx += 6; break; } + // <locale loc_name> + localeMatcher.reset(testString); + if (localeMatcher.lookingAt(charIdx-1, status)) { + UnicodeString localeName = localeMatcher.group(1, status); + char localeName8[100]; + localeName.extract(0, localeName.length(), localeName8, sizeof(localeName8), 0); + locale = Locale::createFromName(localeName8); + charIdx += localeMatcher.group(0, status).length(); + TEST_ASSERT_SUCCESS(status); + break; + } if (testString.compare(charIdx-1, 6, "<data>") == 0) { parseState = PARSE_DATA; charIdx += 5; @@ -1432,7 +1547,7 @@ void RBBITest::TestExtended() { tp.srcCol ->addElement(column, status); parseState = PARSE_TAG; - charIdx += 7; + charIdx += 6; // RUN THE TEST! executeTest(&tp); @@ -1471,6 +1586,7 @@ void RBBITest::TestExtended() { } if (nameEndIdx > charIdx) { charIdx = nameEndIdx+1; + } break; } @@ -1605,6 +1721,7 @@ end_test: delete tp.srcLine; delete tp.srcCol; delete [] testFile; +#endif } @@ -1701,7 +1818,7 @@ UChar *RBBITest::ReadAndConvertFile(const char *fileName, int &ulen, UErrorCode cleanUpAndReturn: fclose(f); - delete fileBuf; + delete []fileBuf; ucnv_close(conv); if (U_FAILURE(status)) { errln("ucnv_toUChars: ICU Error \"%s\"\n", u_errorName(status)); @@ -2104,29 +2221,31 @@ private: RegexMatcher *fMatcher; const UnicodeString *fText; - - RegexMatcher *fGCFMatcher; - RegexMatcher *fGCMatcher; - }; -RBBIWordMonkey::RBBIWordMonkey() : fGCFMatcher(0), - fGCMatcher(0) +RBBIWordMonkey::RBBIWordMonkey() { UErrorCode status = U_ZERO_ERROR; - fSets = new UVector(status); - fALetterSet = new UnicodeSet("[\\p{Word_Break = ALetter}]", status); - fKatakanaSet = new UnicodeSet("[\\p{Word_Break = Katakana}]", status); - fMidLetterSet = new UnicodeSet("[\\p{Word_Break = MidLetter}]", status); + fSets = new UVector(status); + + fALetterSet = new UnicodeSet("[\\p{Word_Break = ALetter}" + "[\\p{Line_Break = Complex_Context}" + "-\\p{Grapheme_Cluster_Break = Extend}" + "-\\p{Grapheme_Cluster_Break = Control}]]", status); + //fALetterSet = new UnicodeSet("[\\p{Word_Break = ALetter}]", status); + fKatakanaSet = new UnicodeSet("[\\p{Word_Break = Katakana}-[\\uff9e\\uff9f]]", status); + fMidLetterSet = new UnicodeSet("[\\p{Word_Break = MidLetter}]", status); fMidNumSet = new UnicodeSet("[\\p{Word_Break = MidNum}]", status); fNumericSet = new UnicodeSet("[\\p{Word_Break = Numeric}]", status); fFormatSet = new UnicodeSet("[\\p{Word_Break = Format}]", status); - fExtendSet = new UnicodeSet("[\\p{Grapheme_Cluster_Break = Extend}]", status); - fExtendNumLetSet = new UnicodeSet("[\\p{General_Category = Connector_Punctuation}]", status); - fOtherSet = new UnicodeSet(); + fExtendNumLetSet = new UnicodeSet("[\\p{Word_Break = ExtendNumLet}]", status); + //fExtendSet = new UnicodeSet("[\\p{Word_Break = Extend}]", status); + fExtendSet = new UnicodeSet("[\\p{Grapheme_Cluster_Break = Extend}\\uff9e\\uff9f]", status); + + fOtherSet = new UnicodeSet(); if(U_FAILURE(status)) { deferredStatus = status; return; @@ -2153,9 +2272,6 @@ RBBIWordMonkey::RBBIWordMonkey() : fGCFMatcher(0), fSets->addElement(fExtendNumLetSet, status); - fGCFMatcher = new RegexMatcher("\\X(?:[\\p{Format}-\\p{Grapheme_Extend}])*", 0, status); - fGCMatcher = new RegexMatcher("\\X", 0, status); - if (U_FAILURE(status)) { deferredStatus = status; } @@ -2163,14 +2279,10 @@ RBBIWordMonkey::RBBIWordMonkey() : fGCFMatcher(0), void RBBIWordMonkey::setText(const UnicodeString &s) { fText = &s; - fGCMatcher->reset(*fText); - fGCFMatcher->reset(*fText); } int32_t RBBIWordMonkey::next(int32_t prevPos) { - UErrorCode status = U_ZERO_ERROR; - int p0, p1, p2, p3; // Indices of the significant code points around the // break position being tested. The candidate break // location is before p2. @@ -2187,31 +2299,20 @@ int32_t RBBIWordMonkey::next(int32_t prevPos) { c3 = fText->char32At(prevPos); c0 = c1 = c2 = 0; - - // Format char after prev break? Special case, see last Note for Word Boundaries TR. - // break immdiately after the format char. - if (fFormatSet->contains(c3)) { - breakPos = fText->moveIndex32(prevPos, 1); - return breakPos; - } - - // Loop runs once per "significant" character position in the input text. for (;;) { // Move all of the positions forward in the input string. p0 = p1; c0 = c1; p1 = p2; c1 = c2; p2 = p3; c2 = c3; - // Advancd p3 by (GC Format*) Rules 3, 4 - status = U_ZERO_ERROR; - if (fGCFMatcher->find(p3, status) == FALSE) { - p3 = fText->length(); - c3 = 0; - } else { - p3 = fGCFMatcher->end(0, status); - U_ASSERT(U_SUCCESS(status)); + + // Advancd p3 by X(Extend | Format)* Rule 4 + do { + p3 = fText->moveIndex32(p3, 1); c3 = fText->char32At(p3); } + while (fFormatSet->contains(c3) || fExtendSet->contains(c3)); + if (p1 == p2) { // Still warming up the loop. (won't work with zero length strings, but we don't care) @@ -2221,6 +2322,14 @@ int32_t RBBIWordMonkey::next(int32_t prevPos) { // Reached end of string. Always a break position. break; } + + // Rule (3) CR x LF + // No Extend or Format characters may appear between the CR and LF, + // which requires the additional check for p2 immediately following p1. + // + if (c1==0x0D && c2==0x0A && p1==(p2-1)) { + continue; + } // Rule (5). ALetter x ALetter if (fALetterSet->contains(c1) && @@ -2298,20 +2407,11 @@ int32_t RBBIWordMonkey::next(int32_t prevPos) { continue; } - // Rule 14. Break found here. break; } - - // Rule 4 fixup, back up before any trailing - // format characters at the end of the word. breakPos = p2; - status = U_ZERO_ERROR; - if (fGCMatcher->find(p1, status)) { - breakPos = fGCMatcher->end(0, status); - U_ASSERT(U_SUCCESS(status)); - } return breakPos; } @@ -2332,11 +2432,317 @@ RBBIWordMonkey::~RBBIWordMonkey() { delete fExtendSet; delete fExtendNumLetSet; delete fOtherSet; +} + + + + +//------------------------------------------------------------------------------------------ +// +// class RBBISentMonkey Sentence Break specific implementation +// of RBBIMonkeyKind. +// +//------------------------------------------------------------------------------------------ +class RBBISentMonkey: public RBBIMonkeyKind { +public: + RBBISentMonkey(); + virtual ~RBBISentMonkey(); + virtual UVector *charClasses(); + virtual void setText(const UnicodeString &s); + virtual int32_t next(int32_t i); +private: + int moveBack(int posFrom); + int moveForward(int posFrom); + UChar32 cAt(int pos); + + UVector *fSets; + + UnicodeSet *fSepSet; + UnicodeSet *fFormatSet; + UnicodeSet *fSpSet; + UnicodeSet *fLowerSet; + UnicodeSet *fUpperSet; + UnicodeSet *fOLetterSet; + UnicodeSet *fNumericSet; + UnicodeSet *fATermSet; + UnicodeSet *fSTermSet; + UnicodeSet *fCloseSet; + UnicodeSet *fOtherSet; + UnicodeSet *fExtendSet; + + const UnicodeString *fText; + +}; + +RBBISentMonkey::RBBISentMonkey() +{ + UErrorCode status = U_ZERO_ERROR; + + fSets = new UVector(status); + + fSepSet = new UnicodeSet("[\\p{Sentence_Break = Sep}]", status); + fFormatSet = new UnicodeSet("[\\p{Sentence_Break = Format}]", status); + fSpSet = new UnicodeSet("[\\p{Sentence_Break = Sp}]", status); + fLowerSet = new UnicodeSet("[\\p{Sentence_Break = Lower}]", status); + fUpperSet = new UnicodeSet("[\\p{Sentence_Break = Upper}]", status); + fOLetterSet = new UnicodeSet("[\\p{Sentence_Break = OLetter}-[\\uff9e\\uff9f]]", status); + fNumericSet = new UnicodeSet("[\\p{Sentence_Break = Numeric}]", status); + fATermSet = new UnicodeSet("[\\p{Sentence_Break = ATerm}]", status); + fSTermSet = new UnicodeSet("[\\p{Sentence_Break = STerm}]", status); + fCloseSet = new UnicodeSet("[\\p{Sentence_Break = Close}]", status); + fExtendSet = new UnicodeSet("[\\p{Grapheme_Extend}\\uff9e\\uff9f]", status); + fOtherSet = new UnicodeSet(); + + if(U_FAILURE(status)) { + deferredStatus = status; + return; + } + + fOtherSet->complement(); + fOtherSet->removeAll(*fSepSet); + fOtherSet->removeAll(*fFormatSet); + fOtherSet->removeAll(*fSpSet); + fOtherSet->removeAll(*fLowerSet); + fOtherSet->removeAll(*fUpperSet); + fOtherSet->removeAll(*fOLetterSet); + fOtherSet->removeAll(*fNumericSet); + fOtherSet->removeAll(*fATermSet); + fOtherSet->removeAll(*fSTermSet); + fOtherSet->removeAll(*fCloseSet); + fOtherSet->removeAll(*fExtendSet); + + fSets->addElement(fSepSet, status); + fSets->addElement(fFormatSet, status); + + fSets->addElement(fSpSet, status); + fSets->addElement(fLowerSet, status); + fSets->addElement(fUpperSet, status); + fSets->addElement(fOLetterSet, status); + fSets->addElement(fNumericSet, status); + fSets->addElement(fATermSet, status); + fSets->addElement(fSTermSet, status); + fSets->addElement(fCloseSet, status); + fSets->addElement(fOtherSet, status); + fSets->addElement(fExtendSet, status); + + if (U_FAILURE(status)) { + deferredStatus = status; + } +} + + + +void RBBISentMonkey::setText(const UnicodeString &s) { + fText = &s; +} + +UVector *RBBISentMonkey::charClasses() { + return fSets; +} + + +// moveBack() Find the "significant" code point preceding the index i. +// Skips over ($Extend | $Format)* . +// +int RBBISentMonkey::moveBack(int i) { + if (i <= 0) { + return -1; + } + UChar32 c; + int32_t j = i; + do { + j = fText->moveIndex32(j, -1); + c = fText->char32At(j); + } + while (j>0 &&(fFormatSet->contains(c) || fExtendSet->contains(c))); + return j; + + } + + +int RBBISentMonkey::moveForward(int i) { + if (i>=fText->length()) { + return fText->length(); + } + UChar32 c; + int32_t j = i; + do { + j = fText->moveIndex32(j, 1); + c = cAt(j); + } + while (fFormatSet->contains(c) || fExtendSet->contains(c)); + return j; +} + +UChar32 RBBISentMonkey::cAt(int pos) { + if (pos<0 || pos>=fText->length()) { + return -1; + } else { + return fText->char32At(pos); + } +} + +int32_t RBBISentMonkey::next(int32_t prevPos) { + int p0, p1, p2, p3; // Indices of the significant code points around the + // break position being tested. The candidate break + // location is before p2. + + int breakPos = -1; + + UChar32 c0, c1, c2, c3; // The code points at p0, p1, p2 & p3. + UChar32 c; + + // Prev break at end of string. return DONE. + if (prevPos >= fText->length()) { + return -1; + } + p0 = p1 = p2 = p3 = prevPos; + c3 = fText->char32At(prevPos); + c0 = c1 = c2 = 0; + + // Loop runs once per "significant" character position in the input text. + for (;;) { + // Move all of the positions forward in the input string. + p0 = p1; c0 = c1; + p1 = p2; c1 = c2; + p2 = p3; c2 = c3; + + // Advancd p3 by X(Extend | Format)* Rule 4 + p3 = moveForward(p3); + c3 = cAt(p3); + + // Rule (3) CR x LF + if (c1==0x0d && c2==0x0a && p2==(p1+1)) { + continue; + } + + // Rule (4). Sep <break> + if (fSepSet->contains(c1)) { + p2 = p1+1; // Separators don't combine with Extend or Format. + break; + } + + if (p2 >= fText->length()) { + // Reached end of string. Always a break position. + break; + } + + if (p2 == prevPos) { + // Still warming up the loop. (won't work with zero length strings, but we don't care) + continue; + } + + // Rule (6). ATerm x Numeric + if (fATermSet->contains(c1) && fNumericSet->contains(c2)) { + continue; + } + + // Rule (7). Upper ATerm x Uppper + if (fUpperSet->contains(c0) && fATermSet->contains(c1) && fUpperSet->contains(c2)) { + continue; + } + + // Rule (8) ATerm Close* Sp* x (not (OLettter | Upper | Lower | Sep | STerm | ATerm))* Lower + // Note: STerm | ATerm are added to the negated part of the expression by a + // note to the Unicode 5.0 documents. + int p8 = p1; + while (fSpSet->contains(cAt(p8))) { + p8 = moveBack(p8); + } + while (fCloseSet->contains(cAt(p8))) { + p8 = moveBack(p8); + } + if (fATermSet->contains(cAt(p8))) { + p8=p2; + for (;;) { + c = cAt(p8); + if (c==-1 || fOLetterSet->contains(c) || fUpperSet->contains(c) || + fLowerSet->contains(c) || fSepSet->contains(c) || + fATermSet->contains(c) || fSTermSet->contains(c)) { + break; + } + p8 = moveForward(p8); + } + if (fLowerSet->contains(cAt(p8))) { + continue; + } + } + + // Rule 8a (STerm | ATerm) Close* Sp* x (STerm | ATerm); + if (fSTermSet->contains(c2) || fATermSet->contains(c2)) { + p8 = p1; + while (fSpSet->contains(cAt(p8))) { + p8 = moveBack(p8); + } + while (fCloseSet->contains(cAt(p8))) { + p8 = moveBack(p8); + } + c = cAt(p8); + if (fSTermSet->contains(c) || fATermSet->contains(c)) { + continue; + } + } + + // Rule (9) (STerm | ATerm) Close* x (Close | Sp | Sep) + int p9 = p1; + while (fCloseSet->contains(cAt(p9))) { + p9 = moveBack(p9); + } + c = cAt(p9); + if ((fSTermSet->contains(c) || fATermSet->contains(c))) { + if (fCloseSet->contains(c2) || fSpSet->contains(c2) || fSepSet->contains(c2)) { + continue; + } + } + + // Rule (10) (Sterm | ATerm) Close* Sp* x (Sp | Sep) + int p10 = p1; + while (fSpSet->contains(cAt(p10))) { + p10 = moveBack(p10); + } + while (fCloseSet->contains(cAt(p10))) { + p10 = moveBack(p10); + } + if (fSTermSet->contains(cAt(p10)) || fATermSet->contains(cAt(p10))) { + if (fSpSet->contains(c2) || fSepSet->contains(c2)) { + continue; + } + } + + // Rule (11) (STerm | ATerm) Close* Sp* <break> + int p11 = p1; + while (fSpSet->contains(cAt(p11))) { + p11 = moveBack(p11); + } + while (fCloseSet->contains(cAt(p11))) { + p11 = moveBack(p11); + } + if (fSTermSet->contains(cAt(p11)) || fATermSet->contains(cAt(p11))) { + break; + } - delete fGCFMatcher; - delete fGCMatcher; + // Rule (12) Any x Any + continue; + } + breakPos = p2; + return breakPos; } +RBBISentMonkey::~RBBISentMonkey() { + delete fSets; + delete fSepSet; + delete fFormatSet; + delete fSpSet; + delete fLowerSet; + delete fUpperSet; + delete fOLetterSet; + delete fNumericSet; + delete fATermSet; + delete fSTermSet; + delete fCloseSet; + delete fOtherSet; + delete fExtendSet; +} @@ -2353,7 +2759,7 @@ public: virtual UVector *charClasses(); virtual void setText(const UnicodeString &s); virtual int32_t next(int32_t i); - virtual void rule7Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos, UChar32 *nextChar); + virtual void rule9Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos, UChar32 *nextChar); private: UVector *fSets; @@ -2444,6 +2850,7 @@ RBBILineMonkey::RBBILineMonkey() fAL = new UnicodeSet("[\\p{Line_break=AL}]", status); fID = new UnicodeSet("[\\p{Line_break=ID}]", status); fSA = new UnicodeSet("[\\p{Line_break=SA}]", status); + fSG = new UnicodeSet("[\\ud800-\\udfff]", status); fXX = new UnicodeSet("[\\p{Line_break=XX}]", status); if (U_FAILURE(status)) { @@ -2456,6 +2863,7 @@ RBBILineMonkey::RBBILineMonkey() fAL->addAll(*fXX); // Default behavior for XX is identical to AL fAL->addAll(*fAI); // Default behavior for AI is identical to AL fAL->addAll(*fSA); // Default behavior for SA is XX, which defaults to AL + fAL->addAll(*fSG); // Default behavior for SG is identical to AL. fSets->addElement(fBK, status); fSets->addElement(fCR, status); @@ -2492,14 +2900,15 @@ RBBILineMonkey::RBBILineMonkey() fSets->addElement(fID, status); fSets->addElement(fWJ, status); fSets->addElement(fSA, status); + fSets->addElement(fSG, status); fNumberMatcher = new RegexMatcher( - "(\\p{Line_Break=PR}\\p{Line_Break=CM}*)?" + "((\\p{Line_Break=PR}|\\p{Line_Break=PO})\\p{Line_Break=CM}*)?" "((\\p{Line_Break=OP}|\\p{Line_Break=HY})\\p{Line_Break=CM}*)?" "\\p{Line_Break=NU}\\p{Line_Break=CM}*" "((\\p{Line_Break=NU}|\\p{Line_Break=IS}|\\p{Line_Break=SY})\\p{Line_Break=CM}*)*" "(\\p{Line_Break=CL}\\p{Line_Break=CM}*)?" - "(\\p{Line_Break=PO}\\p{Line_Break=CM}*)?", + "((\\p{Line_Break=PR}|\\p{Line_Break=PO})\\p{Line_Break=CM}*)?", 0, status); fCharBI = BreakIterator::createCharacterInstance(Locale::getEnglish(), status); @@ -2517,8 +2926,8 @@ void RBBILineMonkey::setText(const UnicodeString &s) { } // -// rule7Adjust -// Line Break TR rules 6 and 7 implementation. +// rule9Adjust +// Line Break TR rules 9 and 10 implementation. // This deals with combining marks and other sequences that // that must be treated as if they were something other than what they actually are. // @@ -2526,7 +2935,7 @@ void RBBILineMonkey::setText(const UnicodeString &s) { // each potential break, once to the chars before the position being checked, then // again to the text following the possible break. // -void RBBILineMonkey::rule7Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos, UChar32 *nextChar) { +void RBBILineMonkey::rule9Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos, UChar32 *nextChar) { if (pos == -1) { // Invalid initial position. Happens during the warmup iteration of the // main loop in next(). @@ -2535,9 +2944,9 @@ void RBBILineMonkey::rule7Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos int32_t nPos = *nextPos; - // LB 7b Keep combining sequences together. + // LB 9 Keep combining sequences together. // advance over any CM class chars. Note that Line Break CM is different - // from normal Mc general category. + // from the normal Grapheme Extend property. if (!(fSP->contains(*posChar) || fBK->contains(*posChar) || *posChar==0x0d || *posChar==0x0a ||fNL->contains(*posChar) || fZW->contains(*posChar))) { for (;;) { @@ -2550,10 +2959,10 @@ void RBBILineMonkey::rule7Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos } - // LB 7b Treat X CM* as if it were x. + // LB 9 Treat X CM* as if it were x. // No explicit action required. - // LB 7c Treat any remaining combining mark as AL + // LB 10 Treat any remaining combining mark as AL if (fCM->contains(*posChar)) { *posChar = 0x41; // thisChar = 'A'; } @@ -2614,14 +3023,14 @@ int32_t RBBILineMonkey::next(int32_t startPos) { break; } - // Rule LB 7 - adjust for combining sequences. + // Rule LB 9 - adjust for combining sequences. // We do this one out-of-order because the adjustment does not change anything // that would match rules LB 3 - LB 6, but after the adjustment, LB 3-6 do need to // be applied. - rule7Adjust(prevPos, &prevChar, &pos, &thisChar); + rule9Adjust(prevPos, &prevChar, &pos, &thisChar); nextCPPos = nextPos = fText->moveIndex32(pos, 1); c = fText->char32At(nextPos); - rule7Adjust(pos, &thisChar, &nextPos, &c); + rule9Adjust(pos, &thisChar, &nextPos, &c); // If the loop is still warming up - if we haven't shifted the initial // -1 positions out of prevPos yet - loop back to advance the @@ -2629,13 +3038,13 @@ int32_t RBBILineMonkey::next(int32_t startPos) { if (prevPos == -1) { continue; } - - // LB 3a Always break after hard line breaks, + + // LB 4 Always break after hard line breaks, if (fBK->contains(prevChar)) { break; } - // LB 3b Break after CR, LF, NL, but not inside CR LF + // LB 5 Break after CR, LF, NL, but not inside CR LF if (prevChar == 0x0d && thisChar == 0x0a) { continue; } @@ -2645,14 +3054,14 @@ int32_t RBBILineMonkey::next(int32_t startPos) { break; } - // LB 3c Don't break before hard line breaks + // LB 6 Don't break before hard line breaks if (thisChar == 0x0d || thisChar == 0x0a || thisChar == 0x85 || fBK->contains(thisChar)) { continue; } - // LB 4 Don't break before spaces or zero-width space. + // LB 7 Don't break before spaces or zero-width space. if (fSP->contains(thisChar)) { continue; } @@ -2661,18 +3070,36 @@ int32_t RBBILineMonkey::next(int32_t startPos) { continue; } - // LB 5 Break after zero width space + // LB 8 Break after zero width space if (fZW->contains(prevChar)) { break; } - // LB 7 Already done, at top of loop. + // LB 9, 10 Already done, at top of loop. // - // LB 8 Don't break before closings. - // NU x CL and NU x IS are not matched here so that they will - // fall into LB 17 and the more general number regular expression. + // LB 11 Do not break before or after WORD JOINER and related characters. + // x WJ + // WJ x + // + if (fWJ->contains(thisChar) || fWJ->contains(prevChar)) { + continue; + } + + // LB 12 + // (!SP) x GL + // GL x + if ((!fSP->contains(prevChar)) && fGL->contains(thisChar) || + fGL->contains(prevChar)) { + continue; + } + + + + // LB 13 Don't break before closings. + // NU x CL and NU x IS are not matched here so that they will + // fall into LB 17 and the more general number regular expression. // if (!fNU->contains(prevChar) && fCL->contains(thisChar) || fEX->contains(thisChar) || @@ -2681,9 +3108,9 @@ int32_t RBBILineMonkey::next(int32_t startPos) { continue; } - // LB 9 Don't break after OP SP* + // LB 14 Don't break after OP SP* // Scan backwards, checking for this sequence. - // The OP char could include combining marks, so we acually check for + // The OP char could include combining marks, so we actually check for // OP CM* SP* // Another Twist: The Rule 67 fixes may have changed a SP CM // sequence into a ID char, so before scanning back through spaces, @@ -2703,7 +3130,7 @@ int32_t RBBILineMonkey::next(int32_t startPos) { } - // LB 10 QU SP* x OP + // LB 15 QU SP* x OP if (fOP->contains(thisChar)) { // Scan backwards from prevChar to see if it is preceded by QU CM* SP* int tPos = prevPos; @@ -2720,7 +3147,7 @@ int32_t RBBILineMonkey::next(int32_t startPos) { - // LB 11 CL SP* x NS + // LB 16 CL SP* x NS // Scan backwards for SP* CM* CL if (fNS->contains(thisChar)) { int tPos = prevPos; @@ -2736,7 +3163,7 @@ int32_t RBBILineMonkey::next(int32_t startPos) { } - // LB 11a B2 SP* x B2 + // LB 17 B2 SP* x B2 if (fB2->contains(thisChar)) { // Scan backwards, checking for the B2 CM* SP* sequence. tPos = prevPos; @@ -2753,39 +3180,25 @@ int32_t RBBILineMonkey::next(int32_t startPos) { } } - - // LB 11b - // x WJ - // WJ x - if (fWJ->contains(thisChar) || fWJ->contains(prevChar)) { - continue; - } - - // LB 12 break after space + + // LB 18 break after space if (fSP->contains(prevChar)) { break; } - // LB 13 - // x GL - // GL x - if (fGL->contains(thisChar) || fGL->contains(prevChar)) { - continue; - } - - // LB 14 + // LB 19 // x QU // QU x if (fQU->contains(thisChar) || fQU->contains(prevChar)) { continue; } - // LB 14a Break around a CB + // LB 20 Break around a CB if (fCB->contains(thisChar) || fCB->contains(prevChar)) { break; } - // LB 15 + // LB 21 if (fBA->contains(thisChar) || fHY->contains(thisChar) || fNS->contains(thisChar) || @@ -2793,7 +3206,7 @@ int32_t RBBILineMonkey::next(int32_t startPos) { continue; } - // LB 16 + // LB 22 if (fAL->contains(prevChar) && fIN->contains(thisChar) || fID->contains(prevChar) && fIN->contains(thisChar) || fIN->contains(prevChar) && fIN->contains(thisChar) || @@ -2802,7 +3215,7 @@ int32_t RBBILineMonkey::next(int32_t startPos) { } - // LB 17 ID x PO + // LB 23 ID x PO // AL x NU // NU x AL if (fID->contains(prevChar) && fPO->contains(thisChar) || @@ -2811,7 +3224,19 @@ int32_t RBBILineMonkey::next(int32_t startPos) { continue; } - // LB 18 Numbers + // LB 24 Do not break between prefix and letters or ideographs. + // PR x ID + // PR x AL + // PO x AL + if (fPR->contains(prevChar) && fID->contains(thisChar) || + fPR->contains(prevChar) && fAL->contains(thisChar) || + fPO->contains(prevChar) && fAL->contains(thisChar) ) { + continue; + } + + + + // LB 25 Numbers if (fNumberMatcher->lookingAt(prevPos, status)) { if (U_FAILURE(status)) { break; @@ -2825,26 +3250,18 @@ int32_t RBBILineMonkey::next(int32_t startPos) { // Number match includes additional chars. Update pos and nextPos // so that next loop iteration will continue at the end of the number, // checking for breaks between last char in number & whatever follows. - nextPos = numEndIdx; - pos = fCharBI->preceding(numEndIdx); - thisChar = fText->char32At(pos); - while (fCM->contains(thisChar)) { - pos = fCharBI->preceding(pos); // TODO: just get previous codepoint. Don't use BI. + pos = nextPos = numEndIdx; + do { + pos = fText->moveIndex32(pos, -1); thisChar = fText->char32At(pos); - } + } while (fCM->contains(thisChar)); } continue; } } - if (fPR->contains(prevChar) && fAL->contains(thisChar)) { - continue; - } - if (fPR->contains(prevChar) && fID->contains(thisChar)) { - continue; - } - // LB 18b + // LB 26 Do not break a Korean syllable. if (fJL->contains(prevChar) && (fJL->contains(thisChar) || fJV->contains(thisChar) || fH2->contains(thisChar) || @@ -2862,7 +3279,7 @@ int32_t RBBILineMonkey::next(int32_t startPos) { continue; } - // LB 18c more Korean + // LB 27 Treat a Korean Syllable Block the same as ID. if ((fJL->contains(prevChar) || fJV->contains(prevChar) || fJT->contains(prevChar) || fH2->contains(prevChar) || fH3->contains(prevChar)) && fIN->contains(thisChar)) { @@ -2880,17 +3297,30 @@ int32_t RBBILineMonkey::next(int32_t startPos) { - // LB 19 + // LB 28 Do not break between alphabetics (“atâ€). if (fAL->contains(prevChar) && fAL->contains(thisChar)) { continue; } - // LB 19b + // LB 29 Do not break between numeric punctuation and alphabetics ("e.g."). if (fIS->contains(prevChar) && fAL->contains(thisChar)) { continue; } - // LB 20 Break everywhere else + //LB 30 Do not break between letters, numbers or ordinary symbols and opening or closing punctuation + // (AL | NU) x OP + // CL x (AL | NU) + if ((fAL->contains(prevChar) || fNU->contains(prevChar)) && + fOP->contains(thisChar)) { + continue; + } + if (fCL->contains(prevChar) && + (fAL->contains(thisChar) || fNU->contains(thisChar))) { + continue; + } + + + // LB 31 Break everywhere else break; } @@ -2941,6 +3371,7 @@ RBBILineMonkey::~RBBILineMonkey() { delete fAL; delete fID; delete fSA; + delete fSG; delete fXX; delete fCharBI; @@ -3007,7 +3438,7 @@ static void testBreakBoundPreceding(RBBITest *test, UnicodeString ustr, } if (count != expectedcount) { printStringBreaks(ustr, expected, expectedcount); - test->errln("break test failed: missed %d match", + test->errln("break forward test failed: missed %d match", expectedcount - count); return; } @@ -3016,13 +3447,13 @@ static void testBreakBoundPreceding(RBBITest *test, UnicodeString ustr, int j = expected[i - 1]; if (!bi->isBoundary(j)) { printStringBreaks(ustr, expected, expectedcount); - test->errln("Expected boundary at position %d", j); + test->errln("isBoundary() failed. Expected boundary at position %d", j); return; } for (j = expected[i - 1] + 1; j < expected[i]; j ++) { if (bi->isBoundary(j)) { printStringBreaks(ustr, expected, expectedcount); - test->errln("Not expecting boundary at position %d", j); + test->errln("isBoundary() failed. Not expecting boundary at position %d", j); return; } } @@ -3031,24 +3462,25 @@ static void testBreakBoundPreceding(RBBITest *test, UnicodeString ustr, for (i = bi->last(); i != BreakIterator::DONE; i = bi->previous()) { count --; if (forward[count] != i) { - test->errln("happy break test reverse failed: expected %d but got %d", + test->errln("happy break test previous() failed: expected %d but got %d", forward[count], i); break; } } if (count != 0) { printStringBreaks(ustr, expected, expectedcount); - test->errln("happy break test failed: missed a match"); + test->errln("break test previous() failed: missed a match"); return; } // testing preceding for (i = 0; i < expectedcount - 1; i ++) { - int j = expected[i] + 1; + // int j = expected[i] + 1; + int j = ustr.moveIndex32(expected[i], 1); for (; j <= expected[i + 1]; j ++) { if (bi->preceding(j) != expected[i]) { printStringBreaks(ustr, expected, expectedcount); - test->errln("Not expecting backwards boundary at position %d", j); + test->errln("preceding(): Not expecting boundary at position %d", j); return; } } @@ -3224,6 +3656,11 @@ void RBBITest::TestLineBreaks(void) UChar str[STRSIZE]; static const char *strlist[] = { + "\\u300f\\ufdfc\\ub798\\u2011\\u2011\\u0020\\u0b43\\u002d\\ubeec\\ufffc", + "\\u24ba\\u2060\\u3405\\ub290\\u000d\\U000e0032\\ufe35\\u00a0\\u0361\\" + "U000112ed\\u0f0c\\u000a\\u308e\\ua875\\u0085\\u114d", + "\\ufffc\\u3063\\u2e08\\u30e3\\u000d\\u002d\\u0ed8\\u002f\\U00011a57\\" + "u2014\\U000e0105\\u118c\\u000a\\u07f8", "\\u0668\\u192b\\u002f\\u2034\\ufe39\\u00b4\\u0cc8\\u2571\\u200b\\u003f", "\\ufeff\\ufffc\\u3289\\u0085\\u2772\\u0020\\U000e010a\\u0020\\u2025\\u000a\\U000e0123", "\\ufe3c\\u201c\\u000d\\u2025\\u2007\\u201c\\u002d\\u20a0\\u002d\\u30a7\\u17a4", @@ -3261,6 +3698,11 @@ void RBBITest::TestLineBreaks(void) "\\u09cc\\u256a\\u276d\\u002d\\u3085\\u000d\\u0e05\\u2028\\u0fbb", "\\u2034\\u00bb\\u0ae6\\u300c\\u0020\\u31f8\\ufffc", "\\u2116\\u0ed2\\uff64\\u02cd\\u2001\\u2060", + "\\u809d\\u2e02\\u0f0a\\uc48f\\u2540\\u000d\\u0cef\\u003a\\u0e4d" + "\\U000e0172\\U000e005c\\u17cf\\U00010ca6\\ufeff\\uf621\\u06f3\\uffe5" + "\\u0ea2\\ufeff\\udcea\\u3085\\ua874\\u000a\\u0020\\u000b\\u200b", + "\\ufe10\\u2060\\u1a5a\\u2060\\u17e4\\ufffc\\ubbe1\\ufe15\\u0020\\u00a0", + "\\u2060\\u2213\\u200b\\u2019\\uc2dc\\uff6a\\u1736\\u0085\\udb07", }; int loop; TEST_ASSERT_SUCCESS(status); @@ -3304,10 +3746,11 @@ void RBBITest::TestLineBreaks(void) void RBBITest::TestSentBreaks(void) { +#if !UCONFIG_NO_REGULAR_EXPRESSIONS Locale locale("en"); UErrorCode status = U_ZERO_ERROR; BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status); - UChar str[100]; + UChar str[200]; static const char *strlist[] = { "Now\ris\nthe\r\ntime\n\rfor\r\r", @@ -3320,26 +3763,49 @@ void RBBITest::TestSentBreaks(void) "Nel mezzo del cammin di nostra vita, mi ritrovai in una selva oscura. ", "Che la dritta via aveo smarrita. He said, that I said, that you said!! ", "Don't rock the boat.\\u2029Because I am the daddy, that is why. Not on my time (el timo.)!", + "\\U0001040a\\u203a\\u1217\\u2b23\\u000d\\uff3b\\u03dd\\uff57\\u0a69\\u104a\\ufe56\\ufe52" + "\\u3016\\U000e002f\\U000e0077\\u0662\\u1680\\u2984\\U000e006a\\u002e\\ua6ab\\u104a" + "\\u002e\\u019b\\u2005\\u002e\\u0477\\u0438\\u0085\\u0441\\u002e\\u5f61\\u202f" + "\\U0001019f\\uff08\\u27e8\\u055c\\u0352", + "\\u1f3e\\u004d\\u000a\\ua3e4\\U000e0023\\uff63\\u0c52\\u276d\\U0001d5de\\U0001d171" + "\\u0e38\\u17e5\\U00012fe6\\u0fa9\\u267f\\u1da3\\u0046\\u03ed\\udc72\\u0030" + "\\U0001d688\\u0b6d\\u0085\\u0c67\\u1f94\\u0c6c\\u9cb2\\u202a\\u180e\\u000b" + "\\u002e\\U000e005e\\u035b\\u061f\\u02c1\\U000e0025\\u0357\\u0969\\u202b" + "\\U000130c5\\u0486\\U000e0123\\u2019\\u01bc\\u2006\\u11ad\\u180e\\u2e05" + "\\u10b7\\u013e\\u000a\\u002e\\U00013ea4" }; int loop; - int forward[100]; if (U_FAILURE(status)) { errln("Creation of break iterator failed %s", u_errorName(status)); return; } for (loop = 0; loop < (int)(sizeof(strlist) / sizeof(char *)); loop ++) { - u_unescape(strlist[loop], str, 100); + u_unescape(strlist[loop], str, (int32_t)(sizeof(str) / sizeof(str[0]))); UnicodeString ustr(str); - int count = 0; - bi->setText(ustr); + RBBISentMonkey monkey; + if (U_FAILURE(monkey.deferredStatus)) { + continue; + } + + const int EXPECTEDSIZE = 50; + int expected[EXPECTEDSIZE]; + int expectedcount = 0; + + monkey.setText(ustr); int i; - for (i = bi->first(); i != BreakIterator::DONE; i = bi->next()) { - forward[count ++] = i; + for (i = 0; i != BreakIterator::DONE; i = monkey.next(i)) { + if (expectedcount >= EXPECTEDSIZE) { + TEST_ASSERT(expectedcount < EXPECTEDSIZE); + return; + } + expected[expectedcount ++] = i; } - testBreakBoundPreceding(this, ustr, bi, forward, count); + + testBreakBoundPreceding(this, ustr, bi, expected, expectedcount); } delete bi; +#endif } void RBBITest::TestMonkey(char *params) { @@ -3422,7 +3888,7 @@ void RBBITest::TestMonkey(char *params) { logln("Line Break Monkey Test"); RBBILineMonkey m; BreakIterator *bi = BreakIterator::createLineInstance(locale, status); - if (params == NULL) { + if (loopCount >= 10) { loopCount = loopCount / 5; // Line break runs slower than the others. } if (U_SUCCESS(status)) { @@ -3434,6 +3900,21 @@ void RBBITest::TestMonkey(char *params) { delete bi; } + if (breakType == "sent" || breakType == "all" ) { + logln("Sentence Break Monkey Test"); + RBBISentMonkey m; + BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status); + if (loopCount >= 10) { + loopCount = loopCount / 10; // Sentence runs slower than the other break types + } + if (U_SUCCESS(status)) { + RunMonkey(bi, m, "sentence", seed, loopCount, useUText); + } + else { + errln("Creation of line break iterator failed %s", u_errorName(status)); + } + delete bi; + } #endif } @@ -3508,6 +3989,7 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name UChar32 c = classSet->charAt(charIdx); if (c < 0) { // TODO: deal with sets containing strings. errln("c < 0"); + break; } testText.append(c); } @@ -3527,6 +4009,7 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name errln("breakPos > testText.length()"); } expectedBreaks[breakPos] = 1; + U_ASSERT(expectedCount<testText.length()); expected[expectedCount ++] = breakPos; } @@ -3544,6 +4027,7 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name } else { bi->setText(testText); } + for (i=bi->first(); i != BreakIterator::DONE; i=bi->next()) { if (i < 0 || i > testText.length()) { errln("%s break monkey test: Out of range value returned by breakIterator::next()", name); @@ -3564,7 +4048,7 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name // Find the break positions using isBoundary() tests. memset(isBoundaryBreaks, 0, sizeof(isBoundaryBreaks)); - U_ASSERT(sizeof(isBoundaryBreaks) > testText.length()); + U_ASSERT((int32_t)sizeof(isBoundaryBreaks) > testText.length()); for (i=0; i<=testText.length(); i++) { isBoundaryBreaks[i] = bi->isBoundary(i); } @@ -3583,7 +4067,8 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name breakPos > lastBreakPos && lastBreakPos > i ) { errln("%s break monkey test: " "Out of range value returned by BreakIterator::following().\n" - "Random seed=%d", name, seed); + "Random seed=%d index=%d; following returned %d; lastbreak=%d", + name, seed, i, breakPos, lastBreakPos); break; } followingBreaks[breakPos] = 1; @@ -3598,8 +4083,8 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name breakPos = bi->preceding(i); if (breakPos >= i || breakPos > lastBreakPos || - breakPos < 0 || - breakPos < lastBreakPos && lastBreakPos < i ) { + breakPos < 0 && testText.getChar32Start(i)>0 || + breakPos < lastBreakPos && lastBreakPos < testText.getChar32Start(i) ) { errln("%s break monkey test: " "Out of range value returned by BreakIterator::preceding().\n" "index=%d; prev returned %d; lastBreak=%d" , @@ -3658,7 +4143,7 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name } } - // Format looks like "<data><>\uabcd\uabcd<>\U0001abcd...</data>" + // Format looks like "<data>\\\uabcd\uabcd\\\U0001abcd...</data>" UnicodeString errorText = "<data>"; /***if (strcmp(errorType, "next()") == 0) { startContext = 0; @@ -3677,7 +4162,7 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name errorText.append("<?>"); } else if (expectedBreaks[ci] != 0) { // This a non-error expected break position. - errorText.append("<>"); + errorText.append("\\"); } if (c < 0x10000) { errorText.append("\\u"); @@ -3692,7 +4177,7 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name } ci = testText.moveIndex32(ci, 1); } - errorText.append("<>"); + errorText.append("\\"); errorText.append("</data>\n"); // Output the error @@ -3720,18 +4205,25 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name void RBBITest::TestDebug(void) { #if 0 UErrorCode status = U_ZERO_ERROR; - int pos; + int pos = 0; + int ruleStatus = 0; RuleBasedBreakIterator* bi = // (RuleBasedBreakIterator *)BreakIterator::createLineInstance(Locale::getDefault(), status); - (RuleBasedBreakIterator *)BreakIterator::createWordInstance(Locale::Locale("th"), status); - UnicodeString s("\\u0E2B\\u0E19\\u0E36\\u0E48\\u0E07\\u0E04\\u0E33"); + // (RuleBasedBreakIterator *)BreakIterator::createWordInstance(Locale::Locale("th"), status); + (RuleBasedBreakIterator *)BreakIterator::createSentenceInstance(Locale::getDefault(), status); + UnicodeString s("\\u2008\\u002e\\udc6a\\u37cd\\u71d0\\u2048\\U000e006a\\u002e\\u0046\\ufd3f\\u000a\\u002e"); + // UnicodeString s("Aaa. Bcd"); s = s.unescape(); bi->setText(s); - // bi->last(); + UBool r = bi->isBoundary(8); + printf("%s", r?"true":"false"); + return; + pos = bi->last(); do { - pos = bi->next(); - printf("%d\n", pos); + // ruleStatus = bi->getRuleStatus(); + printf("%d\t%d\n", pos, ruleStatus); + pos = bi->previous(); } while (pos != BreakIterator::DONE); #endif } diff --git a/Build/source/libs/icu-xetex/test/intltest/rbbitst.h b/Build/source/libs/icu-xetex/test/intltest/rbbitst.h index 6e78a795a11..5578847be19 100644 --- a/Build/source/libs/icu-xetex/test/intltest/rbbitst.h +++ b/Build/source/libs/icu-xetex/test/intltest/rbbitst.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1999-2005, International Business Machines Corporation and + * Copyright (c) 1999-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /************************************************************************ @@ -60,7 +60,6 @@ public: void TestThaiLineBreak(); void TestMixedThaiLineBreak(); void TestMaiyamok(); - void TestThaiWordBreak(); void TestMonkey(char *params); void TestExtended(); @@ -73,6 +72,7 @@ public: void TestSentBreaks(); void TestBug3818(); void TestJapaneseWordBreak(); + void TestTrieDict(); void TestDebug(); diff --git a/Build/source/libs/icu-xetex/test/intltest/restsnew.cpp b/Build/source/libs/icu-xetex/test/intltest/restsnew.cpp index a3845d45d67..47669addb14 100644 --- a/Build/source/libs/icu-xetex/test/intltest/restsnew.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/restsnew.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -1127,9 +1127,9 @@ NewResourceBundleTest::TestGetByFallback() { ResourceBundle heRes(NULL, "he", status); - heRes.getWithFallback("calendar", status).getWithFallback("islamic-civil", status).getWithFallback("DateTimePatterns", status); + heRes.getWithFallback("calendar", status).getWithFallback("islamic-civil", status).getWithFallback("DateTime", status); if(U_SUCCESS(status)) { - errln("he locale's Islamic DateTimePatterns resource exists. How did it get here?\n"); + errln("he locale's Islamic-civil DateTime resource exists. How did it get here?\n"); } status = U_ZERO_ERROR; @@ -1140,9 +1140,9 @@ NewResourceBundleTest::TestGetByFallback() { status = U_ZERO_ERROR; ResourceBundle rootRes(NULL, "root", status); - rootRes.getWithFallback("calendar", status).getWithFallback("islamic-civil", status).getWithFallback("DateTimePatterns", status); + rootRes.getWithFallback("calendar", status).getWithFallback("islamic-civil", status).getWithFallback("DateTime", status); if(U_SUCCESS(status)) { - errln("Root's Islamic DateTimePatterns resource exists. How did it get here?\n"); + errln("Root's Islamic-civil's DateTime resource exists. How did it get here?\n"); } status = U_ZERO_ERROR; diff --git a/Build/source/libs/icu-xetex/test/intltest/rndmcoll.cpp b/Build/source/libs/icu-xetex/test/intltest/rndmcoll.cpp new file mode 100644 index 00000000000..f740703ea39 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/rndmcoll.cpp @@ -0,0 +1,185 @@ +/* + ****************************************************************************** + * Copyright (C) 2005-2006, International Business Machines Corporation and * + * others. All Rights Reserved. * + ****************************************************************************** + */ +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <time.h> +#include "rndmcoll.h" +#include "wbnf.h" + + +#if !UCONFIG_NO_COLLATION + +//Raymond: Following comments are copied from Java implementation +// +// each rule can be: +// "[" command "]" +// "& [" position "]" +// "&" before chars +// relation "[variable top]" +// relation (chars "|")? chars ("/" chars)? +// plus, a reset must come before a relation + + +static const char collationBNF[] = + "$s = ' '? 50%;" + "$crlf = '\r\n';" + + "$alternateOptions = non'-'ignorable | shifted;" + "$onoff = on | off;" + "$caseFirstOptions = off | upper | lower;" + "$strengthOptions = '1' | '2' | '3' | '4' | 'I';" + "$commandList = '['" + " ( alternate ' ' $alternateOptions" + " | backwards' 2'" + " | normalization ' ' $onoff " + " | caseLevel ' ' $onoff " + " | hiraganaQ ' ' $onoff" + " | caseFirst ' ' $caseFirstOptions" + " | strength ' ' $strengthOptions" + " ) ']';" + "$command = $commandList $crlf;" + + "$ignorableTypes = (tertiary | secondary | primary) ' ' ignorable;" + "$allTypes = variable | regular | implicit | trailing | $ignorableTypes;" + "$positionList = '[' (first | last) ' ' $allTypes ']';" + + "$beforeList = '[before ' ('1' | '2' | '3') ']';" + + "$relationList = (" + " '<'" + " | '<<'" + " | ';'" + " | '<<<'" + " | ','" + " | '='" + ");" + "$string = $chars{1,5}~@;" + "$chars = a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z| '<'| '&'| '['| ']';" + "$rel1 = '[variable top]' $s;" + "$p1 = ($string $s '|' $s)? 25%;" + "$p2 = ('/' $s $string $s)? 25%;" + "$rel2 = $p1 $string $s $p2;" + "$relation = $relationList $s ($rel1 | $rel2) $crlf;" + + "$reset = '&' $s ($beforeList $s)? 10% ($positionList 1% | $string 10%) $crlf;" + "$mostRules = $command 1% | $reset 5% | $relation 25%;" + "$root = $command{0,5} $reset $mostRules{1,20};"; + + +static const UVersionInfo ICU_37 = {3,7,0,0}; + +void RandomCollatorTest::Test2(){ + if(!isICUVersionAtLeast(ICU_37)){ + return; + } + else { + errln("TestWbnf is incorrectly implemented.\nThis test should be modeled to use the existing test frame work for naming tests.\n"); + } + TestWbnf(); +} + + +void RandomCollatorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* ){ + if (exec) logln("TestSuite RandomCollatorTest: "); + switch (index) { + TESTCASE(0, Test); + TESTCASE(1, Test2); + default: name = ""; break; + } +} + +/* +class TestColltorCompare{ +public: + UBool operator()(Collator &coll, int count = 1000){ + UnicodeString a(test_string.get_a_string()); + UnicodeString b(test_string.get_a_string()); + UnicodeString c(test_string.get_a_string()); + do{ + if (check_transitivity(coll, a, b, c)){ + a = b; + b = c; + c = UnicodeString(test_string.get_a_string()); + } + }while(count-- >= 0 ); + + return FALSE; + } + TestColltorCompare():test_string("$s = $c{1,8};", "$s", "$c", new Magic_SelectOneChar("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]&<")){ + } +private: + UBool check_transitivity(const Collator & coll, const UnicodeString &a, const UnicodeString &b, const UnicodeString &c){ + int ab = coll.compare(a,b), ba = coll.compare(b,a); + int bc = coll.compare(b,c), cb = coll.compare(c,b); + int ca = coll.compare(c,a), ac = coll.compare(a,c); + // a + // / \ + // b - c + // + if (//counter-clockwise, maximum + (ab >=0 && bc >=0 && ac <0) + ||(bc >=0 && ca >=0 && ba <0) + ||(ca >=0 && ab >=0 && cb <0) + + //counter-clockwise, minimum + ||(ab <=0 && bc <=0 && ca >0) + ||(bc <=0 && ca <=0 && ba >0) + ||(ca <=0 && ab <=0 && cb >0) + ){ + return FALSE; + } + return TRUE; + } + + LanguageGenerator test_string; +};*/ + +void RandomCollatorTest::Test(){ + if(!isICUVersionAtLeast(ICU_37)){ + return; + } + else { + errln("This test needs to be fixed.\n"); + } + LanguageGenerator test_rule; + if (test_rule.parseBNF(collationBNF, "$root", TRUE) != LanguageGenerator::OK){ + errln("The test code itself is wrong."); + return; + }; + + //TestColltorCompare coll_test; + + static const int CONSTRUCT_RANDOM_COUNT = 1000; + int i; + for (i=0; i < CONSTRUCT_RANDOM_COUNT; i++){ + const char * rule = test_rule.next(); + logln("\n-----------------------------------%d\n",i); + logln(UnicodeString(rule, strlen(rule))); + + UnicodeString newRule(rule); // potential bug + UErrorCode status = U_ZERO_ERROR; + logln( "===========================================\n"); + fwrite(rule, strlen(rule),1,stdout); + logln("\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); + + Collator * c = new RuleBasedCollator(newRule,status); + + if (U_FAILURE(status)) { + errln( "Could not create Collator for the %d(th) generated rule.\n" + "Error Name: %s\n" + "The rule is ", + i, u_errorName(status)); + return; + } + + delete c; + } +} + +#endif /* #if !UCONFIG_NO_COLLATION */ + diff --git a/Build/source/libs/icu-xetex/test/intltest/rndmcoll.h b/Build/source/libs/icu-xetex/test/intltest/rndmcoll.h new file mode 100644 index 00000000000..d216af3b1f7 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/rndmcoll.h @@ -0,0 +1,29 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 2005-2006, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ + +/** + * RandomCollatorTest is ported from RandomCollatorTest.java of ICU4J + */ + +#ifndef _RANDCOLL +#define _RANDCOLL + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_COLLATION + +#include "tscoll.h" + +class RandomCollatorTest: public IntlTestCollator { +public: + virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); + void Test(); + void Test2(); +}; + +#endif /* #if !UCONFIG_NO_COLLATION */ + +#endif /* _RANDCOLL */ diff --git a/Build/source/libs/icu-xetex/test/intltest/sdtfmtts.cpp b/Build/source/libs/icu-xetex/test/intltest/sdtfmtts.cpp index fafd375fb5a..064acba30ab 100644 --- a/Build/source/libs/icu-xetex/test/intltest/sdtfmtts.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/sdtfmtts.cpp @@ -1,7 +1,7 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -53,7 +53,8 @@ void IntlTestSimpleDateFormatAPI::testAPI(/*char *par*/) SimpleDateFormat def(status); if(U_FAILURE(status)) { - errln("ERROR: Could not create SimpleDateFormat (default)"); + dataerrln("ERROR: Could not create SimpleDateFormat (default) - exitting"); + return; } status = U_ZERO_ERROR; @@ -78,7 +79,8 @@ void IntlTestSimpleDateFormatAPI::testAPI(/*char *par*/) status = U_ZERO_ERROR; SimpleDateFormat cust1(pattern, symbols, status); if(U_FAILURE(status)) { - errln("ERROR: Could not create SimpleDateFormat (pattern, symbols*)"); + dataerrln("ERROR: Could not create SimpleDateFormat (pattern, symbols*) - exitting"); + return; } status = U_ZERO_ERROR; diff --git a/Build/source/libs/icu-xetex/test/intltest/srchtest.cpp b/Build/source/libs/icu-xetex/test/intltest/srchtest.cpp index 6899f4bb258..f768c0d2f8e 100644 --- a/Build/source/libs/icu-xetex/test/intltest/srchtest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/srchtest.cpp @@ -1,6 +1,6 @@ /* ***************************************************************************** -* Copyright (C) 2001-2004, International Business Machines orporation +* Copyright (C) 2001-2006, International Business Machines orporation * and others. All Rights Reserved. ****************************************************************************/ @@ -24,7 +24,11 @@ if (exec) { \ logln(#test "---"); \ logln((UnicodeString)""); \ - test(); \ + if(areBroken) { \ + errln(__FILE__ " cannot test - failed to create collator."); \ + } else { \ + test(); \ + } \ } \ break; @@ -94,12 +98,11 @@ StringSearchTest::~StringSearchTest() void StringSearchTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* ) { + UBool areBroken = FALSE; if (m_en_us_ == NULL && m_fr_fr_ == NULL && m_de_ == NULL && m_es_ == NULL && m_en_wordbreaker_ == NULL && m_en_characterbreaker_ == NULL && exec) { - errln(__FILE__ " cannot test - failed to create collator."); - name = ""; - return; + areBroken = TRUE; } switch (index) { @@ -150,6 +153,7 @@ void StringSearchTest::runIndexedTest(int32_t index, UBool exec, CASE(32, TestContractionCanonical) CASE(33, TestUClassID) CASE(34, TestSubclass) + CASE(35, TestCoverage) default: name = ""; break; } } @@ -2272,4 +2276,37 @@ void StringSearchTest::TestSubclass() } } +class StubSearchIterator:public SearchIterator{ +public: + StubSearchIterator(){} + virtual void setOffset(int32_t , UErrorCode &) {}; + virtual int32_t getOffset(void) const {return 0;}; + virtual SearchIterator* safeClone(void) const {return NULL;}; + virtual int32_t handleNext(int32_t , UErrorCode &){return 0;}; + virtual int32_t handlePrev(int32_t , UErrorCode &) {return 0;}; + virtual UClassID getDynamicClassID() const { + static char classID = 0; + return (UClassID)&classID; + } +}; + +void StringSearchTest::TestCoverage(){ + StubSearchIterator stub1, stub2; + UErrorCode status = U_ZERO_ERROR; + + if (stub1 != stub2){ + errln("new StubSearchIterator should be equal"); + } + + stub2.setText(UnicodeString("ABC"), status); + if (U_FAILURE(status)) { + errln("Error: SearchIterator::SetText"); + } + + stub1 = stub2; + if (stub1 != stub2){ + errln("SearchIterator::operator = assigned object should be equal"); + } +} + #endif /* #if !UCONFIG_NO_COLLATION */ diff --git a/Build/source/libs/icu-xetex/test/intltest/srchtest.h b/Build/source/libs/icu-xetex/test/intltest/srchtest.h index 36163a1d8fa..37fafdc3b88 100644 --- a/Build/source/libs/icu-xetex/test/intltest/srchtest.h +++ b/Build/source/libs/icu-xetex/test/intltest/srchtest.h @@ -1,6 +1,6 @@ /**************************************************************************** * COPYRIGHT: - * Copyright (c) 2001, International Business Machines Corporation and others + * Copyright (c) 2001-2005, International Business Machines Corporation and others * All Rights Reserved. ***************************************************************************/ @@ -87,6 +87,7 @@ private: void TestContractionCanonical(); void TestUClassID(); void TestSubclass(); + void TestCoverage(); }; #endif /* #if !UCONFIG_NO_COLLATION */ diff --git a/Build/source/libs/icu-xetex/test/intltest/testidn.cpp b/Build/source/libs/icu-xetex/test/intltest/testidn.cpp index b706f2bf42c..8cc9b1687fa 100644 --- a/Build/source/libs/icu-xetex/test/intltest/testidn.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/testidn.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2003, International Business Machines +* Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -19,8 +19,6 @@ * in various IDNA conversion processes. */ -#include <stdio.h> -#include <stdlib.h> #include "unicode/utypes.h" #if !UCONFIG_NO_IDNA && !UCONFIG_NO_TRANSLITERATION @@ -40,6 +38,7 @@ #include "sprpimpl.h" #include "testidna.h" #include "punyref.h" +#include <stdlib.h> UBool beVerbose=FALSE, haveCopyright=TRUE; @@ -222,8 +221,12 @@ getValues(uint32_t result, int32_t& value, UBool& isIndex){ * the source codepoint is copied to the destination */ type = USPREP_TYPE_LIMIT; + isIndex =FALSE; + value = 0; }else if(result >= _SPREP_TYPE_THRESHOLD){ type = (UStringPrepType) (result - _SPREP_TYPE_THRESHOLD); + isIndex =FALSE; + value = 0; }else{ /* get the state */ type = USPREP_MAP; diff --git a/Build/source/libs/icu-xetex/test/intltest/testidna.cpp b/Build/source/libs/icu-xetex/test/intltest/testidna.cpp index 0f44c5a43cb..361789d5c38 100644 --- a/Build/source/libs/icu-xetex/test/intltest/testidna.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/testidna.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2003-2005, International Business Machines + * Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -395,7 +395,7 @@ static struct ErrorCases{ 0x0000 }, "www..com", - U_IDNA_ERROR_LIMIT, //TODO: Fix this to U_IDNA_ZERO_LENGTH_LABEL_ERROR, in 3.6 + U_IDNA_ZERO_LENGTH_LABEL_ERROR, TRUE, TRUE, FALSE }, { @@ -1423,7 +1423,7 @@ void TestIDNA::testRootLabelSeparator(const char* testName, CompareFunc func, // runIndexedTest //--------------------------------------------- -void TestIDNA::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) +void TestIDNA::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par) { if (exec) logln((UnicodeString)"TestSuite IDNA API "); switch (index) { @@ -1447,8 +1447,7 @@ void TestIDNA::runIndexedTest( int32_t index, UBool exec, const char* &name, cha if(exec){ logln("TestSuite IDNA conf----"); logln(); IdnaConfTest test; - const char* name = "idnaconf"; - test.runIndexedTest(0,TRUE,name); + callTest(test, par); } break; } @@ -1651,7 +1650,11 @@ void TestIDNA::TestIDNAMonkeyTest(){ int i; getInstance(status); // Init prep - + if (U_FAILURE(status)) { + errln("Test could not initialize. Got %s", u_errorName(status)); + return; + } + for(i=0; i<loopCount; i++){ source.truncate(0); getTestSource(source); @@ -1720,6 +1723,13 @@ void TestIDNA::TestCompareReferenceImpl(){ } void TestIDNA::TestRefIDNA(){ + UErrorCode status = U_ZERO_ERROR; + getInstance(status); // Init prep + if (U_FAILURE(status)) { + errln("Test could not initialize. Got %s", u_errorName(status)); + return; + } + testToASCII("idnaref_toASCII", idnaref_toASCII); testToUnicode("idnaref_toUnicode", idnaref_toUnicode); testIDNToASCII("idnaref_IDNToASCII", idnaref_IDNToASCII); diff --git a/Build/source/libs/icu-xetex/test/intltest/thcoll.cpp b/Build/source/libs/icu-xetex/test/intltest/thcoll.cpp index 28fe1df65ac..1fd99e7fb24 100644 --- a/Build/source/libs/icu-xetex/test/intltest/thcoll.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/thcoll.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2005, International Business Machines +* Copyright (C) 1999-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -53,7 +53,7 @@ void CollationThaiTest::runIndexedTest(int32_t index, UBool exec, const char* &n if((!coll) && exec) { errln(__FILE__ " cannot test - failed to create collator."); - name = ""; + name = "some test"; return; } diff --git a/Build/source/libs/icu-xetex/test/intltest/tmsgfmt.cpp b/Build/source/libs/icu-xetex/test/intltest/tmsgfmt.cpp index 3e214f7ddff..4b2269c9290 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tmsgfmt.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tmsgfmt.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* @@ -1238,19 +1238,19 @@ void TestMessageFormat::testAutoQuoteApostrophe(void) { int32_t pattern_count = sizeof(patterns)/sizeof(patterns[0]); for (int i = 0; i < pattern_count; i += 2) { - UErrorCode status = U_ZERO_ERROR; + UErrorCode status = U_ZERO_ERROR; UnicodeString result = MessageFormat::autoQuoteApostrophe(patterns[i], status); UnicodeString target(patterns[i+1]); if (target != result) { - const int BUF2_LEN = 64; - char buf[256]; - char buf2[BUF2_LEN]; - int32_t len = result.extract(0, result.length(), buf2, BUF2_LEN); - if (len >= BUF2_LEN) { - buf2[BUF2_LEN-1] = 0; - } - sprintf(buf, "[%2d] test \"%s\": target (\"%s\") != result (\"%s\")\n", i/2, patterns[i], patterns[i+1], buf2); - errln(buf); + const int BUF2_LEN = 64; + char buf[256]; + char buf2[BUF2_LEN]; + int32_t len = result.extract(0, result.length(), buf2, BUF2_LEN); + if (len >= BUF2_LEN) { + buf2[BUF2_LEN-1] = 0; + } + sprintf(buf, "[%2d] test \"%s\": target (\"%s\") != result (\"%s\")\n", i/2, patterns[i], patterns[i+1], buf2); + errln(buf); } } } diff --git a/Build/source/libs/icu-xetex/test/intltest/transrt.cpp b/Build/source/libs/icu-xetex/test/intltest/transrt.cpp index cc367a48533..056301c0f52 100644 --- a/Build/source/libs/icu-xetex/test/intltest/transrt.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/transrt.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2000-2005, International Business Machines +* Copyright (C) 2000-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -83,13 +83,7 @@ TransliteratorRoundTripTest::runIndexedTest(int32_t index, UBool exec, // Time bomb - allows temporary behavior that expires at a given // release //-------------------------------------------------------------------- -static const UVersionInfo ICU_35 = {3,5,0,0}; - -static UBool isICUVersionAtLeast(const UVersionInfo x) { - UVersionInfo v; - u_getVersion(v); - return (uprv_memcmp(v, x, U_MAX_VERSION_LENGTH) >= 0); -} +static const UVersionInfo ICU_37 = {3,7,0,0}; //-------------------------------------------------------------------- @@ -271,6 +265,10 @@ UBool LegalGreek::isRho(UChar c) { } // AbbreviatedUnicodeSetIterator Interface --------------------------------------------- +// +// Iterate over a UnicodeSet, only returning a sampling of the contained code points. +// density is the approximate total number of code points to returned for the entire set. +// class AbbreviatedUnicodeSetIterator : public UnicodeSetIterator { public : @@ -291,7 +289,7 @@ public : private : UBool abbreviated; - int32_t perRange; + int32_t perRange; // The maximum number of code points to be returned from each range virtual void loadRange(int32_t range); /** @@ -1047,7 +1045,7 @@ static void writeStringInU8(FILE *out, const UnicodeString &s) { uint8_t bufForOneChar[10]; UBool isError = FALSE; int32_t destIdx = 0; - U8_APPEND(bufForOneChar, destIdx, sizeof(bufForOneChar), c, isError); + U8_APPEND(bufForOneChar, destIdx, (int32_t)sizeof(bufForOneChar), c, isError); fwrite(bufForOneChar, 1, destIdx, out); } } @@ -1143,7 +1141,7 @@ void TransliteratorRoundTripTest::TestHan() { void TransliteratorRoundTripTest::TestGreek() { - if (isICUVersionAtLeast(ICU_35)) { + if (isICUVersionAtLeast(ICU_37)) { // We temporarily filter against Unicode 4.1, but we only do this // before version 3.4. errln("FAIL: TestGreek needs to be updated to remove delete the [:Age=4.0:] filter "); @@ -1175,7 +1173,7 @@ void TransliteratorRoundTripTest::TestGreek() { void TransliteratorRoundTripTest::TestGreekUNGEGN() { - if (isICUVersionAtLeast(ICU_35)) { + if (isICUVersionAtLeast(ICU_37)) { // We temporarily filter against Unicode 4.1, but we only do this // before version 3.4. errln("FAIL: TestGreek needs to be updated to remove delete the [:Age=4.0:] filter "); @@ -1204,7 +1202,7 @@ void TransliteratorRoundTripTest::TestGreekUNGEGN() { void TransliteratorRoundTripTest::Testel() { - if (isICUVersionAtLeast(ICU_35)) { + if (isICUVersionAtLeast(ICU_37)) { // We temporarily filter against Unicode 4.1, but we only do this // before version 3.4. errln("FAIL: TestGreek needs to be updated to remove delete the [:Age=4.0:] filter "); @@ -1272,7 +1270,7 @@ UBool LegalHebrew::is(const UnicodeString& sourceString)const{ return TRUE; } void TransliteratorRoundTripTest::TestHebrew() { - if (isICUVersionAtLeast(ICU_35)) { + if (isICUVersionAtLeast(ICU_37)) { // We temporarily filter against Unicode 4.1, but we only do this // before version 3.4. errln("FAIL: TestHebrew needs to be updated to remove delete the [:Age=4.0:] filter "); @@ -1395,9 +1393,16 @@ void TransliteratorRoundTripTest::TestDevanagariLatin() { } RTTest test("Latin-Devanagari"); Legal *legal = new LegalIndic(); - + if (isICUVersionAtLeast(ICU_37)) { + // We temporarily filter against Unicode 4.1, but we only do this + // before version 3.4. + errln("FAIL: TestDevanagariLatin needs to be updated to remove delete the [:Age=4.1:] filter "); + return; + } else { + logln("Warning: TestDevanagariLatin needs to be updated to remove delete the section marked [:Age=4.1:] filter"); + } test.test(UnicodeString(latinForIndic, ""), - UnicodeString("[[:Devanagari:][\\u094d][\\u0964\\u0965]]", ""), "[\\u0965\\u0904]", this, quick, + UnicodeString("[[[:Devanagari:][\\u094d][\\u0964\\u0965]]&[:Age=4.1:]]", ""), "[\\u0965\\u0904]", this, quick, legal, 50); delete legal; @@ -1664,18 +1669,40 @@ void TransliteratorRoundTripTest::TestInterIndic() { logln("Testing only 5 of %i. Skipping rest (use -e for exhaustive)",num); num = 5; } + if (isICUVersionAtLeast(ICU_37)) { + // We temporarily filter against Unicode 4.1, but we only do this + // before version 3.4. + errln("FAIL: TestInterIndic needs to be updated to remove delete the [:Age=4.1:] filter "); + return; + } else { + logln("Warning: TestInterIndic needs to be updated to remove delete the section marked [:Age=4.1:] filter"); + } for(int i = 0; i < num;i++){ RTTest test(interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 0]); Legal *legal = new LegalIndic(); logln(UnicodeString("Stress testing ") + interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 0]); + /* Uncomment lines below when transliterator is fixed */ + /* test.test( interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 1], interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 2], interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 3], // roundtrip exclusions this, quick, legal, 50); - + */ + /* comment lines below when transliterator is fixed */ + // start + UnicodeString source("["); + source.append(interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 1]); + source.append(" & [:Age=4.1:]]"); + UnicodeString target("["); + target.append(interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 2]); + target.append(" & [:Age=4.1:]]"); + test.test( source, + target, + interIndicArray[i*INTER_INDIC_ARRAY_WIDTH + 3], // roundtrip exclusions + this, quick, legal, 50); + // end delete legal; } - } // end indic tests ---------------------------------------------------------- diff --git a/Build/source/libs/icu-xetex/test/intltest/transtst.cpp b/Build/source/libs/icu-xetex/test/intltest/transtst.cpp index 619dc3d3f23..38be8a2aca6 100644 --- a/Build/source/libs/icu-xetex/test/intltest/transtst.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/transtst.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2005, International Business Machines +* Copyright (C) 1999-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -185,11 +185,12 @@ TransliteratorTest::runIndexedTest(int32_t index, UBool exec, TESTCASE(77,TestAlternateSyntax); TESTCASE(78,TestBeginEnd); TESTCASE(79,TestBeginEndToRules); + TESTCASE(80,TestRegisterAlias); default: name = ""; break; } } -static const UVersionInfo ICU_31 = {3,1,0,0}; +static const UVersionInfo ICU_37 = {3,7,0,0}; /** * Make sure every system transliterator can be instantiated. * @@ -224,7 +225,8 @@ void TransliteratorTest::TestInstantiation() { i + ") != getAvailableIDs().snext()"); continue; } - if(id2.indexOf("Thai")>-1 && isICUVersionAtLeast(ICU_31)){ + if(id2.indexOf("Thai")>-1 && !isICUVersionAtLeast(ICU_37)){ + /* The Thai-Latin transliterator doesn't exist in ICU4C yet */ continue; } UParseError parseError; @@ -3495,7 +3497,8 @@ void TransliteratorTest::TestIncrementalProgress(void) { Transliterator::getAvailableVariant(k, source, target, variant); UnicodeString id = source + "-" + target + "/" + variant; - if(id.indexOf("Thai")>-1 && isICUVersionAtLeast(ICU_31)){ + if(id.indexOf("Thai")>-1 && !isICUVersionAtLeast(ICU_37)){ + /* The Thai-Latin transliterator doesn't exist in ICU4C yet */ continue; } Transliterator *t = Transliterator::createInstance(id, UTRANS_FORWARD, err, status); @@ -4315,6 +4318,82 @@ void TransliteratorTest::TestBeginEndToRules() { } } +void TransliteratorTest::TestRegisterAlias() { + UnicodeString longID("Lower;[aeiou]Upper"); + UnicodeString shortID("Any-CapVowels"); + UnicodeString reallyShortID("CapVowels"); + + Transliterator::registerAlias(shortID, longID); + + UErrorCode err = U_ZERO_ERROR; + Transliterator* t1 = Transliterator::createInstance(longID, UTRANS_FORWARD, err); + if (U_FAILURE(err)) { + errln("Failed to instantiate transliterator with long ID"); + Transliterator::unregister(shortID); + return; + } + Transliterator* t2 = Transliterator::createInstance(reallyShortID, UTRANS_FORWARD, err); + if (U_FAILURE(err)) { + errln("Failed to instantiate transliterator with short ID"); + delete t1; + Transliterator::unregister(shortID); + return; + } + + if (t1->getID() != longID) + errln("Transliterator instantiated with long ID doesn't have long ID"); + if (t2->getID() != reallyShortID) + errln("Transliterator instantiated with short ID doesn't have short ID"); + + UnicodeString rules1; + UnicodeString rules2; + + t1->toRules(rules1, TRUE); + t2->toRules(rules2, TRUE); + if (rules1 != rules2) + errln("Alias transliterators aren't the same"); + + delete t1; + delete t2; + Transliterator::unregister(shortID); + + t1 = Transliterator::createInstance(shortID, UTRANS_FORWARD, err); + if (U_SUCCESS(err)) { + errln("Instantiation with short ID succeeded after short ID was unregistered"); + delete t1; + } + + // try the same thing again, but this time with something other than + // an instance of CompoundTransliterator + UnicodeString realID("Latin-Greek"); + UnicodeString fakeID("Latin-dlgkjdflkjdl"); + Transliterator::registerAlias(fakeID, realID); + + err = U_ZERO_ERROR; + t1 = Transliterator::createInstance(realID, UTRANS_FORWARD, err); + if (U_FAILURE(err)) { + errln("Failed to instantiate transliterator with real ID"); + Transliterator::unregister(realID); + return; + } + t2 = Transliterator::createInstance(fakeID, UTRANS_FORWARD, err); + if (U_FAILURE(err)) { + errln("Failed to instantiate transliterator with fake ID"); + delete t1; + Transliterator::unregister(realID); + return; + } + + t1->toRules(rules1, TRUE); + t2->toRules(rules2, TRUE); + if (rules1 != rules2) + errln("Alias transliterators aren't the same"); + + delete t1; + delete t2; + Transliterator::unregister(fakeID); +} + //====================================================================== // Support methods //====================================================================== diff --git a/Build/source/libs/icu-xetex/test/intltest/transtst.h b/Build/source/libs/icu-xetex/test/intltest/transtst.h index 7c79057a92b..8ffac67bc3e 100644 --- a/Build/source/libs/icu-xetex/test/intltest/transtst.h +++ b/Build/source/libs/icu-xetex/test/intltest/transtst.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2005, International Business Machines +* Copyright (C) 1999-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -344,10 +344,21 @@ private: void TestAlternateSyntax(void); + /** + * Tests the multiple-pass syntax + */ void TestBeginEnd(void); + /** + * Tests that toRules() works right with the multiple-pass syntax + */ void TestBeginEndToRules(void); + /** + * Tests the registerAlias() function + */ + void TestRegisterAlias(void); + //====================================================================== // Support methods //====================================================================== diff --git a/Build/source/libs/icu-xetex/test/intltest/trcoll.cpp b/Build/source/libs/icu-xetex/test/intltest/trcoll.cpp index 09f030b4d6c..7da003a8ca3 100644 --- a/Build/source/libs/icu-xetex/test/intltest/trcoll.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/trcoll.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -93,7 +93,7 @@ void CollationTurkishTest::runIndexedTest( int32_t index, UBool exec, const char if((!myCollation) && exec) { errln(__FILE__ " cannot test - failed to create collator."); - name = ""; + name = "some test"; return; } switch (index) { diff --git a/Build/source/libs/icu-xetex/test/intltest/trnserr.cpp b/Build/source/libs/icu-xetex/test/intltest/trnserr.cpp index 46155390103..0b76616672f 100644 --- a/Build/source/libs/icu-xetex/test/intltest/trnserr.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/trnserr.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2001-2004, International Business Machines Corporation and + * Copyright (c) 2001-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /************************************************************************ @@ -43,6 +43,7 @@ TransliteratorErrorTest::runIndexedTest(int32_t index, UBool exec, TESTCASE(0,TestTransliteratorErrors); TESTCASE(1, TestUnicodeSetErrors); TESTCASE(2, TestRBTErrors); + TESTCASE(3, TestCoverage); //TESTCASE(3, TestUniToHexErrors); //TESTCASE(4, TestHexToUniErrors); // TODO: Add a subclass to test clone(). @@ -264,4 +265,25 @@ void TransliteratorErrorTest::TestRBTErrors() { // delete t; //} +class StubTransliterator: public Transliterator{ +public: + StubTransliterator(): Transliterator(UNICODE_STRING_SIMPLE("Any-Null"), 0) {} + virtual void handleTransliterate(Replaceable& ,UTransPosition& offsets,UBool) const { + offsets.start = offsets.limit; + } + + virtual UClassID getDynamicClassID() const{ + static char classID = 0; + return (UClassID)&classID; + } +}; + +void TransliteratorErrorTest::TestCoverage() { + StubTransliterator stub; + + if (stub.clone() != NULL){ + errln("FAIL: default Transliterator::clone() should return NULL"); + } +} + #endif /* #if !UCONFIG_NO_TRANSLITERATION */ diff --git a/Build/source/libs/icu-xetex/test/intltest/trnserr.h b/Build/source/libs/icu-xetex/test/intltest/trnserr.h index ab34a6d6b34..35b4c5a4bd6 100644 --- a/Build/source/libs/icu-xetex/test/intltest/trnserr.h +++ b/Build/source/libs/icu-xetex/test/intltest/trnserr.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2001-2004, International Business Machines Corporation and + * Copyright (c) 2001-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /************************************************************************ @@ -43,6 +43,10 @@ public: //void TestHexToUniErrors(void); + // JitterBug 4452, for coverage. The reason to put this method here is + // this class is comparable smaller than other Transliterator*Test classes + void TestCoverage(void); + }; #endif /* #if !UCONFIG_NO_TRANSLITERATION */ diff --git a/Build/source/libs/icu-xetex/test/intltest/tscoll.cpp b/Build/source/libs/icu-xetex/test/intltest/tscoll.cpp index 85f92f6b6f9..eb7bb04fa7a 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tscoll.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tscoll.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -47,6 +47,7 @@ #include "ucaconf.h" #include "svccoll.h" #include "cmemory.h" +#include "rndmcoll.h" #define TESTCLASS(n,classname) \ case n: \ @@ -87,6 +88,7 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n TESTCLASS(18, UCAConformanceTest); TESTCLASS(19, CollationServiceTest); TESTCLASS(20, CollationFinnishTest); // removed by weiv - we have changed Finnish collation + TESTCLASS(21, RandomCollatorTest); default: name = ""; break; } diff --git a/Build/source/libs/icu-xetex/test/intltest/tsdate.cpp b/Build/source/libs/icu-xetex/test/intltest/tsdate.cpp index fed509f5127..00f740ec0a1 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tsdate.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tsdate.cpp @@ -1,6 +1,5 @@ /*********************************************************************** - * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -15,6 +14,7 @@ #include <float.h> #include <stdlib.h> +#include <math.h> const double IntlTestDateFormat::ONEYEAR = 365.25 * ONEDAY; // Approximate @@ -214,7 +214,7 @@ void IntlTestDateFormat::tryDate(UDate theDate) } } } - + // Return a random double from 0.01 to 1, inclusive double IntlTestDateFormat::randDouble() { @@ -235,7 +235,7 @@ double IntlTestDateFormat::randDouble() d = -d; if (d > 0.0) { - double e = uprv_floor(uprv_log10(d)); + double e = uprv_floor(log10(d)); if (e < -2.0) d *= uprv_pow10((int32_t)(-e-2)); else if (e > -1.0) diff --git a/Build/source/libs/icu-xetex/test/intltest/tsdtfmsy.cpp b/Build/source/libs/icu-xetex/test/intltest/tsdtfmsy.cpp index fb974e36274..e281505b6f0 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tsdtfmsy.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tsdtfmsy.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -17,20 +17,11 @@ void IntlTestDateFormatSymbols::runIndexedTest( int32_t index, UBool exec, const { if (exec) logln("TestSuite DateFormatSymbols"); switch (index) { - case 0: name = "DateFormatSymbols test"; - if (exec) { - logln("DateFormatSymbols test---"); logln(""); - testSymbols(/*par*/); - } - break; - - case 1: name = "TestGetMonths"; - if (exec) { - logln("TestGetMonths test---"); logln(""); - TestGetMonths(); - } - break; - + TESTCASE(0,TestSymbols); + TESTCASE(1,TestGetMonths); + TESTCASE(2,TestGetMonths2); + TESTCASE(3,TestGetWeekdays2); + TESTCASE(4,TestGetEraNames); default: name = ""; break; } } @@ -59,10 +50,82 @@ void IntlTestDateFormatSymbols::TestGetMonths() delete symbol; } +void IntlTestDateFormatSymbols::TestGetMonths2() +{ + UErrorCode status = U_ZERO_ERROR; + DateFormatSymbols *symbol; + + symbol=new DateFormatSymbols(Locale::getDefault(), status); + + DateFormatSymbols::DtContextType context[] = {DateFormatSymbols::STANDALONE, DateFormatSymbols::FORMAT}; + DateFormatSymbols::DtWidthType width[] = {DateFormatSymbols::WIDE, DateFormatSymbols::ABBREVIATED, DateFormatSymbols::NARROW}; + + for (int32_t i = 0; i < 2; i++) { + for (int32_t j = 0; j < 3; j++) { + int32_t cnt; + const UnicodeString * month = symbol->getMonths(cnt,context[i],width[j]); + + logln((UnicodeString)"size = " + cnt); + + for (int32_t k = 0; k < cnt; k++) { + logln(month[k]); + } + } + } + delete symbol; +} + +void IntlTestDateFormatSymbols::TestGetWeekdays2() +{ + UErrorCode status = U_ZERO_ERROR; + DateFormatSymbols *symbol; + + symbol=new DateFormatSymbols(Locale::getDefault(), status); + + DateFormatSymbols::DtContextType context[] = {DateFormatSymbols::STANDALONE, DateFormatSymbols::FORMAT}; + DateFormatSymbols::DtWidthType width[] = {DateFormatSymbols::WIDE, DateFormatSymbols::ABBREVIATED, DateFormatSymbols::NARROW}; + + for (int32_t i = 0; i < 2; i++) { + for (int32_t j = 0; j < 3; j++) { + int32_t cnt; + const UnicodeString * wd = symbol->getWeekdays(cnt,context[i],width[j]); + + logln((UnicodeString)"size = " + cnt); + + for (int32_t k = 0; k < cnt; k++) { + logln(wd[k]); + } + } + } + delete symbol; +} + + +void IntlTestDateFormatSymbols::TestGetEraNames() +{ + UErrorCode status = U_ZERO_ERROR; + int32_t cnt; + const UnicodeString* name; + DateFormatSymbols *symbol; + + symbol=new DateFormatSymbols(Locale::getDefault(), status); + + name=symbol->getEraNames(cnt); + + logln((UnicodeString)"size = " + cnt); + + for (int32_t i=0; i<cnt; ++i) + { + logln(name[i]); + } + + delete symbol; +} + /** * Test the API of DateFormatSymbols; primarily a simple get/set set. */ -void IntlTestDateFormatSymbols::testSymbols(/* char *par */) +void IntlTestDateFormatSymbols::TestSymbols(/* char *par */) { UErrorCode status = U_ZERO_ERROR; @@ -72,6 +135,12 @@ void IntlTestDateFormatSymbols::testSymbols(/* char *par */) } status = U_ZERO_ERROR; + DateFormatSymbols fr2(Locale::getFrench(), status); + if(U_FAILURE(status)) { + errln("ERROR: Couldn't create French DateFormatSymbols " + (UnicodeString)u_errorName(status)); + } + + status = U_ZERO_ERROR; DateFormatSymbols en(Locale::getEnglish(), status); if(U_FAILURE(status)) { errln("ERROR: Couldn't create English DateFormatSymbols " + (UnicodeString)u_errorName(status)); @@ -107,6 +176,48 @@ void IntlTestDateFormatSymbols::testSymbols(/* char *par */) errln("ERROR: setShortMonths() failed"); } + const UnicodeString *wideMonths = en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE); + fr2.setMonths(wideMonths, count, DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE); + if( *en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE) != + *fr2.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE )) { + errln("ERROR: setMonths(FORMAT,WIDE) failed"); + } + + const UnicodeString *abbrMonths = en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED); + fr2.setMonths(abbrMonths, count, DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED); + if( *en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED) != + *fr2.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED )) { + errln("ERROR: setMonths(FORMAT,ABBREVIATED) failed"); + } + + const UnicodeString *narrowMonths = en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW); + fr.setMonths(narrowMonths, count, DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW); + if( *en.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW) != + *fr.getMonths(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW )) { + errln("ERROR: setMonths(FORMAT,NARROW) failed"); + } + + const UnicodeString *standaloneWideMonths = en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE); + fr.setMonths(standaloneWideMonths, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE); + if( *en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE) != + *fr.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE )) { + errln("ERROR: setMonths(STANDALONE,WIDE) failed"); + } + + const UnicodeString *standaloneShortMonths = en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED); + fr.setMonths(standaloneShortMonths, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED); + if( *en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED) != + *fr.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED )) { + errln("ERROR: setMonths(STANDALONE,ABBREVIATED) failed"); + } + + const UnicodeString *standaloneNarrowMonths = en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW); + fr.setMonths(standaloneNarrowMonths, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW); + if( *en.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW) != + *fr.getMonths(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW )) { + errln("ERROR: setMonths(STANDALONE,NARROW) failed"); + } + const UnicodeString *weekdays = en.getWeekdays(count); fr.setWeekdays(weekdays, count); if( *en.getWeekdays(count) != *fr.getWeekdays(count)) { @@ -119,6 +230,76 @@ void IntlTestDateFormatSymbols::testSymbols(/* char *par */) errln("ERROR: setShortWeekdays() failed"); } + const UnicodeString *wideWeekdays = en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE); + fr2.setWeekdays(wideWeekdays, count, DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE); + if( *en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE) != + *fr2.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::WIDE )) { + errln("ERROR: setWeekdays(FORMAT,WIDE) failed"); + } + + const UnicodeString *abbrWeekdays = en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED); + fr2.setWeekdays(abbrWeekdays, count, DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED); + if( *en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED) != + *fr2.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::ABBREVIATED )) { + errln("ERROR: setWeekdays(FORMAT,ABBREVIATED) failed"); + } + + const UnicodeString *narrowWeekdays = en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW); + fr.setWeekdays(narrowWeekdays, count, DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW); + if( *en.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW) != + *fr.getWeekdays(count,DateFormatSymbols::FORMAT,DateFormatSymbols::NARROW )) { + errln("ERROR: setWeekdays(FORMAT,NARROW) failed"); + } + + const UnicodeString *standaloneWideWeekdays = en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE); + fr.setWeekdays(standaloneWideWeekdays, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE); + if( *en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE) != + *fr.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::WIDE )) { + errln("ERROR: setWeekdays(STANDALONE,WIDE) failed"); + } + + const UnicodeString *standaloneShortWeekdays = en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED); + fr.setWeekdays(standaloneShortWeekdays, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED); + if( *en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED) != + *fr.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::ABBREVIATED )) { + errln("ERROR: setWeekdays(STANDALONE,ABBREVIATED) failed"); + } + + const UnicodeString *standaloneNarrowWeekdays = en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW); + fr.setWeekdays(standaloneNarrowWeekdays, count, DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW); + if( *en.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW) != + *fr.getWeekdays(count,DateFormatSymbols::STANDALONE,DateFormatSymbols::NARROW )) { + errln("ERROR: setWeekdays(STANDALONE,NARROW) failed"); + } + + const UnicodeString *wideQuarters = en.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::WIDE); + fr2.setQuarters(wideQuarters, count, DateFormatSymbols::FORMAT, DateFormatSymbols::WIDE); + if( *en.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::WIDE) != + *fr2.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::WIDE )) { + errln("ERROR: setQuarters(FORMAT, WIDE) failed"); + } + + const UnicodeString *abbrQuarters = en.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::ABBREVIATED); + fr2.setQuarters(abbrQuarters, count, DateFormatSymbols::FORMAT, DateFormatSymbols::ABBREVIATED); + if( *en.getQuarters(count,DateFormatSymbols::FORMAT, DateFormatSymbols::ABBREVIATED) != + *fr2.getQuarters(count,DateFormatSymbols::FORMAT ,DateFormatSymbols::ABBREVIATED )) { + errln("ERROR: setQuarters(FORMAT, ABBREVIATED) failed"); + } + + const UnicodeString *standaloneWideQuarters = en.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::WIDE); + fr.setQuarters(standaloneWideQuarters, count, DateFormatSymbols::STANDALONE, DateFormatSymbols::WIDE); + if( *en.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::WIDE) != + *fr.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::WIDE )) { + errln("ERROR: setQuarters(STANDALONE, WIDE) failed"); + } + + const UnicodeString *standaloneShortQuarters = en.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::ABBREVIATED); + fr.setQuarters(standaloneShortQuarters, count, DateFormatSymbols::STANDALONE, DateFormatSymbols::ABBREVIATED); + if( *en.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::ABBREVIATED) != + *fr.getQuarters(count,DateFormatSymbols::STANDALONE, DateFormatSymbols::ABBREVIATED )) { + errln("ERROR: setQuarters(STANDALONE, ABBREVIATED) failed"); + } + const UnicodeString *ampms = en.getAmPmStrings(count); fr.setAmPmStrings(ampms, count); if( *en.getAmPmStrings(count) != *fr.getAmPmStrings(count)) { @@ -152,8 +333,11 @@ void IntlTestDateFormatSymbols::testSymbols(/* char *par */) en = fr; - if(en != fr || foo != bar) { - errln("ERROR: Copy Constructor or Assignment failed"); + if(en != fr) { + errln("ERROR: Assignment operator failed"); + } + if(foo != bar) { + errln("ERROR: Copy Constructor failed"); } } diff --git a/Build/source/libs/icu-xetex/test/intltest/tsdtfmsy.h b/Build/source/libs/icu-xetex/test/intltest/tsdtfmsy.h index fc0f8feaeac..d289ba4f751 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tsdtfmsy.h +++ b/Build/source/libs/icu-xetex/test/intltest/tsdtfmsy.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2001, International Business Machines Corporation and + * Copyright (c) 1997-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -23,11 +23,15 @@ private: /** * Test the API of DateFormatSymbols; primarily a simple get/set set. */ - void testSymbols(/* char *par */); + void TestSymbols(/* char *par */); /** * Test getMonths. */ void TestGetMonths(void); + void TestGetMonths2(void); + + void TestGetWeekdays2(void); + void TestGetEraNames(void); }; #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/Build/source/libs/icu-xetex/test/intltest/tsmthred.cpp b/Build/source/libs/icu-xetex/test/intltest/tsmthred.cpp index c84f3edbfe8..05b2959751c 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tsmthred.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tsmthred.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1999-2005, International Business Machines Corporation and + * Copyright (c) 1999-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -88,7 +88,7 @@ MultithreadTest::~MultithreadTest() #if (ICU_USE_THREADS==0) void MultithreadTest::runIndexedTest( int32_t index, UBool exec, - const char* &name, char* par ) { + const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite MultithreadTest: "); if(index == 0) @@ -551,6 +551,7 @@ void MultithreadTest::TestThreads() { char threadTestChars[THREADTEST_NRTHREADS + 1]; SimpleThread *threads[THREADTEST_NRTHREADS]; + int32_t numThreadsStarted = 0; int32_t i; for(i=0;i<THREADTEST_NRTHREADS;i++) @@ -566,11 +567,18 @@ void MultithreadTest::TestThreads() if (threads[i]->start() != 0) { errln("Error starting thread %d", i); } + else { + numThreadsStarted++; + } SimpleThread::sleep(100); logln(" Subthread started."); } logln("Waiting for threads to be set.."); + if (numThreadsStarted == 0) { + errln("No threads could be started for testing!"); + return; + } int32_t patience = 40; // seconds to wait @@ -665,9 +673,19 @@ void MultithreadTest::TestMutex() umtx_lock(&gTestMutexA); TestMutexThread *threads[TESTMUTEX_THREAD_COUNT]; int i; + int32_t numThreadsStarted = 0; for (i=0; i<TESTMUTEX_THREAD_COUNT; i++) { threads[i] = new TestMutexThread; - threads[i]->start(); + if (threads[i]->start() != 0) { + errln("Error starting thread %d", i); + } + else { + numThreadsStarted++; + } + } + if (numThreadsStarted == 0) { + errln("No threads could be started for testing!"); + return; } int patience = 0; @@ -1153,7 +1171,7 @@ cleanupAndReturn: #if !UCONFIG_NO_COLLATION #define kCollatorThreadThreads 10 // # of threads to spawn -#define kCollatorThreadPatience kCollatorThreadThreads*100 +#define kCollatorThreadPatience kCollatorThreadThreads*30 struct Line { UChar buff[25]; @@ -1287,7 +1305,7 @@ void MultithreadTest::TestCollators() "INFO: Working with the stub file.\n" "If you need the full conformance test, please\n" "download the appropriate data files from:\n" - "http://oss.software.ibm.com/cvs/icu4j/unicodetools/com/ibm/text/data/"); + "http://dev.icu-project.org/cgi-bin/viewcvs.cgi/unicodetools/com/ibm/text/data/"); } } } @@ -1303,7 +1321,7 @@ void MultithreadTest::TestCollators() while (fgets(buffer, 1024, testFile) != NULL) { offset = 0; - if(*buffer == 0 || buffer[0] == '#') { + if(*buffer == 0 || strlen(buffer) < 3 || buffer[0] == '#') { continue; } offset = u_parseString(buffer, bufferU, 1024, &first, &status); @@ -1315,8 +1333,10 @@ void MultithreadTest::TestCollators() lineNum++; } fclose(testFile); - - + if(U_FAILURE(status)) { + errln("Couldn't read the test file!"); + return; + } UCollator *coll = ucol_open("root", &status); if(U_FAILURE(status)) { @@ -1350,9 +1370,12 @@ void MultithreadTest::TestCollators() noSpawned++; } logln("Spawned all"); + if (noSpawned == 0) { + errln("No threads could be spawned."); + return; + } - //for(int32_t patience = kCollatorThreadPatience;patience > 0; patience --) - for(;;) + for(int32_t patience = kCollatorThreadPatience;patience > 0; patience --) { logln("Waiting..."); diff --git a/Build/source/libs/icu-xetex/test/intltest/tsputil.cpp b/Build/source/libs/icu-xetex/test/intltest/tsputil.cpp index c590fee31da..1f4b66ee218 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tsputil.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tsputil.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -203,11 +203,14 @@ PUtilTest::maxMinTest(double a, double b, double exp, UBool max) errln(UnicodeString("FAIL: max(") + a + ", " + b + ") is " + result + ", expected " + exp); else errln(UnicodeString("FAIL: min(") + a + ", " + b + ") is " + result + ", expected " + exp); - else - if(max) - logln(UnicodeString("OK: max(") + a + ", " + b + ") is " + result); - else - logln(UnicodeString("OK: min(") + a + ", " + b + ") is " + result); + else { + if (verbose) { + if(max) + logln(UnicodeString("OK: max(") + a + ", " + b + ") is " + result); + else + logln(UnicodeString("OK: min(") + a + ", " + b + ") is " + result); + } + } } //============================== diff --git a/Build/source/libs/icu-xetex/test/intltest/tstnorm.cpp b/Build/source/libs/icu-xetex/test/intltest/tstnorm.cpp index 65373814ef0..56dc2645797 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tstnorm.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tstnorm.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -1286,6 +1286,7 @@ BasicNormalizerTest::FindFoldFCDExceptions() { /* * Hardcoded "NF* Skippable" sets, generated from * Mark Davis' com.ibm.text.UCD.NFSkippable (see ICU4J CVS, module unicodetools). + * Run com.ibm.text.UCD.Main with the option NFSkippable. * * Must be updated for each Unicode version. */ @@ -1306,44 +1307,46 @@ initExpectedSkippables(UnicodeSet skipSets[UNORM_MODE_COUNT]) { "\\u040C-\\u040E\\u0419\\u0439\\u0450\\u0451\\u0453\\u0457\\u045C" "-\\u045E\\u0476\\u0477\\u0483-\\u0486\\u04C1\\u04C2\\u04D0-" "\\u04D3\\u04D6\\u04D7\\u04DA-\\u04DF\\u04E2-\\u04E7\\u04EA-" - "\\u04F5\\u04F8\\u04F9\\u0591-\\u05B9\\u05BB-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4" - "\\u05C5\\u05C7\\u0610-\\u0615\\u0622-\\u0626\\u064B-\\u065E\\u0670" - "\\u06C0\\u06C2\\u06D3\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7" - "\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u0929\\u0931" - "\\u0934\\u093C\\u094D\\u0951-\\u0954\\u0958-\\u095F\\u09BC" - "\\u09CB-\\u09CD\\u09DC\\u09DD\\u09DF\\u0A33\\u0A36\\u0A3C\\u0A4D" - "\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C\\u0B48\\u0B4B-" - "\\u0B4D\\u0B5C\\u0B5D\\u0B94\\u0BCA-\\u0BCD\\u0C48\\u0C4D\\u0C55" - "\\u0C56\\u0CBC\\u0CC0\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CCD\\u0D4A-" - "\\u0D4D\\u0DCA\\u0DDA\\u0DDC-\\u0DDE\\u0E38-\\u0E3A\\u0E48-" - "\\u0E4B\\u0EB8\\u0EB9\\u0EC8-\\u0ECB\\u0F18\\u0F19\\u0F35\\u0F37" - "\\u0F39\\u0F43\\u0F4D\\u0F52\\u0F57\\u0F5C\\u0F69\\u0F71-\\u0F76" - "\\u0F78\\u0F7A-\\u0F7D\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F93" - "\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9\\u0FC6\\u1026\\u1037\\u1039" - "\\u135F\\u1714\\u1734\\u17D2\\u17DD\\u18A9\\u1939-\\u193B\\u1A17" - "\\u1A18\\u1DC0-\\u1DC3\\u1E00-\\u1E99\\u1E9B\\u1EA0-\\u1EF9" - "\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D" - "\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-" - "\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC1-\\u1FC4\\u1FC6-\\u1FD3" - "\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFD" - "\\u2000\\u2001\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EB\\u2126" - "\\u212A\\u212B\\u219A\\u219B\\u21AE\\u21CD-\\u21CF\\u2204\\u2209" - "\\u220C\\u2224\\u2226\\u2241\\u2244\\u2247\\u2249\\u2260\\u2262" - "\\u226D-\\u2271\\u2274\\u2275\\u2278\\u2279\\u2280\\u2281\\u2284" - "\\u2285\\u2288\\u2289\\u22AC-\\u22AF\\u22E0-\\u22E3\\u22EA-" - "\\u22ED\\u2329\\u232A\\u2ADC\\u302A-\\u302F\\u304C\\u304E\\u3050" - "\\u3052\\u3054\\u3056\\u3058\\u305A\\u305C\\u305E\\u3060\\u3062" - "\\u3065\\u3067\\u3069\\u3070\\u3071\\u3073\\u3074\\u3076\\u3077" - "\\u3079\\u307A\\u307C\\u307D\\u3094\\u3099\\u309A\\u309E\\u30AC" - "\\u30AE\\u30B0\\u30B2\\u30B4\\u30B6\\u30B8\\u30BA\\u30BC\\u30BE" - "\\u30C0\\u30C2\\u30C5\\u30C7\\u30C9\\u30D0\\u30D1\\u30D3\\u30D4" - "\\u30D6\\u30D7\\u30D9\\u30DA\\u30DC\\u30DD\\u30F4\\u30F7-\\u30FA" - "\\u30FE\\uA806\\uAC00-\\uD7A3\\uF900-\\uFA0D\\uFA10\\uFA12" - "\\uFA15-\\uFA1E\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A-\\uFA2D" - "\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB1D-\\uFB1F\\uFB2A-\\uFB36" - "\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-" - "\\uFB4E\\uFE20-\\uFE23\\U00010A0D\\U00010A0F\\U00010A38-\\U00010" - "A3A\\U00010A3F\\U0001D15E-\\U0001D169\\U0001D16D-\\U0001D172" + "\\u04F5\\u04F8\\u04F9\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4" + "\\u05C5\\u05C7\\u0610-\\u0615\\u0622-\\u0626\\u064B-\\u065E" + "\\u0670\\u06C0\\u06C2\\u06D3\\u06D6-\\u06DC\\u06DF-\\u06E4" + "\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07EB-" + "\\u07F3\\u0929\\u0931\\u0934\\u093C\\u094D\\u0951-\\u0954\\u0958" + "-\\u095F\\u09BC\\u09CB-\\u09CD\\u09DC\\u09DD\\u09DF\\u0A33" + "\\u0A36\\u0A3C\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C" + "\\u0B48\\u0B4B-\\u0B4D\\u0B5C\\u0B5D\\u0B94\\u0BCA-\\u0BCD" + "\\u0C48\\u0C4D\\u0C55\\u0C56\\u0CBC\\u0CC0\\u0CC7\\u0CC8\\u0CCA" + "\\u0CCB\\u0CCD\\u0D4A-\\u0D4D\\u0DCA\\u0DDA\\u0DDC-\\u0DDE" + "\\u0E38-\\u0E3A\\u0E48-\\u0E4B\\u0EB8\\u0EB9\\u0EC8-\\u0ECB" + "\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F43\\u0F4D\\u0F52\\u0F57" + "\\u0F5C\\u0F69\\u0F71-\\u0F76\\u0F78\\u0F7A-\\u0F7D\\u0F80-" + "\\u0F84\\u0F86\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9" + "\\u0FC6\\u1026\\u1037\\u1039\\u135F\\u1714\\u1734\\u17D2\\u17DD" + "\\u18A9\\u1939-\\u193B\\u1A17\\u1A18\\u1B06\\u1B08\\u1B0A\\u1B0C" + "\\u1B0E\\u1B12\\u1B34\\u1B3B\\u1B3D\\u1B40\\u1B41\\u1B43\\u1B44" + "\\u1B6B-\\u1B73\\u1DC0-\\u1DCA\\u1DFE-\\u1E99\\u1E9B\\u1EA0-" + "\\u1EF9\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-" + "\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D" + "\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC1-\\u1FC4\\u1FC6-" + "\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-" + "\\u1FFD\\u2000\\u2001\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EF" + "\\u2126\\u212A\\u212B\\u219A\\u219B\\u21AE\\u21CD-\\u21CF\\u2204" + "\\u2209\\u220C\\u2224\\u2226\\u2241\\u2244\\u2247\\u2249\\u2260" + "\\u2262\\u226D-\\u2271\\u2274\\u2275\\u2278\\u2279\\u2280\\u2281" + "\\u2284\\u2285\\u2288\\u2289\\u22AC-\\u22AF\\u22E0-\\u22E3" + "\\u22EA-\\u22ED\\u2329\\u232A\\u2ADC\\u302A-\\u302F\\u304C" + "\\u304E\\u3050\\u3052\\u3054\\u3056\\u3058\\u305A\\u305C\\u305E" + "\\u3060\\u3062\\u3065\\u3067\\u3069\\u3070\\u3071\\u3073\\u3074" + "\\u3076\\u3077\\u3079\\u307A\\u307C\\u307D\\u3094\\u3099\\u309A" + "\\u309E\\u30AC\\u30AE\\u30B0\\u30B2\\u30B4\\u30B6\\u30B8\\u30BA" + "\\u30BC\\u30BE\\u30C0\\u30C2\\u30C5\\u30C7\\u30C9\\u30D0\\u30D1" + "\\u30D3\\u30D4\\u30D6\\u30D7\\u30D9\\u30DA\\u30DC\\u30DD\\u30F4" + "\\u30F7-\\u30FA\\u30FE\\uA806\\uAC00-\\uD7A3\\uF900-\\uFA0D" + "\\uFA10\\uFA12\\uFA15-\\uFA1E\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A" + "-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB1D-\\uFB1F\\uFB2A-" + "\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46" + "-\\uFB4E\\uFE20-\\uFE23\\U00010A0D\\U00010A0F\\U00010A38-\\U0001" + "0A3A\\U00010A3F\\U0001D15E-\\U0001D169\\U0001D16D-\\U0001D172" "\\U0001D17B-\\U0001D182\\U0001D185-\\U0001D18B\\U0001D1AA-" "\\U0001D1AD\\U0001D1BB-\\U0001D1C0\\U0001D242-\\U0001D244\\U0002" "F800-\\U0002FA1D]" @@ -1365,24 +1368,26 @@ initExpectedSkippables(UnicodeSet skipSets[UNORM_MODE_COUNT]) { "\\u0410\\u0413\\u0415-\\u0418\\u041A\\u041E\\u0423\\u0427\\u042B" "\\u042D\\u0430\\u0433\\u0435-\\u0438\\u043A\\u043E\\u0443\\u0447" "\\u044B\\u044D\\u0456\\u0474\\u0475\\u0483-\\u0486\\u04D8\\u04D9" - "\\u04E8\\u04E9\\u0591-\\u05B9\\u05BB-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7" - "\\u0610-\\u0615\\u0622\\u0623\\u0627\\u0648\\u064A-\\u065E" - "\\u0670\\u06C1\\u06D2\\u06D5-\\u06DC\\u06DF-\\u06E4\\u06E7" - "\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u0928\\u0930" - "\\u0933\\u093C\\u094D\\u0951-\\u0954\\u0958-\\u095F\\u09BC" - "\\u09BE\\u09C7\\u09CD\\u09D7\\u09DC\\u09DD\\u09DF\\u0A33\\u0A36" - "\\u0A3C\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C\\u0B3E" - "\\u0B47\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B92\\u0BBE\\u0BC6" - "\\u0BC7\\u0BCD\\u0BD7\\u0C46\\u0C4D\\u0C55\\u0C56\\u0CBC\\u0CBF" - "\\u0CC2\\u0CC6\\u0CCA\\u0CCD\\u0CD5\\u0CD6\\u0D3E\\u0D46\\u0D47" - "\\u0D4D\\u0D57\\u0DCA\\u0DCF\\u0DD9\\u0DDC\\u0DDF\\u0E38-\\u0E3A" - "\\u0E48-\\u0E4B\\u0EB8\\u0EB9\\u0EC8-\\u0ECB\\u0F18\\u0F19" - "\\u0F35\\u0F37\\u0F39\\u0F43\\u0F4D\\u0F52\\u0F57\\u0F5C\\u0F69" - "\\u0F71-\\u0F76\\u0F78\\u0F7A-\\u0F7D\\u0F80-\\u0F84\\u0F86" - "\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9\\u0FC6\\u1025" - "\\u102E\\u1037\\u1039\\u1100-\\u1112\\u1161-\\u1175\\u11A8-" - "\\u11C2\\u135F\\u1714\\u1734\\u17D2\\u17DD\\u18A9\\u1939-\\u193B" - "\\u1A17\\u1A18\\u1DC0-\\u1DC3\\u1E00-\\u1E03\\u1E0A-\\u1E0F" + "\\u04E8\\u04E9\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5" + "\\u05C7\\u0610-\\u0615\\u0622\\u0623\\u0627\\u0648\\u064A-" + "\\u065E\\u0670\\u06C1\\u06D2\\u06D5-\\u06DC\\u06DF-\\u06E4" + "\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07EB-" + "\\u07F3\\u0928\\u0930\\u0933\\u093C\\u094D\\u0951-\\u0954\\u0958" + "-\\u095F\\u09BC\\u09BE\\u09C7\\u09CD\\u09D7\\u09DC\\u09DD\\u09DF" + "\\u0A33\\u0A36\\u0A3C\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD" + "\\u0B3C\\u0B3E\\u0B47\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B92" + "\\u0BBE\\u0BC6\\u0BC7\\u0BCD\\u0BD7\\u0C46\\u0C4D\\u0C55\\u0C56" + "\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCA\\u0CCD\\u0CD5\\u0CD6\\u0D3E" + "\\u0D46\\u0D47\\u0D4D\\u0D57\\u0DCA\\u0DCF\\u0DD9\\u0DDC\\u0DDF" + "\\u0E38-\\u0E3A\\u0E48-\\u0E4B\\u0EB8\\u0EB9\\u0EC8-\\u0ECB" + "\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F43\\u0F4D\\u0F52\\u0F57" + "\\u0F5C\\u0F69\\u0F71-\\u0F76\\u0F78\\u0F7A-\\u0F7D\\u0F80-" + "\\u0F84\\u0F86\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9" + "\\u0FC6\\u1025\\u102E\\u1037\\u1039\\u1100-\\u1112\\u1161-" + "\\u1175\\u11A8-\\u11C2\\u135F\\u1714\\u1734\\u17D2\\u17DD\\u18A9" + "\\u1939-\\u193B\\u1A17\\u1A18\\u1B05\\u1B07\\u1B09\\u1B0B\\u1B0D" + "\\u1B11\\u1B34\\u1B35\\u1B3A\\u1B3C\\u1B3E\\u1B3F\\u1B42\\u1B44" + "\\u1B6B-\\u1B73\\u1DC0-\\u1DCA\\u1DFE-\\u1E03\\u1E0A-\\u1E0F" "\\u1E12-\\u1E1B\\u1E20-\\u1E27\\u1E2A-\\u1E41\\u1E44-\\u1E53" "\\u1E58-\\u1E7D\\u1E80-\\u1E87\\u1E8E-\\u1E91\\u1E96-\\u1E99" "\\u1EA0-\\u1EF3\\u1EF6-\\u1EF9\\u1F00-\\u1F11\\u1F18\\u1F19" @@ -1392,7 +1397,7 @@ initExpectedSkippables(UnicodeSet skipSets[UNORM_MODE_COUNT]) { "\\u1F99\\u1FA0\\u1FA1\\u1FA8\\u1FA9\\u1FB3\\u1FB6\\u1FBB\\u1FBC" "\\u1FBE\\u1FBF\\u1FC3\\u1FC6\\u1FC9\\u1FCB\\u1FCC\\u1FD3\\u1FDB" "\\u1FE3\\u1FEB\\u1FEE\\u1FEF\\u1FF3\\u1FF6\\u1FF9\\u1FFB-\\u1FFE" - "\\u2000\\u2001\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EB\\u2126" + "\\u2000\\u2001\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EF\\u2126" "\\u212A\\u212B\\u2190\\u2192\\u2194\\u21D0\\u21D2\\u21D4\\u2203" "\\u2208\\u220B\\u2223\\u2225\\u223C\\u2243\\u2245\\u2248\\u224D" "\\u2261\\u2264\\u2265\\u2272\\u2273\\u2276\\u2277\\u227A-\\u227D" @@ -1474,50 +1479,189 @@ initExpectedSkippables(UnicodeSet skipSets[UNORM_MODE_COUNT]) { "\\u0450\\u0451\\u0453\\u0457\\u045C-\\u045E\\u0476\\u0477\\u0483" "-\\u0486\\u04C1\\u04C2\\u04D0-\\u04D3\\u04D6\\u04D7\\u04DA-" "\\u04DF\\u04E2-\\u04E7\\u04EA-\\u04F5\\u04F8\\u04F9\\u0587" - "\\u0591-\\u05B9\\u05BB-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-" - "\\u0615\\u0622-\\u0626\\u064B-\\u065E\\u0670\\u0675-\\u0678" + "\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610" + "-\\u0615\\u0622-\\u0626\\u064B-\\u065E\\u0670\\u0675-\\u0678" "\\u06C0\\u06C2\\u06D3\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7" - "\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u0929\\u0931" - "\\u0934\\u093C\\u094D\\u0951-\\u0954\\u0958-\\u095F\\u09BC" - "\\u09CB-\\u09CD\\u09DC\\u09DD\\u09DF\\u0A33\\u0A36\\u0A3C\\u0A4D" - "\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C\\u0B48\\u0B4B-" - "\\u0B4D\\u0B5C\\u0B5D\\u0B94\\u0BCA-\\u0BCD\\u0C48\\u0C4D\\u0C55" - "\\u0C56\\u0CBC\\u0CC0\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CCD\\u0D4A-" - "\\u0D4D\\u0DCA\\u0DDA\\u0DDC-\\u0DDE\\u0E33\\u0E38-\\u0E3A" + "\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07EB-\\u07F3" + "\\u0929\\u0931\\u0934\\u093C\\u094D\\u0951-\\u0954\\u0958-" + "\\u095F\\u09BC\\u09CB-\\u09CD\\u09DC\\u09DD\\u09DF\\u0A33\\u0A36" + "\\u0A3C\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C\\u0B48" + "\\u0B4B-\\u0B4D\\u0B5C\\u0B5D\\u0B94\\u0BCA-\\u0BCD\\u0C48" + "\\u0C4D\\u0C55\\u0C56\\u0CBC\\u0CC0\\u0CC7\\u0CC8\\u0CCA\\u0CCB" + "\\u0CCD\\u0D4A-\\u0D4D\\u0DCA\\u0DDA\\u0DDC-\\u0DDE\\u0E33" + "\\u0E38-\\u0E3A\\u0E48-\\u0E4B\\u0EB3\\u0EB8\\u0EB9\\u0EC8-" + "\\u0ECB\\u0EDC\\u0EDD\\u0F0C\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39" + "\\u0F43\\u0F4D\\u0F52\\u0F57\\u0F5C\\u0F69\\u0F71-\\u0F7D\\u0F80" + "-\\u0F84\\u0F86\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9" + "\\u0FC6\\u1026\\u1037\\u1039\\u10FC\\u135F\\u1714\\u1734\\u17D2" + "\\u17DD\\u18A9\\u1939-\\u193B\\u1A17\\u1A18\\u1B06\\u1B08\\u1B0A" + "\\u1B0C\\u1B0E\\u1B12\\u1B34\\u1B3B\\u1B3D\\u1B40\\u1B41\\u1B43" + "\\u1B44\\u1B6B-\\u1B73\\u1D2C-\\u1D2E\\u1D30-\\u1D3A\\u1D3C-" + "\\u1D4D\\u1D4F-\\u1D6A\\u1D78\\u1D9B-\\u1DCA\\u1DFE-\\u1E9B" + "\\u1EA0-\\u1EF9\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45" + "\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-" + "\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-\\u1FD3\\u1FD6-" + "\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFE\\u2000-" + "\\u200A\\u2011\\u2017\\u2024-\\u2026\\u202F\\u2033\\u2034\\u2036" + "\\u2037\\u203C\\u203E\\u2047-\\u2049\\u2057\\u205F\\u2070\\u2071" + "\\u2074-\\u208E\\u2090-\\u2094\\u20A8\\u20D0-\\u20DC\\u20E1" + "\\u20E5-\\u20EF\\u2100-\\u2103\\u2105-\\u2107\\u2109-\\u2113" + "\\u2115\\u2116\\u2119-\\u211D\\u2120-\\u2122\\u2124\\u2126" + "\\u2128\\u212A-\\u212D\\u212F-\\u2131\\u2133-\\u2139\\u213B-" + "\\u2140\\u2145-\\u2149\\u2153-\\u217F\\u219A\\u219B\\u21AE" + "\\u21CD-\\u21CF\\u2204\\u2209\\u220C\\u2224\\u2226\\u222C\\u222D" + "\\u222F\\u2230\\u2241\\u2244\\u2247\\u2249\\u2260\\u2262\\u226D-" + "\\u2271\\u2274\\u2275\\u2278\\u2279\\u2280\\u2281\\u2284\\u2285" + "\\u2288\\u2289\\u22AC-\\u22AF\\u22E0-\\u22E3\\u22EA-\\u22ED" + "\\u2329\\u232A\\u2460-\\u24EA\\u2A0C\\u2A74-\\u2A76\\u2ADC" + "\\u2D6F\\u2E9F\\u2EF3\\u2F00-\\u2FD5\\u3000\\u302A-\\u302F" + "\\u3036\\u3038-\\u303A\\u304C\\u304E\\u3050\\u3052\\u3054\\u3056" + "\\u3058\\u305A\\u305C\\u305E\\u3060\\u3062\\u3065\\u3067\\u3069" + "\\u3070\\u3071\\u3073\\u3074\\u3076\\u3077\\u3079\\u307A\\u307C" + "\\u307D\\u3094\\u3099-\\u309C\\u309E\\u309F\\u30AC\\u30AE\\u30B0" + "\\u30B2\\u30B4\\u30B6\\u30B8\\u30BA\\u30BC\\u30BE\\u30C0\\u30C2" + "\\u30C5\\u30C7\\u30C9\\u30D0\\u30D1\\u30D3\\u30D4\\u30D6\\u30D7" + "\\u30D9\\u30DA\\u30DC\\u30DD\\u30F4\\u30F7-\\u30FA\\u30FE\\u30FF" + "\\u3131-\\u318E\\u3192-\\u319F\\u3200-\\u321E\\u3220-\\u3243" + "\\u3250-\\u327E\\u3280-\\u32FE\\u3300-\\u33FF\\uA806\\uAC00-" + "\\uD7A3\\uF900-\\uFA0D\\uFA10\\uFA12\\uFA15-\\uFA1E\\uFA20" + "\\uFA22\\uFA25\\uFA26\\uFA2A-\\uFA2D\\uFA30-\\uFA6A\\uFA70-" + "\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB36\\uFB38-" + "\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3" + "-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE10-" + "\\uFE19\\uFE20-\\uFE23\\uFE30-\\uFE44\\uFE47-\\uFE52\\uFE54-" + "\\uFE66\\uFE68-\\uFE6B\\uFE70-\\uFE72\\uFE74\\uFE76-\\uFEFC" + "\\uFF01-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7" + "\\uFFDA-\\uFFDC\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\U00010A0D\\U00010" + "A0F\\U00010A38-\\U00010A3A\\U00010A3F\\U0001D15E-\\U0001D169" + "\\U0001D16D-\\U0001D172\\U0001D17B-\\U0001D182\\U0001D185-" + "\\U0001D18B\\U0001D1AA-\\U0001D1AD\\U0001D1BB-\\U0001D1C0\\U0001" + "D242-\\U0001D244\\U0001D400-\\U0001D454\\U0001D456-\\U0001D49C" + "\\U0001D49E\\U0001D49F\\U0001D4A2\\U0001D4A5\\U0001D4A6\\U0001D4" + "A9-\\U0001D4AC\\U0001D4AE-\\U0001D4B9\\U0001D4BB\\U0001D4BD-" + "\\U0001D4C3\\U0001D4C5-\\U0001D505\\U0001D507-\\U0001D50A\\U0001" + "D50D-\\U0001D514\\U0001D516-\\U0001D51C\\U0001D51E-\\U0001D539" + "\\U0001D53B-\\U0001D53E\\U0001D540-\\U0001D544\\U0001D546\\U0001" + "D54A-\\U0001D550\\U0001D552-\\U0001D6A5\\U0001D6A8-\\U0001D7CB" + "\\U0001D7CE-\\U0001D7FF\\U0002F800-\\U0002FA1D]" + , ""), errorCode); + + skipSets[UNORM_NFKC].applyPattern(UnicodeString( + "[^<->A-PR-Za-pr-z\\u00A0\\u00A8\\u00AA\\u00AF\\u00B2-\\u00B5" + "\\u00B8-\\u00BA\\u00BC-\\u00BE\\u00C0-\\u00CF\\u00D1-\\u00D6" + "\\u00D8-\\u00DD\\u00E0-\\u00EF\\u00F1-\\u00F6\\u00F8-\\u00FD" + "\\u00FF-\\u0103\\u0106-\\u010F\\u0112-\\u0117\\u011A-\\u0121" + "\\u0124\\u0125\\u0128-\\u012D\\u0130\\u0132\\u0133\\u0139\\u013A" + "\\u013D-\\u0140\\u0143\\u0144\\u0147-\\u0149\\u014C-\\u0151" + "\\u0154\\u0155\\u0158-\\u015D\\u0160\\u0161\\u0164\\u0165\\u0168" + "-\\u0171\\u0174-\\u017F\\u01A0\\u01A1\\u01AF\\u01B0\\u01B7" + "\\u01C4-\\u01DC\\u01DE-\\u01E1\\u01E6-\\u01EB\\u01F1-\\u01F5" + "\\u01F8-\\u01FB\\u0200-\\u021B\\u021E\\u021F\\u0226-\\u0233" + "\\u0292\\u02B0-\\u02B8\\u02D8-\\u02DD\\u02E0-\\u02E4\\u0300-" + "\\u034E\\u0350-\\u036F\\u0374\\u037A\\u037E\\u0384\\u0385\\u0387" + "\\u0391\\u0395\\u0397\\u0399\\u039F\\u03A1\\u03A5\\u03A9\\u03AC" + "\\u03AE\\u03B1\\u03B5\\u03B7\\u03B9\\u03BF\\u03C1\\u03C5\\u03C9-" + "\\u03CB\\u03CE\\u03D0-\\u03D6\\u03F0-\\u03F2\\u03F4\\u03F5" + "\\u03F9\\u0406\\u0410\\u0413\\u0415-\\u0418\\u041A\\u041E\\u0423" + "\\u0427\\u042B\\u042D\\u0430\\u0433\\u0435-\\u0438\\u043A\\u043E" + "\\u0443\\u0447\\u044B\\u044D\\u0456\\u0474\\u0475\\u0483-\\u0486" + "\\u04D8\\u04D9\\u04E8\\u04E9\\u0587\\u0591-\\u05BD\\u05BF\\u05C1" + "\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u0615\\u0622\\u0623\\u0627" + "\\u0648\\u064A-\\u065E\\u0670\\u0675-\\u0678\\u06C1\\u06D2" + "\\u06D5-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED" + "\\u0711\\u0730-\\u074A\\u07EB-\\u07F3\\u0928\\u0930\\u0933" + "\\u093C\\u094D\\u0951-\\u0954\\u0958-\\u095F\\u09BC\\u09BE" + "\\u09C7\\u09CD\\u09D7\\u09DC\\u09DD\\u09DF\\u0A33\\u0A36\\u0A3C" + "\\u0A4D\\u0A59-\\u0A5B\\u0A5E\\u0ABC\\u0ACD\\u0B3C\\u0B3E\\u0B47" + "\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B92\\u0BBE\\u0BC6\\u0BC7" + "\\u0BCD\\u0BD7\\u0C46\\u0C4D\\u0C55\\u0C56\\u0CBC\\u0CBF\\u0CC2" + "\\u0CC6\\u0CCA\\u0CCD\\u0CD5\\u0CD6\\u0D3E\\u0D46\\u0D47\\u0D4D" + "\\u0D57\\u0DCA\\u0DCF\\u0DD9\\u0DDC\\u0DDF\\u0E33\\u0E38-\\u0E3A" "\\u0E48-\\u0E4B\\u0EB3\\u0EB8\\u0EB9\\u0EC8-\\u0ECB\\u0EDC" "\\u0EDD\\u0F0C\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F43\\u0F4D" "\\u0F52\\u0F57\\u0F5C\\u0F69\\u0F71-\\u0F7D\\u0F80-\\u0F84" "\\u0F86\\u0F87\\u0F93\\u0F9D\\u0FA2\\u0FA7\\u0FAC\\u0FB9\\u0FC6" - "\\u1026\\u1037\\u1039\\u10FC\\u135F\\u1714\\u1734\\u17D2\\u17DD" - "\\u18A9\\u1939-\\u193B\\u1A17\\u1A18\\u1D2C-\\u1D2E\\u1D30-" - "\\u1D3A\\u1D3C-\\u1D4D\\u1D4F-\\u1D6A\\u1D78\\u1D9B-\\u1DC3" - "\\u1E00-\\u1E9B\\u1EA0-\\u1EF9\\u1F00-\\u1F15\\u1F18-\\u1F1D" - "\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B" - "\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-" - "\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-" - "\\u1FFE\\u2000-\\u200A\\u2011\\u2017\\u2024-\\u2026\\u202F" - "\\u2033\\u2034\\u2036\\u2037\\u203C\\u203E\\u2047-\\u2049\\u2057" - "\\u205F\\u2070\\u2071\\u2074-\\u208E\\u2090-\\u2094\\u20A8" - "\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EB\\u2100-\\u2103\\u2105-" - "\\u2107\\u2109-\\u2113\\u2115\\u2116\\u2119-\\u211D\\u2120-" - "\\u2122\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2131" - "\\u2133-\\u2139\\u213B-\\u2140\\u2145-\\u2149\\u2153-\\u217F" - "\\u219A\\u219B\\u21AE\\u21CD-\\u21CF\\u2204\\u2209\\u220C\\u2224" - "\\u2226\\u222C\\u222D\\u222F\\u2230\\u2241\\u2244\\u2247\\u2249" - "\\u2260\\u2262\\u226D-\\u2271\\u2274\\u2275\\u2278\\u2279\\u2280" - "\\u2281\\u2284\\u2285\\u2288\\u2289\\u22AC-\\u22AF\\u22E0-" - "\\u22E3\\u22EA-\\u22ED\\u2329\\u232A\\u2460-\\u24EA\\u2A0C" - "\\u2A74-\\u2A76\\u2ADC\\u2D6F\\u2E9F\\u2EF3\\u2F00-\\u2FD5" - "\\u3000\\u302A-\\u302F\\u3036\\u3038-\\u303A\\u304C\\u304E" - "\\u3050\\u3052\\u3054\\u3056\\u3058\\u305A\\u305C\\u305E\\u3060" - "\\u3062\\u3065\\u3067\\u3069\\u3070\\u3071\\u3073\\u3074\\u3076" - "\\u3077\\u3079\\u307A\\u307C\\u307D\\u3094\\u3099-\\u309C\\u309E" - "\\u309F\\u30AC\\u30AE\\u30B0\\u30B2\\u30B4\\u30B6\\u30B8\\u30BA" - "\\u30BC\\u30BE\\u30C0\\u30C2\\u30C5\\u30C7\\u30C9\\u30D0\\u30D1" - "\\u30D3\\u30D4\\u30D6\\u30D7\\u30D9\\u30DA\\u30DC\\u30DD\\u30F4" - "\\u30F7-\\u30FA\\u30FE\\u30FF\\u3131-\\u318E\\u3192-\\u319F" + "\\u1025\\u102E\\u1037\\u1039\\u10FC\\u1100-\\u1112\\u1161-" + "\\u1175\\u11A8-\\u11C2\\u135F\\u1714\\u1734\\u17D2\\u17DD\\u18A9" + "\\u1939-\\u193B\\u1A17\\u1A18\\u1B05\\u1B07\\u1B09\\u1B0B\\u1B0D" + "\\u1B11\\u1B34\\u1B35\\u1B3A\\u1B3C\\u1B3E\\u1B3F\\u1B42\\u1B44" + "\\u1B6B-\\u1B73\\u1D2C-\\u1D2E\\u1D30-\\u1D3A\\u1D3C-\\u1D4D" + "\\u1D4F-\\u1D6A\\u1D78\\u1D9B-\\u1DCA\\u1DFE-\\u1E03\\u1E0A-" + "\\u1E0F\\u1E12-\\u1E1B\\u1E20-\\u1E27\\u1E2A-\\u1E41\\u1E44-" + "\\u1E53\\u1E58-\\u1E7D\\u1E80-\\u1E87\\u1E8E-\\u1E91\\u1E96-" + "\\u1E9B\\u1EA0-\\u1EF3\\u1EF6-\\u1EF9\\u1F00-\\u1F11\\u1F18" + "\\u1F19\\u1F20-\\u1F31\\u1F38\\u1F39\\u1F40\\u1F41\\u1F48\\u1F49" + "\\u1F50\\u1F51\\u1F59\\u1F60-\\u1F71\\u1F73-\\u1F75\\u1F77" + "\\u1F79\\u1F7B-\\u1F7D\\u1F80\\u1F81\\u1F88\\u1F89\\u1F90\\u1F91" + "\\u1F98\\u1F99\\u1FA0\\u1FA1\\u1FA8\\u1FA9\\u1FB3\\u1FB6\\u1FBB-" + "\\u1FC1\\u1FC3\\u1FC6\\u1FC9\\u1FCB-\\u1FCF\\u1FD3\\u1FDB\\u1FDD" + "-\\u1FDF\\u1FE3\\u1FEB\\u1FED-\\u1FEF\\u1FF3\\u1FF6\\u1FF9" + "\\u1FFB-\\u1FFE\\u2000-\\u200A\\u2011\\u2017\\u2024-\\u2026" + "\\u202F\\u2033\\u2034\\u2036\\u2037\\u203C\\u203E\\u2047-\\u2049" + "\\u2057\\u205F\\u2070\\u2071\\u2074-\\u208E\\u2090-\\u2094" + "\\u20A8\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EF\\u2100-\\u2103" + "\\u2105-\\u2107\\u2109-\\u2113\\u2115\\u2116\\u2119-\\u211D" + "\\u2120-\\u2122\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-" + "\\u2131\\u2133-\\u2139\\u213B-\\u2140\\u2145-\\u2149\\u2153-" + "\\u217F\\u2190\\u2192\\u2194\\u21D0\\u21D2\\u21D4\\u2203\\u2208" + "\\u220B\\u2223\\u2225\\u222C\\u222D\\u222F\\u2230\\u223C\\u2243" + "\\u2245\\u2248\\u224D\\u2261\\u2264\\u2265\\u2272\\u2273\\u2276" + "\\u2277\\u227A-\\u227D\\u2282\\u2283\\u2286\\u2287\\u2291\\u2292" + "\\u22A2\\u22A8\\u22A9\\u22AB\\u22B2-\\u22B5\\u2329\\u232A\\u2460" + "-\\u24EA\\u2A0C\\u2A74-\\u2A76\\u2ADC\\u2D6F\\u2E9F\\u2EF3" + "\\u2F00-\\u2FD5\\u3000\\u302A-\\u302F\\u3036\\u3038-\\u303A" + "\\u3046\\u304B\\u304D\\u304F\\u3051\\u3053\\u3055\\u3057\\u3059" + "\\u305B\\u305D\\u305F\\u3061\\u3064\\u3066\\u3068\\u306F\\u3072" + "\\u3075\\u3078\\u307B\\u3099-\\u309D\\u309F\\u30A6\\u30AB\\u30AD" + "\\u30AF\\u30B1\\u30B3\\u30B5\\u30B7\\u30B9\\u30BB\\u30BD\\u30BF" + "\\u30C1\\u30C4\\u30C6\\u30C8\\u30CF\\u30D2\\u30D5\\u30D8\\u30DB" + "\\u30EF-\\u30F2\\u30FD\\u30FF\\u3131-\\u318E\\u3192-\\u319F" "\\u3200-\\u321E\\u3220-\\u3243\\u3250-\\u327E\\u3280-\\u32FE" - "\\u3300-\\u33FF\\uA806\\uAC00-\\uD7A3\\uF900-\\uFA0D\\uFA10" + "\\u3300-\\u33FF\\uA806\\uAC00\\uAC1C\\uAC38\\uAC54\\uAC70\\uAC8C" + "\\uACA8\\uACC4\\uACE0\\uACFC\\uAD18\\uAD34\\uAD50\\uAD6C\\uAD88" + "\\uADA4\\uADC0\\uADDC\\uADF8\\uAE14\\uAE30\\uAE4C\\uAE68\\uAE84" + "\\uAEA0\\uAEBC\\uAED8\\uAEF4\\uAF10\\uAF2C\\uAF48\\uAF64\\uAF80" + "\\uAF9C\\uAFB8\\uAFD4\\uAFF0\\uB00C\\uB028\\uB044\\uB060\\uB07C" + "\\uB098\\uB0B4\\uB0D0\\uB0EC\\uB108\\uB124\\uB140\\uB15C\\uB178" + "\\uB194\\uB1B0\\uB1CC\\uB1E8\\uB204\\uB220\\uB23C\\uB258\\uB274" + "\\uB290\\uB2AC\\uB2C8\\uB2E4\\uB300\\uB31C\\uB338\\uB354\\uB370" + "\\uB38C\\uB3A8\\uB3C4\\uB3E0\\uB3FC\\uB418\\uB434\\uB450\\uB46C" + "\\uB488\\uB4A4\\uB4C0\\uB4DC\\uB4F8\\uB514\\uB530\\uB54C\\uB568" + "\\uB584\\uB5A0\\uB5BC\\uB5D8\\uB5F4\\uB610\\uB62C\\uB648\\uB664" + "\\uB680\\uB69C\\uB6B8\\uB6D4\\uB6F0\\uB70C\\uB728\\uB744\\uB760" + "\\uB77C\\uB798\\uB7B4\\uB7D0\\uB7EC\\uB808\\uB824\\uB840\\uB85C" + "\\uB878\\uB894\\uB8B0\\uB8CC\\uB8E8\\uB904\\uB920\\uB93C\\uB958" + "\\uB974\\uB990\\uB9AC\\uB9C8\\uB9E4\\uBA00\\uBA1C\\uBA38\\uBA54" + "\\uBA70\\uBA8C\\uBAA8\\uBAC4\\uBAE0\\uBAFC\\uBB18\\uBB34\\uBB50" + "\\uBB6C\\uBB88\\uBBA4\\uBBC0\\uBBDC\\uBBF8\\uBC14\\uBC30\\uBC4C" + "\\uBC68\\uBC84\\uBCA0\\uBCBC\\uBCD8\\uBCF4\\uBD10\\uBD2C\\uBD48" + "\\uBD64\\uBD80\\uBD9C\\uBDB8\\uBDD4\\uBDF0\\uBE0C\\uBE28\\uBE44" + "\\uBE60\\uBE7C\\uBE98\\uBEB4\\uBED0\\uBEEC\\uBF08\\uBF24\\uBF40" + "\\uBF5C\\uBF78\\uBF94\\uBFB0\\uBFCC\\uBFE8\\uC004\\uC020\\uC03C" + "\\uC058\\uC074\\uC090\\uC0AC\\uC0C8\\uC0E4\\uC100\\uC11C\\uC138" + "\\uC154\\uC170\\uC18C\\uC1A8\\uC1C4\\uC1E0\\uC1FC\\uC218\\uC234" + "\\uC250\\uC26C\\uC288\\uC2A4\\uC2C0\\uC2DC\\uC2F8\\uC314\\uC330" + "\\uC34C\\uC368\\uC384\\uC3A0\\uC3BC\\uC3D8\\uC3F4\\uC410\\uC42C" + "\\uC448\\uC464\\uC480\\uC49C\\uC4B8\\uC4D4\\uC4F0\\uC50C\\uC528" + "\\uC544\\uC560\\uC57C\\uC598\\uC5B4\\uC5D0\\uC5EC\\uC608\\uC624" + "\\uC640\\uC65C\\uC678\\uC694\\uC6B0\\uC6CC\\uC6E8\\uC704\\uC720" + "\\uC73C\\uC758\\uC774\\uC790\\uC7AC\\uC7C8\\uC7E4\\uC800\\uC81C" + "\\uC838\\uC854\\uC870\\uC88C\\uC8A8\\uC8C4\\uC8E0\\uC8FC\\uC918" + "\\uC934\\uC950\\uC96C\\uC988\\uC9A4\\uC9C0\\uC9DC\\uC9F8\\uCA14" + "\\uCA30\\uCA4C\\uCA68\\uCA84\\uCAA0\\uCABC\\uCAD8\\uCAF4\\uCB10" + "\\uCB2C\\uCB48\\uCB64\\uCB80\\uCB9C\\uCBB8\\uCBD4\\uCBF0\\uCC0C" + "\\uCC28\\uCC44\\uCC60\\uCC7C\\uCC98\\uCCB4\\uCCD0\\uCCEC\\uCD08" + "\\uCD24\\uCD40\\uCD5C\\uCD78\\uCD94\\uCDB0\\uCDCC\\uCDE8\\uCE04" + "\\uCE20\\uCE3C\\uCE58\\uCE74\\uCE90\\uCEAC\\uCEC8\\uCEE4\\uCF00" + "\\uCF1C\\uCF38\\uCF54\\uCF70\\uCF8C\\uCFA8\\uCFC4\\uCFE0\\uCFFC" + "\\uD018\\uD034\\uD050\\uD06C\\uD088\\uD0A4\\uD0C0\\uD0DC\\uD0F8" + "\\uD114\\uD130\\uD14C\\uD168\\uD184\\uD1A0\\uD1BC\\uD1D8\\uD1F4" + "\\uD210\\uD22C\\uD248\\uD264\\uD280\\uD29C\\uD2B8\\uD2D4\\uD2F0" + "\\uD30C\\uD328\\uD344\\uD360\\uD37C\\uD398\\uD3B4\\uD3D0\\uD3EC" + "\\uD408\\uD424\\uD440\\uD45C\\uD478\\uD494\\uD4B0\\uD4CC\\uD4E8" + "\\uD504\\uD520\\uD53C\\uD558\\uD574\\uD590\\uD5AC\\uD5C8\\uD5E4" + "\\uD600\\uD61C\\uD638\\uD654\\uD670\\uD68C\\uD6A8\\uD6C4\\uD6E0" + "\\uD6FC\\uD718\\uD734\\uD750\\uD76C\\uD788\\uF900-\\uFA0D\\uFA10" "\\uFA12\\uFA15-\\uFA1E\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A-" "\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-" "\\uFB17\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41" @@ -1536,145 +1680,9 @@ initExpectedSkippables(UnicodeSet skipSets[UNORM_MODE_COUNT]) { "\\U0001D505\\U0001D507-\\U0001D50A\\U0001D50D-\\U0001D514\\U0001" "D516-\\U0001D51C\\U0001D51E-\\U0001D539\\U0001D53B-\\U0001D53E" "\\U0001D540-\\U0001D544\\U0001D546\\U0001D54A-\\U0001D550\\U0001" - "D552-\\U0001D6A5\\U0001D6A8-\\U0001D7C9\\U0001D7CE-\\U0001D7FF" + "D552-\\U0001D6A5\\U0001D6A8-\\U0001D7CB\\U0001D7CE-\\U0001D7FF" "\\U0002F800-\\U0002FA1D]" , ""), errorCode); - - skipSets[UNORM_NFKC].applyPattern(UnicodeString( - "[^<->A-PR-Za-pr-z\\u00A0\\u00A8\\u00AA\\u00AF\\u00B2-\\u00B5" - "\\u00B8-\\u00BA\\u00BC-\\u00BE\\u00C0-\\u00CF\\u00D1-\\u00D6" - "\\u00D8-\\u00DD\\u00E0-\\u00EF\\u00F1-\\u00F6\\u00F8-\\u00FD" - "\\u00FF-\\u0103\\u0106-\\u010F\\u0112-\\u0117\\u011A-\\u0121" - "\\u0124\\u0125\\u0128-\\u012D\\u0130\\u0132\\u0133\\u0139\\u013A" - "\\u013D-\\u0140\\u0143\\u0144\\u0147-\\u0149\\u014C-\\u0151" - "\\u0154\\u0155\\u0158-\\u015D\\u0160\\u0161\\u0164\\u0165\\u0168" - "-\\u0171\\u0174-\\u017F\\u01A0\\u01A1\\u01AF\\u01B0\\u01B7" - "\\u01C4-\\u01DC\\u01DE-\\u01E1\\u01E6-\\u01EB\\u01F1-\\u01F5" - "\\u01F8-\\u01FB\\u0200-\\u021B\\u021E\\u021F\\u0226-\\u0233" - "\\u0292\\u02B0-\\u02B8\\u02D8-\\u02DD\\u02E0-\\u02E4\\u0300-" - "\\u034E\\u0350-\\u036F\\u0374\\u037A\\u037E\\u0384\\u0385\\u0387" - "\\u0391\\u0395\\u0397\\u0399\\u039F\\u03A1\\u03A5\\u03A9\\u03AC" - "\\u03AE\\u03B1\\u03B5\\u03B7\\u03B9\\u03BF\\u03C1\\u03C5\\u03C9-" - "\\u03CB\\u03CE\\u03D0-\\u03D6\\u03F0-\\u03F2\\u03F4\\u03F5" - "\\u03F9\\u0406\\u0410\\u0413\\u0415-\\u0418\\u041A\\u041E\\u0423" - "\\u0427\\u042B\\u042D\\u0430\\u0433\\u0435-\\u0438\\u043A\\u043E" - "\\u0443\\u0447\\u044B\\u044D\\u0456\\u0474\\u0475\\u0483-\\u0486" - "\\u04D8\\u04D9\\u04E8\\u04E9\\u0587\\u0591-\\u05B9\\u05BB-\\u05BD\\u05BF\\u05C1" - "\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u0615\\u0622\\u0623\\u0627\\u0648" - "\\u064A-\\u065E\\u0670\\u0675-\\u0678\\u06C1\\u06D2\\u06D5-" - "\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711" - "\\u0730-\\u074A\\u0928\\u0930\\u0933\\u093C\\u094D\\u0951-" - "\\u0954\\u0958-\\u095F\\u09BC\\u09BE\\u09C7\\u09CD\\u09D7\\u09DC" - "\\u09DD\\u09DF\\u0A33\\u0A36\\u0A3C\\u0A4D\\u0A59-\\u0A5B\\u0A5E" - "\\u0ABC\\u0ACD\\u0B3C\\u0B3E\\u0B47\\u0B4D\\u0B56\\u0B57\\u0B5C" - "\\u0B5D\\u0B92\\u0BBE\\u0BC6\\u0BC7\\u0BCD\\u0BD7\\u0C46\\u0C4D" - "\\u0C55\\u0C56\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCA\\u0CCD\\u0CD5" - "\\u0CD6\\u0D3E\\u0D46\\u0D47\\u0D4D\\u0D57\\u0DCA\\u0DCF\\u0DD9" - "\\u0DDC\\u0DDF\\u0E33\\u0E38-\\u0E3A\\u0E48-\\u0E4B\\u0EB3" - "\\u0EB8\\u0EB9\\u0EC8-\\u0ECB\\u0EDC\\u0EDD\\u0F0C\\u0F18\\u0F19" - "\\u0F35\\u0F37\\u0F39\\u0F43\\u0F4D\\u0F52\\u0F57\\u0F5C\\u0F69" - "\\u0F71-\\u0F7D\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F93\\u0F9D" - "\\u0FA2\\u0FA7\\u0FAC\\u0FB9\\u0FC6\\u1025\\u102E\\u1037\\u1039" - "\\u10FC\\u1100-\\u1112\\u1161-\\u1175\\u11A8-\\u11C2\\u135F" - "\\u1714\\u1734\\u17D2\\u17DD\\u18A9\\u1939-\\u193B\\u1A17\\u1A18" - "\\u1D2C-\\u1D2E\\u1D30-\\u1D3A\\u1D3C-\\u1D4D\\u1D4F-\\u1D6A" - "\\u1D78\\u1D9B-\\u1DC3\\u1E00-\\u1E03\\u1E0A-\\u1E0F\\u1E12-" - "\\u1E1B\\u1E20-\\u1E27\\u1E2A-\\u1E41\\u1E44-\\u1E53\\u1E58-" - "\\u1E7D\\u1E80-\\u1E87\\u1E8E-\\u1E91\\u1E96-\\u1E9B\\u1EA0-" - "\\u1EF3\\u1EF6-\\u1EF9\\u1F00-\\u1F11\\u1F18\\u1F19\\u1F20-" - "\\u1F31\\u1F38\\u1F39\\u1F40\\u1F41\\u1F48\\u1F49\\u1F50\\u1F51" - "\\u1F59\\u1F60-\\u1F71\\u1F73-\\u1F75\\u1F77\\u1F79\\u1F7B-" - "\\u1F7D\\u1F80\\u1F81\\u1F88\\u1F89\\u1F90\\u1F91\\u1F98\\u1F99" - "\\u1FA0\\u1FA1\\u1FA8\\u1FA9\\u1FB3\\u1FB6\\u1FBB-\\u1FC1\\u1FC3" - "\\u1FC6\\u1FC9\\u1FCB-\\u1FCF\\u1FD3\\u1FDB\\u1FDD-\\u1FDF" - "\\u1FE3\\u1FEB\\u1FED-\\u1FEF\\u1FF3\\u1FF6\\u1FF9\\u1FFB-" - "\\u1FFE\\u2000-\\u200A\\u2011\\u2017\\u2024-\\u2026\\u202F" - "\\u2033\\u2034\\u2036\\u2037\\u203C\\u203E\\u2047-\\u2049\\u2057" - "\\u205F\\u2070\\u2071\\u2074-\\u208E\\u2090-\\u2094\\u20A8" - "\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20EB\\u2100-\\u2103\\u2105-" - "\\u2107\\u2109-\\u2113\\u2115\\u2116\\u2119-\\u211D\\u2120-" - "\\u2122\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2131" - "\\u2133-\\u2139\\u213B-\\u2140\\u2145-\\u2149\\u2153-\\u217F" - "\\u2190\\u2192\\u2194\\u21D0\\u21D2\\u21D4\\u2203\\u2208\\u220B" - "\\u2223\\u2225\\u222C\\u222D\\u222F\\u2230\\u223C\\u2243\\u2245" - "\\u2248\\u224D\\u2261\\u2264\\u2265\\u2272\\u2273\\u2276\\u2277" - "\\u227A-\\u227D\\u2282\\u2283\\u2286\\u2287\\u2291\\u2292\\u22A2" - "\\u22A8\\u22A9\\u22AB\\u22B2-\\u22B5\\u2329\\u232A\\u2460-" - "\\u24EA\\u2A0C\\u2A74-\\u2A76\\u2ADC\\u2D6F\\u2E9F\\u2EF3\\u2F00" - "-\\u2FD5\\u3000\\u302A-\\u302F\\u3036\\u3038-\\u303A\\u3046" - "\\u304B\\u304D\\u304F\\u3051\\u3053\\u3055\\u3057\\u3059\\u305B" - "\\u305D\\u305F\\u3061\\u3064\\u3066\\u3068\\u306F\\u3072\\u3075" - "\\u3078\\u307B\\u3099-\\u309D\\u309F\\u30A6\\u30AB\\u30AD\\u30AF" - "\\u30B1\\u30B3\\u30B5\\u30B7\\u30B9\\u30BB\\u30BD\\u30BF\\u30C1" - "\\u30C4\\u30C6\\u30C8\\u30CF\\u30D2\\u30D5\\u30D8\\u30DB\\u30EF-" - "\\u30F2\\u30FD\\u30FF\\u3131-\\u318E\\u3192-\\u319F\\u3200-" - "\\u321E\\u3220-\\u3243\\u3250-\\u327E\\u3280-\\u32FE\\u3300-" - "\\u33FF\\uA806\\uAC00\\uAC1C\\uAC38\\uAC54\\uAC70\\uAC8C\\uACA8" - "\\uACC4\\uACE0\\uACFC\\uAD18\\uAD34\\uAD50\\uAD6C\\uAD88\\uADA4" - "\\uADC0\\uADDC\\uADF8\\uAE14\\uAE30\\uAE4C\\uAE68\\uAE84\\uAEA0" - "\\uAEBC\\uAED8\\uAEF4\\uAF10\\uAF2C\\uAF48\\uAF64\\uAF80\\uAF9C" - "\\uAFB8\\uAFD4\\uAFF0\\uB00C\\uB028\\uB044\\uB060\\uB07C\\uB098" - "\\uB0B4\\uB0D0\\uB0EC\\uB108\\uB124\\uB140\\uB15C\\uB178\\uB194" - "\\uB1B0\\uB1CC\\uB1E8\\uB204\\uB220\\uB23C\\uB258\\uB274\\uB290" - "\\uB2AC\\uB2C8\\uB2E4\\uB300\\uB31C\\uB338\\uB354\\uB370\\uB38C" - "\\uB3A8\\uB3C4\\uB3E0\\uB3FC\\uB418\\uB434\\uB450\\uB46C\\uB488" - "\\uB4A4\\uB4C0\\uB4DC\\uB4F8\\uB514\\uB530\\uB54C\\uB568\\uB584" - "\\uB5A0\\uB5BC\\uB5D8\\uB5F4\\uB610\\uB62C\\uB648\\uB664\\uB680" - "\\uB69C\\uB6B8\\uB6D4\\uB6F0\\uB70C\\uB728\\uB744\\uB760\\uB77C" - "\\uB798\\uB7B4\\uB7D0\\uB7EC\\uB808\\uB824\\uB840\\uB85C\\uB878" - "\\uB894\\uB8B0\\uB8CC\\uB8E8\\uB904\\uB920\\uB93C\\uB958\\uB974" - "\\uB990\\uB9AC\\uB9C8\\uB9E4\\uBA00\\uBA1C\\uBA38\\uBA54\\uBA70" - "\\uBA8C\\uBAA8\\uBAC4\\uBAE0\\uBAFC\\uBB18\\uBB34\\uBB50\\uBB6C" - "\\uBB88\\uBBA4\\uBBC0\\uBBDC\\uBBF8\\uBC14\\uBC30\\uBC4C\\uBC68" - "\\uBC84\\uBCA0\\uBCBC\\uBCD8\\uBCF4\\uBD10\\uBD2C\\uBD48\\uBD64" - "\\uBD80\\uBD9C\\uBDB8\\uBDD4\\uBDF0\\uBE0C\\uBE28\\uBE44\\uBE60" - "\\uBE7C\\uBE98\\uBEB4\\uBED0\\uBEEC\\uBF08\\uBF24\\uBF40\\uBF5C" - "\\uBF78\\uBF94\\uBFB0\\uBFCC\\uBFE8\\uC004\\uC020\\uC03C\\uC058" - "\\uC074\\uC090\\uC0AC\\uC0C8\\uC0E4\\uC100\\uC11C\\uC138\\uC154" - "\\uC170\\uC18C\\uC1A8\\uC1C4\\uC1E0\\uC1FC\\uC218\\uC234\\uC250" - "\\uC26C\\uC288\\uC2A4\\uC2C0\\uC2DC\\uC2F8\\uC314\\uC330\\uC34C" - "\\uC368\\uC384\\uC3A0\\uC3BC\\uC3D8\\uC3F4\\uC410\\uC42C\\uC448" - "\\uC464\\uC480\\uC49C\\uC4B8\\uC4D4\\uC4F0\\uC50C\\uC528\\uC544" - "\\uC560\\uC57C\\uC598\\uC5B4\\uC5D0\\uC5EC\\uC608\\uC624\\uC640" - "\\uC65C\\uC678\\uC694\\uC6B0\\uC6CC\\uC6E8\\uC704\\uC720\\uC73C" - "\\uC758\\uC774\\uC790\\uC7AC\\uC7C8\\uC7E4\\uC800\\uC81C\\uC838" - "\\uC854\\uC870\\uC88C\\uC8A8\\uC8C4\\uC8E0\\uC8FC\\uC918\\uC934" - "\\uC950\\uC96C\\uC988\\uC9A4\\uC9C0\\uC9DC\\uC9F8\\uCA14\\uCA30" - "\\uCA4C\\uCA68\\uCA84\\uCAA0\\uCABC\\uCAD8\\uCAF4\\uCB10\\uCB2C" - "\\uCB48\\uCB64\\uCB80\\uCB9C\\uCBB8\\uCBD4\\uCBF0\\uCC0C\\uCC28" - "\\uCC44\\uCC60\\uCC7C\\uCC98\\uCCB4\\uCCD0\\uCCEC\\uCD08\\uCD24" - "\\uCD40\\uCD5C\\uCD78\\uCD94\\uCDB0\\uCDCC\\uCDE8\\uCE04\\uCE20" - "\\uCE3C\\uCE58\\uCE74\\uCE90\\uCEAC\\uCEC8\\uCEE4\\uCF00\\uCF1C" - "\\uCF38\\uCF54\\uCF70\\uCF8C\\uCFA8\\uCFC4\\uCFE0\\uCFFC\\uD018" - "\\uD034\\uD050\\uD06C\\uD088\\uD0A4\\uD0C0\\uD0DC\\uD0F8\\uD114" - "\\uD130\\uD14C\\uD168\\uD184\\uD1A0\\uD1BC\\uD1D8\\uD1F4\\uD210" - "\\uD22C\\uD248\\uD264\\uD280\\uD29C\\uD2B8\\uD2D4\\uD2F0\\uD30C" - "\\uD328\\uD344\\uD360\\uD37C\\uD398\\uD3B4\\uD3D0\\uD3EC\\uD408" - "\\uD424\\uD440\\uD45C\\uD478\\uD494\\uD4B0\\uD4CC\\uD4E8\\uD504" - "\\uD520\\uD53C\\uD558\\uD574\\uD590\\uD5AC\\uD5C8\\uD5E4\\uD600" - "\\uD61C\\uD638\\uD654\\uD670\\uD68C\\uD6A8\\uD6C4\\uD6E0\\uD6FC" - "\\uD718\\uD734\\uD750\\uD76C\\uD788\\uF900-\\uFA0D\\uFA10\\uFA12" - "\\uFA15-\\uFA1E\\uFA20\\uFA22\\uFA25\\uFA26\\uFA2A-\\uFA2D" - "\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17" - "\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43" - "\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-" - "\\uFDC7\\uFDF0-\\uFDFC\\uFE10-\\uFE19\\uFE20-\\uFE23\\uFE30-" - "\\uFE44\\uFE47-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFE70-" - "\\uFE72\\uFE74\\uFE76-\\uFEFC\\uFF01-\\uFFBE\\uFFC2-\\uFFC7" - "\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\uFFE0-\\uFFE6" - "\\uFFE8-\\uFFEE\\U00010A0D\\U00010A0F\\U00010A38-\\U00010A3A" - "\\U00010A3F\\U0001D15E-\\U0001D169\\U0001D16D-\\U0001D172\\U0001" - "D17B-\\U0001D182\\U0001D185-\\U0001D18B\\U0001D1AA-\\U0001D1AD" - "\\U0001D1BB-\\U0001D1C0\\U0001D242-\\U0001D244\\U0001D400-" - "\\U0001D454\\U0001D456-\\U0001D49C\\U0001D49E\\U0001D49F\\U0001D" - "4A2\\U0001D4A5\\U0001D4A6\\U0001D4A9-\\U0001D4AC\\U0001D4AE-" - "\\U0001D4B9\\U0001D4BB\\U0001D4BD-\\U0001D4C3\\U0001D4C5-\\U0001" - "D505\\U0001D507-\\U0001D50A\\U0001D50D-\\U0001D514\\U0001D516-" - "\\U0001D51C\\U0001D51E-\\U0001D539\\U0001D53B-\\U0001D53E\\U0001" - "D540-\\U0001D544\\U0001D546\\U0001D54A-\\U0001D550\\U0001D552-" - "\\U0001D6A5\\U0001D6A8-\\U0001D7C9\\U0001D7CE-\\U0001D7FF\\U0002" - "F800-\\U0002FA1D]" - , ""), errorCode); } U_CDECL_BEGIN @@ -1701,6 +1709,7 @@ U_CDECL_END void BasicNormalizerTest::TestSkippable() { UnicodeSet starts, diff, skipSets[UNORM_MODE_COUNT], expectSets[UNORM_MODE_COUNT]; + UnicodeSet *startsPtr = &starts; UnicodeString s, pattern; UChar32 start, limit, rangeStart, rangeEnd; int32_t i, range, count; @@ -1710,7 +1719,7 @@ BasicNormalizerTest::TestSkippable() { /* build NF*Skippable sets from runtime data */ status=U_ZERO_ERROR; USetAdder sa = { - (USet *)&starts, + (USet *)startsPtr, _set_add, _set_addRange, _set_addString, diff --git a/Build/source/libs/icu-xetex/test/intltest/tzbdtest.cpp b/Build/source/libs/icu-xetex/test/intltest/tzbdtest.cpp index 66e0f24a179..88e0fab9c7c 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tzbdtest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tzbdtest.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -193,13 +193,19 @@ TimeZoneBoundaryTest::verifyDST(UDate d, TimeZone* time_zone, UBool expUseDaylig logln("-- Verifying time " + dateToString(d) + " in zone " + time_zone->getID(str)); if (time_zone->inDaylightTime(d, status) == expInDaylightTime) logln(UnicodeString("PASS: inDaylightTime = ") + (time_zone->inDaylightTime(d, status)?"true":"false")); - else errln(UnicodeString("FAIL: inDaylightTime = ") + (time_zone->inDaylightTime(d, status)?"true":"false")); - if (failure(status, "TimeZone::inDaylightTime")) return; + else + errln(UnicodeString("FAIL: inDaylightTime = ") + (time_zone->inDaylightTime(d, status)?"true":"false")); + if (failure(status, "TimeZone::inDaylightTime")) + return; if (time_zone->useDaylightTime() == expUseDaylightTime) logln(UnicodeString("PASS: useDaylightTime = ") + (time_zone->useDaylightTime()?"true":"false")); - else errln(UnicodeString("FAIL: useDaylightTime = ") + (time_zone->useDaylightTime()?"true":"false")); - if (time_zone->getRawOffset() == expZoneOffset) logln(UnicodeString("PASS: getRawOffset() = ") + (expZoneOffset / ONE_HOUR)); - else errln(UnicodeString("FAIL: getRawOffset() = ") + (time_zone->getRawOffset() / ONE_HOUR) + "; expected " + (expZoneOffset / ONE_HOUR)); + else + errln(UnicodeString("FAIL: useDaylightTime = ") + (time_zone->useDaylightTime()?"true":"false")); + if (time_zone->getRawOffset() == expZoneOffset) + logln(UnicodeString("PASS: getRawOffset() = ") + (expZoneOffset / ONE_HOUR)); + else + errln(UnicodeString("FAIL: getRawOffset() = ") + (time_zone->getRawOffset() / ONE_HOUR) + "; expected " + (expZoneOffset / ONE_HOUR)); + GregorianCalendar *gc = new GregorianCalendar(time_zone->clone(), status); gc->setTime(d, status); if (failure(status, "GregorianCalendar::setTime")) return; @@ -215,7 +221,52 @@ TimeZoneBoundaryTest::verifyDST(UDate d, TimeZone* time_zone, UBool expUseDaylig } // ------------------------------------- - +/** + * Check that the given year/month/dom/hour maps to and from the + * given epochHours. This verifies the functioning of the + * calendar and time zone in conjunction with one another, + * including the calendar time->fields and fields->time and + * the time zone getOffset method. + * + * @param epochHours hours after Jan 1 1970 0:00 GMT. + */ +void TimeZoneBoundaryTest::verifyMapping(Calendar& cal, int year, int month, int dom, int hour, + double epochHours) { + double H = 3600000.0; + UErrorCode status = U_ZERO_ERROR; + cal.clear(); + cal.set(year, month, dom, hour, 0, 0); + UDate e = cal.getTime(status)/ H; + UDate ed = (epochHours * H); + if (e == epochHours) { + logln(UnicodeString("Ok: ") + year + "/" + (month+1) + "/" + dom + " " + hour + ":00 => " + + e + " (" + ed + ")"); + } else { + errln(UnicodeString("FAIL: ") + year + "/" + (month+1) + "/" + dom + " " + hour + ":00 => " + + e + " (" + (e * H) + ")" + + ", expected " + epochHours + " (" + ed + ")"); + } + cal.setTime(ed, status); + if (cal.get(UCAL_YEAR, status) == year && + cal.get(UCAL_MONTH, status) == month && + cal.get(UCAL_DATE, status) == dom && + cal.get(UCAL_MILLISECONDS_IN_DAY, status) == hour * 3600000) { + logln(UnicodeString("Ok: ") + epochHours + " (" + ed + ") => " + + cal.get(UCAL_YEAR, status) + "/" + + (cal.get(UCAL_MONTH, status)+1) + "/" + + cal.get(UCAL_DATE, status) + " " + + cal.get(UCAL_MILLISECOND, status)/H); + } else { + errln(UnicodeString("FAIL: ") + epochHours + " (" + ed + ") => " + + cal.get(UCAL_YEAR, status) + "/" + + (cal.get(UCAL_MONTH, status)+1) + "/" + + cal.get(UCAL_DATE, status) + " " + + cal.get(UCAL_MILLISECOND, status)/H + + ", expected " + year + "/" + (month+1) + "/" + dom + + " " + hour); + } +} + /** * Test the behavior of SimpleTimeZone at the transition into and out of DST. * Use a binary search to find boundaries. @@ -223,6 +274,48 @@ TimeZoneBoundaryTest::verifyDST(UDate d, TimeZone* time_zone, UBool expUseDaylig void TimeZoneBoundaryTest::TestBoundaries() { + UErrorCode status = U_ZERO_ERROR; + TimeZone* pst = TimeZone::createTimeZone("PST"); + Calendar* tempcal = Calendar::createInstance(pst, status); + if(U_SUCCESS(status)){ + verifyMapping(*tempcal, 1997, Calendar::APRIL, 3, 0, 238904.0); + verifyMapping(*tempcal, 1997, Calendar::APRIL, 4, 0, 238928.0); + verifyMapping(*tempcal, 1997, Calendar::APRIL, 5, 0, 238952.0); + verifyMapping(*tempcal, 1997, Calendar::APRIL, 5, 23, 238975.0); + verifyMapping(*tempcal, 1997, Calendar::APRIL, 6, 0, 238976.0); + verifyMapping(*tempcal, 1997, Calendar::APRIL, 6, 1, 238977.0); + verifyMapping(*tempcal, 1997, Calendar::APRIL, 6, 3, 238978.0); + }else{ + errln("Could not create calendar. Error: %s", u_errorName(status)); + } + TimeZone* utc = TimeZone::createTimeZone("UTC"); + Calendar* utccal = Calendar::createInstance(utc, status); + if(U_SUCCESS(status)){ + verifyMapping(*utccal, 1997, Calendar::APRIL, 6, 0, 238968.0); + }else{ + errln("Could not create calendar. Error: %s", u_errorName(status)); + } + TimeZone* save = TimeZone::createDefault(); + TimeZone::setDefault(*pst); + + // DST changeover for PST is 4/6/1997 at 2 hours past midnight + // at 238978.0 epoch hours. + tempcal->clear(); + tempcal->set(1997, Calendar::APRIL, 6); + UDate d = tempcal->getTime(status); + + // i is minutes past midnight standard time + for (int i=-120; i<=180; i+=60) + { + UBool inDST = (i >= 120); + tempcal->setTime(d + i*60*1000, status); + verifyDST(tempcal->getTime(status),pst, TRUE, inDST, -8*ONE_HOUR,inDST ? -7*ONE_HOUR : -8*ONE_HOUR); + } + TimeZone::setDefault(*save); + delete save; + delete utccal; + delete tempcal; + #if 1 { logln("--- Test a ---"); @@ -292,7 +385,7 @@ TimeZoneBoundaryTest::testUsingBinarySearch(SimpleTimeZone* tz, UDate d, UDate e UBool startsInDST = tz->inDaylightTime(d, status); if (failure(status, "SimpleTimeZone::inDaylightTime")) return; if (tz->inDaylightTime(max, status) == startsInDST) { - logln("Error: inDaylightTime(" + dateToString(max) + ") != " + ((!startsInDST)?"true":"false")); + errln("Error: inDaylightTime(" + dateToString(max) + ") != " + ((!startsInDST)?"true":"false")); } if (failure(status, "SimpleTimeZone::inDaylightTime")) return; while ((max - min) > INTERVAL) { diff --git a/Build/source/libs/icu-xetex/test/intltest/tzbdtest.h b/Build/source/libs/icu-xetex/test/intltest/tzbdtest.h index f58beb62569..ecc867c9faf 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tzbdtest.h +++ b/Build/source/libs/icu-xetex/test/intltest/tzbdtest.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2001, International Business Machines Corporation and + * Copyright (c) 1997-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -79,7 +79,8 @@ public: // package * Use a stepwise march to find boundaries. */ virtual void TestStepwise(void); - + void verifyMapping(Calendar& cal, int year, int month, int dom, int hour, + double epochHours) ; private: const UDate ONE_SECOND; const UDate ONE_MINUTE; diff --git a/Build/source/libs/icu-xetex/test/intltest/tzregts.cpp b/Build/source/libs/icu-xetex/test/intltest/tzregts.cpp index b13947873a8..5ce419cf6bb 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tzregts.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tzregts.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -18,7 +18,8 @@ // ***************************************************************************** // class TimeZoneRegressionTest // ***************************************************************************** - +/* length of an array */ +#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0])) #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break void @@ -44,7 +45,8 @@ TimeZoneRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* & CASE(14, TestJ186); CASE(15, TestJ449); CASE(16, TestJDK12API); - + CASE(17, Test4176686); + CASE(18, Test4184229); default: name = ""; break; } } @@ -221,25 +223,36 @@ void TimeZoneRegressionTest:: Test4084933() { * The following was added just for consistency. It shows that going *to* Daylight * Savings Time (PDT) does work at 2am. */ - int32_t offset5 = tz->getOffset(1, 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (2*60*60*1000), status); int32_t offset6 = tz->getOffset(1, 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (2*60*60*1000)-1, status); - + int32_t offset5a = tz->getOffset(1, + 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (3*60*60*1000), status); + int32_t offset6a = tz->getOffset(1, + 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (3*60*60*1000)-1, status); int32_t offset7 = tz->getOffset(1, 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (1*60*60*1000), status); int32_t offset8 = tz->getOffset(1, 1997, UCAL_APRIL, 6, UCAL_SUNDAY, (1*60*60*1000)-1, status); - int32_t SToffset = (int32_t)(-8 * 60*60*1000L); int32_t DToffset = (int32_t)(-7 * 60*60*1000L); - if (offset1 != SToffset || offset2 != SToffset || - offset3 != SToffset || offset4 != DToffset || - offset5 != DToffset || offset6 != SToffset || - offset7 != SToffset || offset8 != SToffset - || U_FAILURE(status)) - errln("Fail: TimeZone misbehaving"); + +#define ERR_IF_FAIL(x) if(x) { errln("FAIL: TimeZone misbehaving - %s", #x); } + + ERR_IF_FAIL(U_FAILURE(status)) + ERR_IF_FAIL(offset1 != SToffset) + ERR_IF_FAIL(offset2 != SToffset) + ERR_IF_FAIL(offset3 != SToffset) + ERR_IF_FAIL(offset4 != DToffset) + ERR_IF_FAIL(offset5 != DToffset) + ERR_IF_FAIL(offset6 != SToffset) + ERR_IF_FAIL(offset5a != DToffset) + ERR_IF_FAIL(offset6a != DToffset) + ERR_IF_FAIL(offset7 != SToffset) + ERR_IF_FAIL(offset8 != SToffset) + +#undef ERR_IF_FAIL delete tz; } @@ -871,16 +884,16 @@ TimeZoneRegressionTest::Test4162593() // Must construct the Date object AFTER setting the default zone int32_t *p = (int32_t*)DATA_INT[j]; UDate d = CalendarRegressionTest::makeDate(p[0], p[1], p[2], p[3], p[4]); - UBool transitionExpected = DATA_BOOL[j]; + UBool transitionExpected = DATA_BOOL[j]; UnicodeString temp; logln(tz->getID(temp) + ":"); for (int32_t i = 0; i < 4; ++i) { FieldPosition pos(0); zone[i].remove(); - zone[i] = fmt->format(d, zone[i], pos); + zone[i] = fmt->format(d+ i*ONE_HOUR, zone[i], pos); logln(UnicodeString("") + i + ": " + d + " / " + zone[i]); - d += (double) ONE_HOUR; + //d += (double) ONE_HOUR; } if(zone[0] == zone[1] && (zone[1] == zone[2]) != transitionExpected && @@ -896,6 +909,74 @@ TimeZoneRegressionTest::Test4162593() delete DATA_TZ[0]; } + /** + * getDisplayName doesn't work with unusual savings/offsets. + */ +void TimeZoneRegressionTest::Test4176686() { + // Construct a zone that does not observe DST but + // that does have a DST savings (which should be ignored). + UErrorCode status = U_ZERO_ERROR; + int32_t offset = 90 * 60000; // 1:30 + SimpleTimeZone* z1 = new SimpleTimeZone(offset, "_std_zone_"); + z1->setDSTSavings(45 * 60000, status); // 0:45 + + // Construct a zone that observes DST for the first 6 months. + SimpleTimeZone* z2 = new SimpleTimeZone(offset, "_dst_zone_"); + z2->setDSTSavings(45 * 60000, status); // 0:45 + z2->setStartRule(UCAL_JANUARY, 1, 0, status); + z2->setEndRule(UCAL_JULY, 1, 0, status); + + // Also check DateFormat + DateFormat* fmt1 = new SimpleDateFormat(UnicodeString("z"), status); + if(!assertSuccess("trying to construct", status))return; + fmt1->setTimeZone(*z1); // Format uses standard zone + DateFormat* fmt2 = new SimpleDateFormat(UnicodeString("z"), status); + if(!assertSuccess("trying to construct", status))return; + fmt2->setTimeZone(*z2); // Format uses DST zone + Calendar* tempcal = Calendar::createInstance(status); + tempcal->clear(); + tempcal->set(1970, UCAL_FEBRUARY, 1); + UDate dst = tempcal->getTime(status); // Time in DST + tempcal->set(1970, UCAL_AUGUST, 1); + UDate std = tempcal->getTime(status); // Time in standard + + // Description, Result, Expected Result + UnicodeString a,b,c,d,e,f,g,h,i,j,k,l; + UnicodeString DATA[] = { + "z1->getDisplayName(false, SHORT)/std zone", + z1->getDisplayName(FALSE, TimeZone::SHORT, a), "GMT+01:30", + "z1->getDisplayName(false, LONG)/std zone", + z1->getDisplayName(FALSE, TimeZone::LONG, b), "GMT+01:30", + "z1->getDisplayName(true, SHORT)/std zone", + z1->getDisplayName(TRUE, TimeZone::SHORT, c), "GMT+01:30", + "z1->getDisplayName(true, LONG)/std zone", + z1->getDisplayName(TRUE, TimeZone::LONG, d ), "GMT+01:30", + "z2->getDisplayName(false, SHORT)/dst zone", + z2->getDisplayName(FALSE, TimeZone::SHORT, e), "GMT+01:30", + "z2->getDisplayName(false, LONG)/dst zone", + z2->getDisplayName(FALSE, TimeZone::LONG, f ), "GMT+01:30", + "z2->getDisplayName(true, SHORT)/dst zone", + z2->getDisplayName(TRUE, TimeZone::SHORT, g), "GMT+02:15", + "z2->getDisplayName(true, LONG)/dst zone", + z2->getDisplayName(TRUE, TimeZone::LONG, h ), "GMT+02:15", + "DateFormat.format(std)/std zone", fmt1->format(std, i), "GMT+01:30", + "DateFormat.format(dst)/std zone", fmt1->format(dst, j), "GMT+01:30", + "DateFormat.format(std)/dst zone", fmt2->format(std, k), "GMT+01:30", + "DateFormat.format(dst)/dst zone", fmt2->format(dst, l), "GMT+02:15", + }; + + for (int32_t idx=0; idx<(int32_t)ARRAY_LENGTH(DATA); idx+=3) { + if (DATA[idx+1]!=(DATA[idx+2])) { + errln("FAIL: " + DATA[idx] + " -> " + DATA[idx+1] + ", exp " + DATA[idx+2]); + } + } + delete z1; + delete z2; + delete fmt1; + delete fmt2; + delete tempcal; +} + /** * Make sure setStartRule and setEndRule set the DST savings to nonzero * if it was zero. @@ -1034,7 +1115,7 @@ TimeZoneRegressionTest::TestJDK12API() // verify error checking pst->getOffset(1, - 1997, (UCalendarDateFields)-1, 26, UCAL_SUNDAY, (2*60*60*1000), status); + 1997, UCAL_FIELD_COUNT+1, 26, UCAL_SUNDAY, (2*60*60*1000), status); if(U_SUCCESS(status)) errln("FAILURE: getOffset() succeeded with -1 for month"); @@ -1050,5 +1131,76 @@ TimeZoneRegressionTest::TestJDK12API() delete pst; delete cst; } +/** + * SimpleTimeZone allows invalid DOM values. + */ +void TimeZoneRegressionTest::Test4184229() { + SimpleTimeZone* zone = NULL; + UErrorCode status = U_ZERO_ERROR; + zone = new SimpleTimeZone(0, "A", 0, -1, 0, 0, 0, 0, 0, 0, status); + if(U_SUCCESS(status)){ + errln("Failed. No exception has been thrown for DOM -1 startDay"); + }else{ + logln("(a) " + UnicodeString( u_errorName(status))); + } + status = U_ZERO_ERROR; + delete zone; + + zone = new SimpleTimeZone(0, "A", 0, 0, 0, 0, 0, -1, 0, 0, status); + if(U_SUCCESS(status)){ + errln("Failed. No exception has been thrown for DOM -1 endDay"); + }else{ + logln("(b) " + UnicodeString(u_errorName(status))); + } + status = U_ZERO_ERROR; + delete zone; + + zone = new SimpleTimeZone(0, "A", 0, -1, 0, 0, 0, 0, 0, 1000, status); + if(U_SUCCESS(status)){ + errln("Failed. No exception has been thrown for DOM -1 startDay+savings"); + }else{ + logln("(c) " + UnicodeString(u_errorName(status))); + } + status = U_ZERO_ERROR; + delete zone; + zone = new SimpleTimeZone(0, "A", 0, 0, 0, 0, 0, -1, 0, 0, 1000, status); + if(U_SUCCESS(status)){ + errln("Failed. No exception has been thrown for DOM -1 endDay+ savings"); + }else{ + logln("(d) " + UnicodeString(u_errorName(status))); + } + status = U_ZERO_ERROR; + delete zone; + // Make a valid constructor call for subsequent tests. + zone = new SimpleTimeZone(0, "A", 0, 1, 0, 0, 0, 1, 0, 0, status); + + zone->setStartRule(0, -1, 0, 0, status); + if(U_SUCCESS(status)){ + errln("Failed. No exception has been thrown for DOM -1 setStartRule +savings"); + } else{ + logln("(e) " + UnicodeString(u_errorName(status))); + } + zone->setStartRule(0, -1, 0, status); + if(U_SUCCESS(status)){ + errln("Failed. No exception has been thrown for DOM -1 setStartRule"); + } else{ + logln("(f) " + UnicodeString(u_errorName(status))); + } + + zone->setEndRule(0, -1, 0, 0, status); + if(U_SUCCESS(status)){ + errln("Failed. No exception has been thrown for DOM -1 setEndRule+savings"); + } else{ + logln("(g) " + UnicodeString(u_errorName(status))); + } + + zone->setEndRule(0, -1, 0, status); + if(U_SUCCESS(status)){ + errln("Failed. No exception has been thrown for DOM -1 setEndRule"); + } else{ + logln("(h) " + UnicodeString(u_errorName(status))); + } + delete zone; +} #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/Build/source/libs/icu-xetex/test/intltest/tzregts.h b/Build/source/libs/icu-xetex/test/intltest/tzregts.h index 5fefadb7476..6b5500c953e 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tzregts.h +++ b/Build/source/libs/icu-xetex/test/intltest/tzregts.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1998-2001, International Business Machines Corporation and + * Copyright (c) 1998-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -41,10 +41,11 @@ public: void Test4154650(void); void Test4154525(void); void Test4162593(void); + void Test4176686(void); void TestJ186(void); void TestJ449(void); void TestJDK12API(void); - + void Test4184229(void); UBool checkCalendar314(GregorianCalendar *testCal, TimeZone *testTZ); diff --git a/Build/source/libs/icu-xetex/test/intltest/tztest.cpp b/Build/source/libs/icu-xetex/test/intltest/tztest.cpp index ee081d85a98..0ad49421b3a 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tztest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/tztest.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation + * Copyright (c) 1997-2006, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -47,6 +47,8 @@ void TimeZoneTest::runIndexedTest( int32_t index, UBool exec, const char* &name, CASE(10,TestCountries); CASE(11,TestHistorical); CASE(12,TestEquivalentIDs); + CASE(13, TestAliasedNames); + CASE(14, TestFractionalDST); default: name = ""; break; } } @@ -579,7 +581,7 @@ void TimeZoneTest::TestShortZoneIDs() {"PNT", -420, FALSE}, {"MST", -420, FALSE}, // updated Aug 2003 aliu {"CST", -360, TRUE}, - {"IET", -300, FALSE}, + {"IET", -300, TRUE}, // updated Jan 2006 srl {"EST", -300, FALSE}, // updated Aug 2003 aliu {"PRT", -240, FALSE}, {"CNT", -210, TRUE}, @@ -775,7 +777,7 @@ void TimeZoneTest::TestCustomParse() kData[] = { // ID Expected offset in minutes - //"GMT", kUnparseable, Isn't custom. Can't test it here. [returns normal GMT] + //{"GMT", kUnparseable}, //Isn't custom. Can't test it here. [returns normal GMT] {"GMT-YOUR.AD.HERE", kUnparseable}, // {"GMT0", kUnparseable}, // ICU 2.8: An Olson zone ID // {"GMT+0", (0)}, // ICU 2.8: An Olson zone ID @@ -864,6 +866,185 @@ void TimeZoneTest::TestCustomParse() } } +static const UVersionInfo ICU_37 = {3,7,0,0}; + +void +TimeZoneTest::TestAliasedNames() +{ + struct { + const char *from; + const char *to; + } kData[] = { + /* Generated by org.unicode.cldr.tool.CountItems */ + + /* zoneID, canonical zoneID */ + {"Africa/Timbuktu", "Africa/Bamako"}, + {"America/Argentina/Buenos_Aires", "America/Buenos_Aires"}, + {"America/Argentina/Catamarca", "America/Catamarca"}, + {"America/Argentina/ComodRivadavia", "America/Catamarca"}, + {"America/Argentina/Cordoba", "America/Cordoba"}, + {"America/Argentina/Jujuy", "America/Jujuy"}, + {"America/Argentina/Mendoza", "America/Mendoza"}, + {"America/Atka", "America/Adak"}, + {"America/Ensenada", "America/Tijuana"}, + {"America/Fort_Wayne", "America/Indiana/Indianapolis"}, + {"America/Indianapolis", "America/Indiana/Indianapolis"}, + {"America/Knox_IN", "America/Indiana/Knox"}, + {"America/Louisville", "America/Kentucky/Louisville"}, + {"America/Porto_Acre", "America/Rio_Branco"}, + {"America/Rosario", "America/Cordoba"}, + {"America/Virgin", "America/St_Thomas"}, + {"Asia/Ashkhabad", "Asia/Ashgabat"}, + {"Asia/Chungking", "Asia/Chongqing"}, + {"Asia/Dacca", "Asia/Dhaka"}, + {"Asia/Istanbul", "Europe/Istanbul"}, + {"Asia/Macao", "Asia/Macau"}, + {"Asia/Tel_Aviv", "Asia/Jerusalem"}, + {"Asia/Thimbu", "Asia/Thimphu"}, + {"Asia/Ujung_Pandang", "Asia/Makassar"}, + {"Asia/Ulan_Bator", "Asia/Ulaanbaatar"}, + {"Australia/ACT", "Australia/Sydney"}, + {"Australia/Canberra", "Australia/Sydney"}, + {"Australia/LHI", "Australia/Lord_Howe"}, + {"Australia/NSW", "Australia/Sydney"}, + {"Australia/North", "Australia/Darwin"}, + {"Australia/Queensland", "Australia/Brisbane"}, + {"Australia/South", "Australia/Adelaide"}, + {"Australia/Tasmania", "Australia/Hobart"}, + {"Australia/Victoria", "Australia/Melbourne"}, + {"Australia/West", "Australia/Perth"}, + {"Australia/Yancowinna", "Australia/Broken_Hill"}, + {"Brazil/Acre", "America/Rio_Branco"}, + {"Brazil/DeNoronha", "America/Noronha"}, + {"Brazil/East", "America/Sao_Paulo"}, + {"Brazil/West", "America/Manaus"}, + {"Canada/Atlantic", "America/Halifax"}, + {"Canada/Central", "America/Winnipeg"}, + {"Canada/East-Saskatchewan", "America/Regina"}, + {"Canada/Eastern", "America/Toronto"}, + {"Canada/Mountain", "America/Edmonton"}, + {"Canada/Newfoundland", "America/St_Johns"}, + {"Canada/Pacific", "America/Vancouver"}, + {"Canada/Saskatchewan", "America/Regina"}, + {"Canada/Yukon", "America/Whitehorse"}, + {"Chile/Continental", "America/Santiago"}, + {"Chile/EasterIsland", "Pacific/Easter"}, + {"Cuba", "America/Havana"}, + {"Egypt", "Africa/Cairo"}, + {"Eire", "Europe/Dublin"}, + {"Etc/GMT+0", "Etc/GMT"}, + {"Etc/GMT-0", "Etc/GMT"}, + {"Etc/GMT0", "Etc/GMT"}, + {"Etc/Greenwich", "Etc/GMT"}, + {"Etc/UCT", "Etc/GMT"}, + {"Etc/UTC", "Etc/GMT"}, + {"Etc/Universal", "Etc/GMT"}, + {"Etc/Zulu", "Etc/GMT"}, + {"Europe/Belfast", "Europe/London"}, + {"Europe/Nicosia", "Asia/Nicosia"}, + {"Europe/Tiraspol", "Europe/Chisinau"}, + {"GB", "Europe/London"}, + {"GB-Eire", "Europe/London"}, + {"GMT", "Etc/GMT"}, + {"GMT+0", "Etc/GMT"}, + {"GMT-0", "Etc/GMT"}, + {"GMT0", "Etc/GMT"}, + {"Greenwich", "Etc/GMT"}, + {"Hongkong", "Asia/Hong_Kong"}, + {"Iceland", "Atlantic/Reykjavik"}, + {"Iran", "Asia/Tehran"}, + {"Israel", "Asia/Jerusalem"}, + {"Jamaica", "America/Jamaica"}, + {"Japan", "Asia/Tokyo"}, + {"Kwajalein", "Pacific/Kwajalein"}, + {"Libya", "Africa/Tripoli"}, + {"Mexico/BajaNorte", "America/Tijuana"}, + {"Mexico/BajaSur", "America/Mazatlan"}, + {"Mexico/General", "America/Mexico_City"}, + {"NZ", "Pacific/Auckland"}, + {"NZ-CHAT", "Pacific/Chatham"}, + {"Navajo", "America/Shiprock"}, + {"PRC", "Asia/Shanghai"}, + {"Pacific/Samoa", "Pacific/Pago_Pago"}, + {"Pacific/Yap", "Pacific/Truk"}, + {"Poland", "Europe/Warsaw"}, + {"Portugal", "Europe/Lisbon"}, + {"ROC", "Asia/Taipei"}, + {"ROK", "Asia/Seoul"}, + {"Singapore", "Asia/Singapore"}, + {"Turkey", "Europe/Istanbul"}, + {"UCT", "Etc/GMT"}, + {"US/Alaska", "America/Anchorage"}, + {"US/Aleutian", "America/Adak"}, + {"US/Arizona", "America/Phoenix"}, + {"US/Central", "America/Chicago"}, + {"US/East-Indiana", "America/Indiana/Indianapolis"}, + {"US/Eastern", "America/New_York"}, + {"US/Hawaii", "Pacific/Honolulu"}, + {"US/Indiana-Starke", "America/Indiana/Knox"}, + {"US/Michigan", "America/Detroit"}, + {"US/Mountain", "America/Denver"}, + {"US/Pacific", "America/Los_Angeles"}, + {"US/Pacific-New", "America/Los_Angeles"}, + {"US/Samoa", "Pacific/Pago_Pago"}, + {"UTC", "Etc/GMT"}, + {"Universal", "Etc/GMT"}, + {"W-SU", "Europe/Moscow"}, + {"Zulu", "Etc/GMT"}, + /* Total: 113 */ + + }; + + TimeZone::EDisplayType styles[] = { TimeZone::SHORT, TimeZone::LONG }; + UBool useDst[] = { FALSE, TRUE }; + int32_t noLoc = uloc_countAvailable(); + + if(isICUVersionAtLeast(ICU_37)) { + errln("This test needs to be fixed. This test fails in exhaustive mode because we need to implement generic timezones.\n"); + } + + int32_t i, j, k, loc; + UnicodeString fromName, toName; + TimeZone *from = NULL, *to = NULL; + for(i = 0; i < (int32_t)(sizeof(kData)/sizeof(kData[0])); i++) { + from = TimeZone::createTimeZone(kData[i].from); + to = TimeZone::createTimeZone(kData[i].to); + if(!from->hasSameRules(*to)) { + errln("different at %i\n", i); + } + if(!quick && isICUVersionAtLeast(ICU_37)) { + errln("This test needs to be fixed. This test fails in exhaustive mode because we need to implement generic timezones.\n"); + for(loc = 0; loc < noLoc; loc++) { + const char* locale = uloc_getAvailable(loc); + for(j = 0; j < (int32_t)(sizeof(styles)/sizeof(styles[0])); j++) { + for(k = 0; k < (int32_t)(sizeof(useDst)/sizeof(useDst[0])); k++) { + fromName.remove(); + toName.remove(); + from->getDisplayName(useDst[k], styles[j],locale, fromName); + to->getDisplayName(useDst[k], styles[j], locale, toName); + if(fromName.compare(toName) != 0) { + errln("Fail: Expected "+toName+" but got " + prettify(fromName) + + " for locale: " + locale + " index: "+ loc + + " to id "+ kData[i].to + + " from id " + kData[i].from); + } + } + } + } + } else { + fromName.remove(); + toName.remove(); + from->getDisplayName(fromName); + to->getDisplayName(toName); + if(fromName.compare(toName) != 0) { + errln("Fail: Expected "+toName+" but got " + fromName); + } + } + delete from; + delete to; + } +} + /** * Test the basic functionality of the getDisplayName() API. * @@ -1149,6 +1330,22 @@ TimeZoneTest::TestAlternateRules() + (offset / U_MILLIS_PER_HOUR) + " hours."); } +void TimeZoneTest::TestFractionalDST() { + const char* tzName = "Australia/Lord_Howe"; // 30 min offset + TimeZone* tz_icu = TimeZone::createTimeZone(tzName); + int dst_icu = tz_icu->getDSTSavings(); + UnicodeString id; + int32_t expected = 1800000; + if (expected != dst_icu) { + errln(UnicodeString("java reports dst savings of ") + expected + + " but icu reports " + dst_icu + + " for tz " + tz_icu->getID(id)); + } else { + logln(UnicodeString("both java and icu report dst savings of ") + expected + " for tz " + tz_icu->getID(id)); + } + delete tz_icu; +} + /** * Test country code support. Jitterbug 776. */ diff --git a/Build/source/libs/icu-xetex/test/intltest/tztest.h b/Build/source/libs/icu-xetex/test/intltest/tztest.h index 310a304b585..6aa70343ff0 100644 --- a/Build/source/libs/icu-xetex/test/intltest/tztest.h +++ b/Build/source/libs/icu-xetex/test/intltest/tztest.h @@ -1,7 +1,7 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and + * Copyright (c) 1997-2005, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -83,6 +83,10 @@ public: void TestEquivalentIDs(void); + void TestAliasedNames(void); + + void TestFractionalDST(void); + static const UDate INTERVAL; private: diff --git a/Build/source/libs/icu-xetex/test/intltest/ucaconf.cpp b/Build/source/libs/icu-xetex/test/intltest/ucaconf.cpp index 9e3a3612c29..e577a805427 100644 --- a/Build/source/libs/icu-xetex/test/intltest/ucaconf.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/ucaconf.cpp @@ -146,7 +146,7 @@ void UCAConformanceTest::openTestFile(const char *type) "INFO: Working with the stub file.\n" "If you need the full conformance test, please\n" "download the appropriate data files from:\n" - "http://oss.software.ibm.com/cvs/icu4j/unicodetools/com/ibm/text/data/"); + "http://dev.icu-project.org/cgi-bin/viewcvs.cgi/unicodetools/com/ibm/text/data/"); } } } diff --git a/Build/source/libs/icu-xetex/test/intltest/ucdtest.cpp b/Build/source/libs/icu-xetex/test/intltest/ucdtest.cpp index 714437f7ce6..e7195c25292 100644 --- a/Build/source/libs/icu-xetex/test/intltest/ucdtest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/ucdtest.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2004, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -78,6 +78,7 @@ derivedCorePropsNames[]={ "XID_Continue", "Default_Ignorable_Code_Point", "Grapheme_Extend", + "Grapheme_Link", /* Unicode 5 moves this property here from PropList.txt */ "Grapheme_Base" }; @@ -93,6 +94,7 @@ derivedCorePropsIndex[]={ UCHAR_XID_CONTINUE, UCHAR_DEFAULT_IGNORABLE_CODE_POINT, UCHAR_GRAPHEME_EXTEND, + UCHAR_GRAPHEME_LINK, UCHAR_GRAPHEME_BASE }; diff --git a/Build/source/libs/icu-xetex/test/intltest/uobjtest.cpp b/Build/source/libs/icu-xetex/test/intltest/uobjtest.cpp index be6784803c4..281586065c5 100644 --- a/Build/source/libs/icu-xetex/test/intltest/uobjtest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/uobjtest.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2002-2005, International Business Machines Corporation and + * Copyright (c) 2002-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -261,7 +261,7 @@ void UObjectTest::testIDs() #if !UCONFIG_NO_BREAK_ITERATION /* TESTCLASSID_ABSTRACT(BreakIterator); No staticID! */ TESTCLASSID_FACTORY(RuleBasedBreakIterator, BreakIterator::createLineInstance("mt",status)); - TESTCLASSID_FACTORY(DictionaryBasedBreakIterator, BreakIterator::createLineInstance("th",status)); + //TESTCLASSID_FACTORY(DictionaryBasedBreakIterator, BreakIterator::createLineInstance("th",status)); #endif //TESTCLASSID_DEFAULT(EscapeTransliterator); @@ -284,7 +284,7 @@ void UObjectTest::testIDs() TESTCLASSID_TRANSLIT(UnicodeNameTransliterator, "Any-Name"); TESTCLASSID_TRANSLIT(UppercaseTransliterator, "Upper"); TESTCLASSID_CTOR(CaseMapTransliterator, (UnicodeString(), NULL)); - //TESTCLASSID_CTOR(Quantifier, (NULL, 0, 0)); + TESTCLASSID_CTOR(Quantifier, (NULL, 0, 0)); #if UOBJTEST_TEST_INTERNALS TESTCLASSID_CTOR(FunctionReplacer, (NULL,NULL) ); /* don't care */ #endif @@ -414,6 +414,13 @@ void UObjectTest::testUMemory() { // destroy object and delete space manually p->~UnicodeString(); UnicodeString::operator delete(p, stackMemory); + + // Jitterbug 4452, for coverage + UnicodeString *pa = new UnicodeString[2]; + if ( !pa[0].isEmpty() || !pa[1].isEmpty()){ + errln("constructor used with array new did not work right"); + } + delete [] pa; #endif // try to call the compiler-generated UMemory::operator=(class UMemory const &) @@ -429,7 +436,7 @@ void UObjectTest::TestMFCCompatibility() { if(str->charAt(0) != 0x0040) { errln("debug new doesn't work."); } - delete str; + UnicodeString::operator delete(str, __FILE__, __LINE__); #endif } diff --git a/Build/source/libs/icu-xetex/test/intltest/usettest.cpp b/Build/source/libs/icu-xetex/test/intltest/usettest.cpp index d2ea4b488af..6a0a2f08f20 100644 --- a/Build/source/libs/icu-xetex/test/intltest/usettest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/usettest.cpp @@ -1,6 +1,6 @@ /* ************************************************************************************** -* Copyright (C) 1999-2005 Alan Liu ,International Business Machines Corporation and +* Copyright (C) 1999-2006 International Business Machines Corporation and * others. All Rights Reserved. ************************************************************************************** * Date Name Description @@ -68,6 +68,7 @@ UnicodeSetTest::runIndexedTest(int32_t index, UBool exec, CASE(17,TestSymbolTable); CASE(18,TestSurrogate); CASE(19,TestPosixClasses); + CASE(20,TestIteration); default: name = ""; break; } } @@ -674,6 +675,87 @@ void UnicodeSetTest::TestAPI() { } } +void UnicodeSetTest::TestIteration() { + UErrorCode ec = U_ZERO_ERROR; + int i = 0; + int outerLoop; + + // 6 code points, 3 ranges, 2 strings, 8 total elements + // Iteration will access them in sorted order - a, b, c, y, z, U0001abcd, "str1", "str2" + UnicodeSet set("[zabyc\\U0001abcd{str1}{str2}]", ec); + TEST_ASSERT_SUCCESS(ec); + UnicodeSetIterator it(set); + + for (outerLoop=0; outerLoop<3; outerLoop++) { + // Run the test multiple times, to check that iterator.reset() is working. + for (i=0; i<10; i++) { + UBool nextv = it.next(); + UBool isString = it.isString(); + int32_t codePoint = it.getCodepoint(); + //int32_t codePointEnd = it.getCodepointEnd(); + UnicodeString s = it.getString(); + switch (i) { + case 0: + TEST_ASSERT(nextv == TRUE); + TEST_ASSERT(isString == FALSE); + TEST_ASSERT(codePoint==0x61); + TEST_ASSERT(s == "a"); + break; + case 1: + TEST_ASSERT(nextv == TRUE); + TEST_ASSERT(isString == FALSE); + TEST_ASSERT(codePoint==0x62); + TEST_ASSERT(s == "b"); + break; + case 2: + TEST_ASSERT(nextv == TRUE); + TEST_ASSERT(isString == FALSE); + TEST_ASSERT(codePoint==0x63); + TEST_ASSERT(s == "c"); + break; + case 3: + TEST_ASSERT(nextv == TRUE); + TEST_ASSERT(isString == FALSE); + TEST_ASSERT(codePoint==0x79); + TEST_ASSERT(s == "y"); + break; + case 4: + TEST_ASSERT(nextv == TRUE); + TEST_ASSERT(isString == FALSE); + TEST_ASSERT(codePoint==0x7a); + TEST_ASSERT(s == "z"); + break; + case 5: + TEST_ASSERT(nextv == TRUE); + TEST_ASSERT(isString == FALSE); + TEST_ASSERT(codePoint==0x1abcd); + TEST_ASSERT(s == UnicodeString((UChar32)0x1abcd)); + break; + case 6: + TEST_ASSERT(nextv == TRUE); + TEST_ASSERT(isString == TRUE); + TEST_ASSERT(s == "str1"); + break; + case 7: + TEST_ASSERT(nextv == TRUE); + TEST_ASSERT(isString == TRUE); + TEST_ASSERT(s == "str2"); + break; + case 8: + TEST_ASSERT(nextv == FALSE); + break; + case 9: + TEST_ASSERT(nextv == FALSE); + break; + } + } + it.reset(); // prepare to run the iteration again. + } +} + + + + void UnicodeSetTest::TestStrings() { UErrorCode ec = U_ZERO_ERROR; @@ -1040,7 +1122,7 @@ void UnicodeSetTest::TestIndexOf() { void UnicodeSetTest::TestCloseOver() { UErrorCode ec = U_ZERO_ERROR; - char CASE[] = {(char)USET_CASE}; + char CASE[] = {(char)USET_CASE_INSENSITIVE}; char CASE_MAPPINGS[] = {(char)USET_ADD_CASE_MAPPINGS}; const char* DATA[] = { // selector, input, output diff --git a/Build/source/libs/icu-xetex/test/intltest/usettest.h b/Build/source/libs/icu-xetex/test/intltest/usettest.h index 0d496228c3b..f5c253872b0 100644 --- a/Build/source/libs/icu-xetex/test/intltest/usettest.h +++ b/Build/source/libs/icu-xetex/test/intltest/usettest.h @@ -1,7 +1,7 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation and + * Copyright (c) 1997-2006, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************** ********************************************************************** @@ -47,6 +47,8 @@ private: void TestAPI(void); + void TestIteration(void); + void TestStrings(void); void TestScriptSet(void); diff --git a/Build/source/libs/icu-xetex/test/intltest/utxttest.cpp b/Build/source/libs/icu-xetex/test/intltest/utxttest.cpp index 796e4c6a477..da6a4afb400 100644 --- a/Build/source/libs/icu-xetex/test/intltest/utxttest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/utxttest.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2005, International Business Machines Corporation and + * Copyright (c) 2005-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /************************************************************************ @@ -16,20 +16,23 @@ #include <unicode/utext.h> #include <unicode/utf8.h> #include <unicode/ustring.h> +#include <unicode/uchriter.h> #include "utxttest.h" static UBool gFailed = FALSE; static int gTestNum = 0; +// Forward decl +UText *openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status); #define TEST_ASSERT(x) \ -{if ((x)==FALSE) {errln("Test #%d failure in file %s at line %d\n", gTestNum, __FILE__, __LINE__);\ +{ if ((x)==FALSE) {errln("Test #%d failure in file %s at line %d\n", gTestNum, __FILE__, __LINE__);\ gFailed = TRUE;\ }} #define TEST_SUCCESS(status) \ -{if (U_FAILURE(status)) {errln("Test #%d failure in file %s at line %d. Error = \"%s\"\n", \ +{ if (U_FAILURE(status)) {errln("Test #%d failure in file %s at line %d. Error = \"%s\"\n", \ gTestNum, __FILE__, __LINE__, u_errorName(status)); \ gFailed = TRUE;\ }} @@ -49,6 +52,8 @@ UTextTest::runIndexedTest(int32_t index, UBool exec, if (exec) TextTest(); break; case 1: name = "ErrorTest"; if (exec) ErrorTest(); break; + case 2: name = "FreezeTest"; + if (exec) FreezeTest(); break; default: name = ""; break; } } @@ -221,6 +226,25 @@ void UTextTest::TestString(const UnicodeString &s) { TestCMR(sa, ut, cpCount, cpMap, cpMap); utext_close(ut); + // Character Iterator Tests + status = U_ZERO_ERROR; + const UChar *cbuf = sa.getBuffer(); + CharacterIterator *ci = new UCharCharacterIterator(cbuf, saLen, status); + TEST_SUCCESS(status); + ut = utext_openCharacterIterator(NULL, ci, &status); + TEST_SUCCESS(status); + TestAccess(sa, ut, cpCount, cpMap); + utext_close(ut); + delete ci; + + + // Fragmented UnicodeString (Chunk size of one) + // + status = U_ZERO_ERROR; + ut = openFragmentedUnicodeString(NULL, &sa, &status); + TEST_SUCCESS(status); + TestAccess(sa, ut, cpCount, cpMap); + utext_close(ut); // // UTF-8 test @@ -385,7 +409,7 @@ void UTextTest::TestCopyMove(const UnicodeString &us, UText *ut, UBool move, // clone the UText. The test will be run in the cloned copy // so that we don't alter the original. // - targetUT = utext_clone(NULL, ut, TRUE, &status); + targetUT = utext_clone(NULL, ut, TRUE, FALSE, &status); TEST_SUCCESS(status); UnicodeString targetUS(us); // And copy the reference string. @@ -410,7 +434,7 @@ void UTextTest::TestCopyMove(const UnicodeString &us, UText *ut, UBool move, // Compare the results of the two parallel tests int32_t usi = 0; // UnicodeString postion, utf-16 index. - int32_t uti = 0; // UText position, native index. + int64_t uti = 0; // UText position, native index. int32_t cpi; // char32 position (code point index) UChar32 usc; // code point from Unicode String UChar32 utc; // code point from UText @@ -429,7 +453,7 @@ void UTextTest::TestCopyMove(const UnicodeString &us, UText *ut, UBool move, goto cleanupAndReturn; } } - int32_t expectedNativeLength = utext_nativeLength(ut); + int64_t expectedNativeLength = utext_nativeLength(ut); if (move == FALSE) { expectedNativeLength += nativeLimit - nativeStart; } @@ -463,7 +487,7 @@ void UTextTest::TestReplace( // clone the target UText. The test will be run in the cloned copy // so that we don't alter the original. // - targetUT = utext_clone(NULL, ut, TRUE, &status); + targetUT = utext_clone(NULL, ut, TRUE, FALSE, &status); TEST_SUCCESS(status); UnicodeString targetUS(us); // And copy the reference string. @@ -486,11 +510,11 @@ void UTextTest::TestReplace( // Compare the results // int32_t usi = 0; // UnicodeString postion, utf-16 index. - int32_t uti = 0; // UText position, native index. + int64_t uti = 0; // UText position, native index. int32_t cpi; // char32 position (code point index) UChar32 usc; // code point from Unicode String UChar32 utc; // code point from UText - int32_t expectedNativeLength = 0; + int64_t expectedNativeLength = 0; utext_setNativeIndex(targetUT, 0); for (cpi=0; ; cpi++) { usc = targetUS.char32At(usi); @@ -526,8 +550,8 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c // // Check the length from the UText // - int expectedLen = cpMap[cpCount].nativeIdx; - int utlen = ut->nativeLength(ut); + int64_t expectedLen = cpMap[cpCount].nativeIdx; + int64_t utlen = utext_nativeLength(ut); TEST_ASSERT(expectedLen == utlen); // @@ -535,12 +559,12 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c // at the correct native offsets. // int i = 0; - int index; - int expectedIndex = 0; - int foundIndex = 0; + int64_t index; + int64_t expectedIndex = 0; + int64_t foundIndex = 0; UChar32 expectedC; UChar32 foundC; - int32_t len; + int64_t len; for (i=0; i<cpCount; i++) { expectedIndex = cpMap[i].nativeIdx; @@ -549,6 +573,8 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c expectedC = cpMap[i].cp; foundC = utext_next32(ut); TEST_ASSERT(expectedC == foundC); + foundIndex = utext_getPreviousNativeIndex(ut); + TEST_ASSERT(expectedIndex == foundIndex); if (gFailed) { return; } @@ -560,7 +586,7 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c utext_setNativeIndex(ut, 0); for (i=0; i<cpCount; i++) { expectedIndex = cpMap[i].nativeIdx; - foundIndex = utext_getNativeIndex(ut); + foundIndex = UTEXT_GETNATIVEINDEX(ut); TEST_ASSERT(expectedIndex == foundIndex); expectedC = cpMap[i].cp; foundC = UTEXT_NEXT32(ut); @@ -569,7 +595,7 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c return; } } - foundC = utext_next32(ut); + foundC = UTEXT_NEXT32(ut); TEST_ASSERT(foundC == U_SENTINEL); // @@ -588,10 +614,12 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c for (i=cpCount-1; i>=0; i--) { expectedC = cpMap[i].cp; expectedIndex = cpMap[i].nativeIdx; + int64_t prevIndex = utext_getPreviousNativeIndex(ut); foundC = utext_previous32(ut); foundIndex = utext_getNativeIndex(ut); TEST_ASSERT(expectedIndex == foundIndex); TEST_ASSERT(expectedC == foundC); + TEST_ASSERT(prevIndex == foundIndex); if (gFailed) { return; } @@ -603,11 +631,16 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c // foundIndex = utext_getNativeIndex(ut); TEST_ASSERT(foundIndex == 0); + foundIndex = utext_getPreviousNativeIndex(ut); + TEST_ASSERT(foundIndex == 0); + foundC = utext_previous32(ut); TEST_ASSERT(foundC == U_SENTINEL); foundIndex = utext_getNativeIndex(ut); TEST_ASSERT(foundIndex == 0); + foundIndex = utext_getPreviousNativeIndex(ut); + TEST_ASSERT(foundIndex == 0); // And again, with the macros @@ -616,7 +649,7 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c expectedC = cpMap[i].cp; expectedIndex = cpMap[i].nativeIdx; foundC = UTEXT_PREVIOUS32(ut); - foundIndex = utext_getNativeIndex(ut); + foundIndex = UTEXT_GETNATIVEINDEX(ut); TEST_ASSERT(expectedIndex == foundIndex); TEST_ASSERT(expectedC == foundC); if (gFailed) { @@ -628,12 +661,12 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c // Backwards iteration, above, should have left our iterator // position at zero, and continued backwards iterationshould fail. // - foundIndex = utext_getNativeIndex(ut); + foundIndex = UTEXT_GETNATIVEINDEX(ut); TEST_ASSERT(foundIndex == 0); - foundC = utext_previous32(ut); + foundC = UTEXT_PREVIOUS32(ut); TEST_ASSERT(foundC == U_SENTINEL); - foundIndex = utext_getNativeIndex(ut); + foundIndex = UTEXT_GETNATIVEINDEX(ut); TEST_ASSERT(foundIndex == 0); if (gFailed) { return; @@ -649,7 +682,6 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c expectedC = cpMap[cpIndex].cp; foundC = utext_next32From(ut, index); TEST_ASSERT(expectedC == foundC); - TEST_ASSERT(expectedIndex == foundIndex); if (gFailed) { return; } @@ -662,7 +694,6 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c expectedC = cpMap[cpIndex].cp; foundC = utext_previous32From(ut, index); TEST_ASSERT(expectedC == foundC); - TEST_ASSERT(expectedIndex == foundIndex); if (gFailed) { return; } @@ -680,6 +711,8 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c index = utext_getNativeIndex(ut); expectedIndex = cpMap[i].nativeIdx; TEST_ASSERT(expectedIndex == index); + index = UTEXT_GETNATIVEINDEX(ut); + TEST_ASSERT(expectedIndex == index); } // Walk through frontwards, incrementing by two @@ -689,6 +722,8 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c index = utext_getNativeIndex(ut); expectedIndex = cpMap[i].nativeIdx; TEST_ASSERT(expectedIndex == index); + index = UTEXT_GETNATIVEINDEX(ut); + TEST_ASSERT(expectedIndex == index); } // walk through the string backwards, decrementing by one. @@ -698,6 +733,8 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c expectedIndex = cpMap[i].nativeIdx; index = utext_getNativeIndex(ut); TEST_ASSERT(expectedIndex == index); + index = UTEXT_GETNATIVEINDEX(ut); + TEST_ASSERT(expectedIndex == index); utext_moveIndex32(ut, -1); } @@ -709,6 +746,8 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c expectedIndex = cpMap[i].nativeIdx; index = utext_getNativeIndex(ut); TEST_ASSERT(expectedIndex == index); + index = UTEXT_GETNATIVEINDEX(ut); + TEST_ASSERT(expectedIndex == index); utext_moveIndex32(ut, -3); } @@ -742,7 +781,12 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c TEST_SUCCESS(status); TEST_ASSERT(buf[0] == 0); } else { - TEST_ASSERT(buf[0] == us.charAt(0)); + // Buf len == 1, extracting a single 16 bit value. + // If the data char is supplementary, it doesn't matter whether the buffer remains unchanged, + // or whether the lead surrogate of the pair is extracted. + // It's a buffer overflow error in either case. + TEST_ASSERT(buf[0] == us.charAt(0) || + buf[0] == 0x5555 && U_IS_SUPPLEMENTARY(us.char32At(0))); TEST_ASSERT(buf[1] == 0x5555); if (us.length() == 1) { TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING); @@ -751,7 +795,7 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c } } - delete buf; + delete []buf; } @@ -878,7 +922,7 @@ void UTextTest::ErrorTest() TEST_SUCCESS(status); isExpensive = utext_isLengthExpensive(utb); TEST_ASSERT(isExpensive == TRUE); - int32_t len = utext_nativeLength(utb); + int64_t len = utext_nativeLength(utb); TEST_ASSERT(len == 99); isExpensive = utext_isLengthExpensive(utb); TEST_ASSERT(isExpensive == FALSE); @@ -910,7 +954,9 @@ void UTextTest::ErrorTest() int32_t startMapLimit = sizeof(startMap) / sizeof(int32_t); for (i=0; i<startMapLimit; i++) { utext_setNativeIndex(ut, i); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); + TEST_ASSERT(cpIndex == startMap[i]); + cpIndex = UTEXT_GETNATIVEINDEX(ut); TEST_ASSERT(cpIndex == startMap[i]); } @@ -918,7 +964,7 @@ void UTextTest::ErrorTest() for (i=0; i<startMapLimit; i++) { UChar32 c32 = utext_char32At(ut, i); TEST_ASSERT(c32 == c32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == startMap[i]); } @@ -926,15 +972,16 @@ void UTextTest::ErrorTest() for (i=0; i<startMapLimit; i++) { UChar32 c32 = utext_next32From(ut, i); TEST_ASSERT(c32 == c32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == nextMap[i]); } // check utext_previous32From for (i=0; i<startMapLimit; i++) { + gTestNum++; UChar32 c32 = utext_previous32From(ut, i); TEST_ASSERT(c32 == pr32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == prevMap[i]); } @@ -978,7 +1025,7 @@ void UTextTest::ErrorTest() int i; for (i=0; i<startMapLimit; i++) { utext_setNativeIndex(ut, i); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == startMap[i]); } @@ -986,7 +1033,7 @@ void UTextTest::ErrorTest() for (i=0; i<startMapLimit; i++) { UChar32 c32 = utext_char32At(ut, i); TEST_ASSERT(c32 == c32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == startMap[i]); } @@ -994,7 +1041,7 @@ void UTextTest::ErrorTest() for (i=0; i<startMapLimit; i++) { UChar32 c32 = utext_next32From(ut, i); TEST_ASSERT(c32 == c32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == nextMap[i]); } @@ -1002,7 +1049,7 @@ void UTextTest::ErrorTest() for (i=0; i<startMapLimit; i++) { UChar32 c32 = utext_previous32From(ut, i); TEST_ASSERT(c32 == pr32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == prevMap[i]); } @@ -1045,7 +1092,7 @@ void UTextTest::ErrorTest() int i; for (i=0; i<startMapLimit; i++) { utext_setNativeIndex(ut, i); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == startMap[i]); } @@ -1053,7 +1100,7 @@ void UTextTest::ErrorTest() for (i=0; i<startMapLimit; i++) { UChar32 c32 = utext_char32At(ut, i); TEST_ASSERT(c32 == c32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == startMap[i]); } @@ -1061,7 +1108,7 @@ void UTextTest::ErrorTest() for (i=0; i<startMapLimit; i++) { UChar32 c32 = utext_next32From(ut, i); TEST_ASSERT(c32 == c32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == nextMap[i]); } @@ -1069,7 +1116,7 @@ void UTextTest::ErrorTest() for (i=0; i<startMapLimit; i++) { UChar32 c32 = utext_previous32From(ut, i); TEST_ASSERT(c32 == pr32Map[i]); - int32_t cpIndex = utext_getNativeIndex(ut); + int64_t cpIndex = utext_getNativeIndex(ut); TEST_ASSERT(cpIndex == prevMap[i]); } @@ -1091,8 +1138,165 @@ void UTextTest::ErrorTest() utext_close(ut); } +} + + +void UTextTest::FreezeTest() { + // Check isWritable() and freeze() behavior. + // + + UnicodeString ustr("Hello, World."); + const char u8str[] = {char(0x31), (char)0x32, (char)0x33, 0}; + const UChar u16str[] = {(UChar)0x31, (UChar)0x32, (UChar)0x44, 0}; + + UErrorCode status = U_ZERO_ERROR; + UText *ut = NULL; + UText *ut2 = NULL; + + ut = utext_openUTF8(ut, u8str, -1, &status); + TEST_SUCCESS(status); + UBool writable = utext_isWritable(ut); + TEST_ASSERT(writable == FALSE); + utext_copy(ut, 1, 2, 0, TRUE, &status); + TEST_ASSERT(status == U_NO_WRITE_PERMISSION); + + status = U_ZERO_ERROR; + ut = utext_openUChars(ut, u16str, -1, &status); + TEST_SUCCESS(status); + writable = utext_isWritable(ut); + TEST_ASSERT(writable == FALSE); + utext_copy(ut, 1, 2, 0, TRUE, &status); + TEST_ASSERT(status == U_NO_WRITE_PERMISSION); + + status = U_ZERO_ERROR; + ut = utext_openUnicodeString(ut, &ustr, &status); + TEST_SUCCESS(status); + writable = utext_isWritable(ut); + TEST_ASSERT(writable == TRUE); + utext_freeze(ut); + writable = utext_isWritable(ut); + TEST_ASSERT(writable == FALSE); + utext_copy(ut, 1, 2, 0, TRUE, &status); + TEST_ASSERT(status == U_NO_WRITE_PERMISSION); + + status = U_ZERO_ERROR; + ut = utext_openUnicodeString(ut, &ustr, &status); + TEST_SUCCESS(status); + ut2 = utext_clone(ut2, ut, FALSE, FALSE, &status); // clone with readonly = false + TEST_SUCCESS(status); + writable = utext_isWritable(ut2); + TEST_ASSERT(writable == TRUE); + ut2 = utext_clone(ut2, ut, FALSE, TRUE, &status); // clone with readonly = true + TEST_SUCCESS(status); + writable = utext_isWritable(ut2); + TEST_ASSERT(writable == FALSE); + utext_copy(ut2, 1, 2, 0, TRUE, &status); + TEST_ASSERT(status == U_NO_WRITE_PERMISSION); + + status = U_ZERO_ERROR; + ut = utext_openConstUnicodeString(ut, (const UnicodeString *)&ustr, &status); + TEST_SUCCESS(status); + writable = utext_isWritable(ut); + TEST_ASSERT(writable == FALSE); + utext_copy(ut, 1, 2, 0, TRUE, &status); + TEST_ASSERT(status == U_NO_WRITE_PERMISSION); + + // Deep Clone of a frozen UText should re-enable writing in the copy. + status = U_ZERO_ERROR; + ut = utext_openUnicodeString(ut, &ustr, &status); + TEST_SUCCESS(status); + utext_freeze(ut); + ut2 = utext_clone(ut2, ut, TRUE, FALSE, &status); // deep clone + TEST_SUCCESS(status); + writable = utext_isWritable(ut2); + TEST_ASSERT(writable == TRUE); + + + // Deep clone of a frozen UText, where the base type is intrinsically non-writable, + // should NOT enable writing in the copy. + status = U_ZERO_ERROR; + ut = utext_openUChars(ut, u16str, -1, &status); + TEST_SUCCESS(status); + utext_freeze(ut); + ut2 = utext_clone(ut2, ut, TRUE, FALSE, &status); // deep clone + TEST_SUCCESS(status); + writable = utext_isWritable(ut2); + TEST_ASSERT(writable == FALSE); + + // cleanup + utext_close(ut); + utext_close(ut2); +} + + +// +// Fragmented UText +// A UText type that works with a chunk size of 1. +// Intended to test for edge cases. +// Input comes from a UnicodeString. +// +// ut.b the character. Put into both halves. +// + +U_CDECL_BEGIN +static UBool U_CALLCONV +fragTextAccess(UText *ut, int64_t index, UBool forward) { + const UnicodeString *us = (const UnicodeString *)ut->context; + UChar c; + int32_t length = us->length(); + if (forward && index>=0 && index<length) { + c = us->charAt((int32_t)index); + ut->b = c | c<<16; + ut->chunkOffset = 0; + ut->chunkLength = 1; + ut->chunkNativeStart = index; + ut->chunkNativeLimit = index+1; + return true; + } + if (!forward && index>0 && index <=length) { + c = us->charAt((int32_t)index-1); + ut->b = c | c<<16; + ut->chunkOffset = 1; + ut->chunkLength = 1; + ut->chunkNativeStart = index-1; + ut->chunkNativeLimit = index; + return true; + } + ut->b = 0; + ut->chunkOffset = 0; + ut->chunkLength = 0; + if (index <= 0) { + ut->chunkNativeStart = 0; + ut->chunkNativeLimit = 0; + } else { + ut->chunkNativeStart = length; + ut->chunkNativeLimit = length; + } + return false; +} +U_CDECL_END + +// Function table to be used with this fragmented text provider. +// Initialized in the open function. +UTextFuncs fragmentFuncs; + +// Open function for the fragmented text provider. +UText * +openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status) { + ut = utext_openUnicodeString(ut, s, status); + if (U_FAILURE(*status)) { + return ut; + } + // Copy of the function table from the stock UnicodeString UText, + // and replace the entry for the access function. + memcpy(&fragmentFuncs, ut->pFuncs, sizeof(fragmentFuncs)); + fragmentFuncs.access = fragTextAccess; + ut->pFuncs = &fragmentFuncs; + ut->chunkContents = (UChar *)&ut->b; + ut->pFuncs->access(ut, 0, TRUE); + return ut; } diff --git a/Build/source/libs/icu-xetex/test/intltest/utxttest.h b/Build/source/libs/icu-xetex/test/intltest/utxttest.h index 8cd3464db2b..9057a50c22a 100644 --- a/Build/source/libs/icu-xetex/test/intltest/utxttest.h +++ b/Build/source/libs/icu-xetex/test/intltest/utxttest.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2005, International Business Machines Corporation and + * Copyright (c) 2005-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /************************************************************************ @@ -30,6 +30,7 @@ public: void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL); void TextTest(); void ErrorTest(); + void FreezeTest(); private: struct m { // Map between native indices & code points. diff --git a/Build/source/libs/icu-xetex/test/intltest/uvectest.cpp b/Build/source/libs/icu-xetex/test/intltest/uvectest.cpp index c061ceb9523..e73cb8fcaa0 100644 --- a/Build/source/libs/icu-xetex/test/intltest/uvectest.cpp +++ b/Build/source/libs/icu-xetex/test/intltest/uvectest.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2004-2004, International Business Machines Corporation and + * Copyright (c) 2004-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -114,6 +114,11 @@ void UVectorTest::UVector_API() { TEST_ASSERT(a->elementAti(1) == 15); TEST_ASSERT(a->elementAti(2) == 20); TEST_ASSERT(a->elementAti(3) == 30); + TEST_ASSERT(a->indexOf((int32_t)3) == -1); + TEST_ASSERT(a->indexOf((int32_t)15) == 1); + TEST_ASSERT(a->indexOf((int32_t)15, 2) == -1); + TEST_ASSERT(a->contains((int32_t)15)); + TEST_ASSERT(!a->contains((int32_t)5)); delete a; } diff --git a/Build/source/libs/icu-xetex/test/intltest/wbnf.cpp b/Build/source/libs/icu-xetex/test/intltest/wbnf.cpp new file mode 100644 index 00000000000..4a43a2ccbc7 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/wbnf.cpp @@ -0,0 +1,1771 @@ +/* + ****************************************************************************** + * Copyright (C) 2005-2006, International Business Machines Corporation and * + * others. All Rights Reserved. * + ****************************************************************************** + */ + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <time.h> + +#include "wbnf.h" + +// Most of this code is meant to test the test code. It's a self test. +// Normally this isn't run. +#define TEST_WBNF_TEST 0 + +/////////////////////////////////////////////////////////// +// +// Constants and the most basic helper classes +// + +static const char DIGIT_CHAR[] = "0123456789"; +static const char WHITE_SPACE[] = {'\t', ' ', '\r', '\n', 0}; +static const char ALPHABET[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; +static const char SPECIAL[] = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; + +static inline UBool isInList(const char c /*in*/, const char list[] /*in*/){ + const char * p = list; + for (;*p != 0 && *p != c; p++); + return *p?TRUE:FALSE; +} +static inline UBool isDigit(char c) {return isInList(c, DIGIT_CHAR);} +static inline UBool isWhiteSpace(char c) {return isInList(c, WHITE_SPACE);} +static inline UBool isAlphabet(char c) {return isInList(c, ALPHABET);} +static inline UBool isSpecialAsciiChar(char c) {return isInList(c,SPECIAL);} + + + +/////////////////////////////////////////////////////////// +// +// Helper classes +// + +class Buffer_byte{ +// Utility class, can be treated as an auto expanded array. no boundary check. + + typedef char byte; + byte * start; + byte * current; + int buffer_size; // size unit is byte +public: + inline int content_size(){return current - start;} // size unit is byte + +private: + inline void expand(int add_size = 100){ // size unit is byte + int new_size = buffer_size + add_size; + + int cs_snap = content_size(); + start = (byte *) realloc(start, new_size); // may change the value of start + current = start + cs_snap; + + memset(current, 0, add_size); + buffer_size = new_size; + } + + inline void expand_to(int size){ + int r = size - buffer_size; + if (r > 0) { + expand(r); // simply expand, no block alignment + } + } + Buffer_byte(const Buffer_byte &); + Buffer_byte & operator = (const Buffer_byte &); +public: + Buffer_byte():start(NULL),current(start),buffer_size(0){ + expand(); + } + ~Buffer_byte(){ + free(start); + } + + inline void reset(){ + start != NULL ? memset(start, 0, buffer_size) : 0; + current = start; + } + + // Using memory copy method to append a C array to buffer, + inline void append(const void * c, int size){ // size unit is byte + expand_to(content_size() + size) ; + memcpy(current, c, size); + current = current + size; + } + + byte * buffer(){ + return start; + } +}; + +/* + The class(es) try to work as bulid-in array, so it overloads these two operators + operator type *(); + type & operator[]; + The first is used to auto type convert, the latter is used to select member. + + A small trick is the class does not overload the address-of operator. This + behavior is different from bulid-in array, but it give us the opportunity + to get the address of the class itself. +*/ +//template<typename type> +// class BUFFER{ +// typedef BUFFER name; +#define BUFFER(type, name)\ + class name {\ + private:\ + Buffer_byte buf;\ + public:\ + name & reset() {buf.reset(); return *this;}\ + name & append(type c) {buf.append(&c, sizeof(type)); return *this;}\ + name & append_array(const type * p, int size) {buf.append(p, sizeof(type)*size); return *this;}\ + type & operator [] (int i) { return ((type *) buf.buffer())[i];}\ + operator type *(){return (type *) buf.buffer();} \ + int content_size(){return buf.content_size() / sizeof(type);}\ + } + + +class Pick{ +/* The Pick is the basic language generator element*/ +public: + // generate a string accroding the syntax + // Return a null-terminated c-string. The buffer is owned by callee. + virtual const char* next() = 0; + virtual ~Pick(){}; +}; + +//typedef BUFFER<char> Buffer_char; +//typedef BUFFER<int> Buffer_int; +//typedef BUFFER<Pick *> Buffer_pPick; +BUFFER(char, Buffer_char); +BUFFER(int, Buffer_int); +BUFFER(Pick *, Buffer_pPick); + +class SymbolTable{ +/* Helper class. +* It's a mapping table between 'variable name' and its 'active Pick object' +*/ +private: + Buffer_char name_buffer; // var names storage space + + Buffer_int names; // points to name (offset in name_buffer) + Buffer_pPick refs; // points to Pick + + int get_index(const char *const var_name){ + int len = names.content_size(); + for (int i=0; i< len; i++){ + if (strcmp(var_name, name_buffer + names[i]) == 0){ + return i; + } + } + return -1; + } + +public: + enum RESULT {EMPTY, NO_VAR, NO_REF, HAS_REF}; + + RESULT find(const char *const var_name /*[in] c-string*/, Pick * * ref = NULL /*[out] Pick* */){ + if (!var_name) return EMPTY; // NULL name + + int i = get_index(var_name); + if (i == -1){ + return NO_VAR; // new name + } + if (!refs[i]){ // exist name, no ref + return NO_REF; + } else { + if (ref) { + *ref = refs[i]; + } + return HAS_REF; // exist name, has ref + } + } + + void put(const char *const var_name, Pick *const var_ref = NULL){ + int i = get_index(var_name); + switch(find(var_name)){ + case EMPTY: // NULL name + break; + case NO_VAR: // new name + int offset; + offset = name_buffer.content_size(); + name_buffer.append_array(var_name, strlen(var_name) + 1); + names.append(offset); + refs.append(var_ref); + break; + case NO_REF: // exist name, no ref + refs[i] = var_ref; // link definition with variable + break; + case HAS_REF: // exist name, has ref + if (var_ref){ + refs[i] = var_ref; + } + break; + default: + ; // ASSERT(FALSE); + } + return; + } + + UBool is_complete(){ + int n = names.content_size(); + for (int i=0; i<n; ++i){ + if (refs[i] == NULL){ + return FALSE; + } + } + return TRUE; + } + + void reset(){ + names.reset(); + name_buffer.reset(); + + // release memory here + int s = refs.content_size(); + for (int i=0; i < s; i++){ + delete refs[i]; // TOFIX: point alias/recursion problem + } + refs.reset(); + } + + ~SymbolTable(){ + reset(); + } +}; + + +/* +// Document of class Escaper +// +// ATTENTION: +// From http://icu.sourceforge.net/userguide/Collate_Customization.html. +// We get the precedence of escape/quote operations +// +// (highest) 1. backslash \ +// 2. two single quotes '' +// 3. quoting ' ' +// +// ICU Collation should accept following as the same string. +// +// 1) 'ab'c _ +// 2) a\bc \ +// 3) a'b'\c |- They are equal. +// 4) abc _/ +// +// From "two single quotes", we have following deductions +// D1. empty quoting is illgal. (obviously) +// D2. no contact operation between two quotings +// '.''.' is not .. it is .'. +// D3. "two single quotes" cannot contact two quoting simultaneously +// '..''''.' is not ..'. it is ..''. +// NOTICE: +// "two single quotes" can contact before one quoting +// '''.' is '. +// "two single quotes" can literally contact after one quoting +// But, from syntax, it's one quoting including a "two single quotes" +// '.''' is .' +// D4. "two single quotes" cannot solely be included in quoting +// '''' is not ' it is '' +// NOTICE: These are legal +// '.''.' is .'. +// '.''' is .' +// +// dicision +// /\ +// /__\ +// output buffer input buffer +// +// To make our dicision (within an atom operation) without caring input and output buffer, +// following calling pattern (within an atom operation) shall be avoided +// +// P1 open_quoting() then close_quoting() (direct violation) D1 +// P2 close_quoting() then open_quoting() (direct violation) D2 +// P3 empty open_quoting() (indirect violation) D1, D4 +// P4 empty close_quoting() (indirect violation) D2, D3 +// P5 open_quoting() then two single quotes (indirect violation) D4 +// P6 close_quoting() then two single quotes (indirect violation) D3 +// +// two single quotes escaping will not open_ or close_ quoting() +// The choice will not lose some quoing forms. +// +// For open_quoting(), +// we may get this form quoting ''' P5 +// It may raise a bug ''''x +// If we expect +// '''.' let the next char open the quoting +// '.''.' the quoting is already opened by preceding char +// +// For close_quoting() +// we will get this form quoting '.''' P6 +// It may raise a bug '.''''.' +// If we expect +// '.'''\. let the next char close the quoting +// '.''''.' the expectation is wrong! using '.'\''.' instead +// +// It's a hard work to re-adjust generation opportunity for various escaping form. +// We just simply ignore it. +*/ +class Escaper{ +public: + enum CHOICE {YES, NO, RAND}; + enum ESCAPE_FORM {BSLASH_ONLY, QUOTE_ONLY, QUOTE_AND_BSLAH, RAND_ESC}; +private: + class Bool{ // A wrapper class for CHOICE, to auto adapter UBool class + private: + const CHOICE tag; + public: + Bool(CHOICE flag=RAND):tag(flag){} + operator UBool() { // conversion operator + return tag == RAND ? rand()%2 : tag == YES; + //if (tag == RAND){ + // return rand()%2 == 1; + //} else { + // return tag == YES ? TRUE : FALSE; + //} + } + }; +public: + Escaper(CHOICE escapeLiteral = RAND, + CHOICE twoQuotesEscape = RAND, + ESCAPE_FORM escapeForm = RAND_ESC): + escape_form(escapeForm), + escape_literal(escapeLiteral), + two_quotes_escape(twoQuotesEscape), + is_quoting(FALSE){} +private: + Buffer_char str; + ESCAPE_FORM escape_form; + Bool escape_literal; + Bool two_quotes_escape; + UBool quote_escape; + UBool bslash_escape; + UBool is_quoting; + + void set_options(){ + ESCAPE_FORM t = escape_form == RAND_ESC ? (ESCAPE_FORM) (rand()%3) : escape_form; + switch (t){ + case BSLASH_ONLY : + bslash_escape = TRUE; quote_escape = FALSE; break; + case QUOTE_ONLY: + bslash_escape = FALSE;quote_escape = TRUE; break; + case QUOTE_AND_BSLAH: + bslash_escape = TRUE; quote_escape = TRUE; break; + default: + ;// error + } + } + + void reset(){ + str.reset(); + is_quoting = FALSE; + } + + inline void open_quoting(){ + if(is_quoting){ + // do nothing + } else { + str.append('\''); + is_quoting = TRUE; + } + } + inline void close_quoting(){ + if(is_quoting){ + str.append('\''); + is_quoting = FALSE; + } else { + // do nothing + } + } + + // str [in] null-terminated c-string + void append(const char * strToAppend){ + for(;*strToAppend != 0; strToAppend++){ + append(*strToAppend); + } + } + + inline void append(const char c){ + set_options(); + + if (c == '\\'){ + quote_escape ? open_quoting() : close_quoting(); + //bslash_escape always true here + str.append('\\'); + str.append('\\'); + } else if (c == '\''){ + if (two_quotes_escape){ // quoted using two single quotes + // See documents in anonymous.design + str.append('\''); + str.append('\''); + } else{ + quote_escape ? open_quoting() : close_quoting(); + //bslash_escape always true here + str.append('\\'); + str.append('\''); + } + } else if (isSpecialAsciiChar(c) || isWhiteSpace(c)){ + quote_escape ? open_quoting() : close_quoting(); + if (bslash_escape) str.append('\\'); + str.append(c); + } else { //if (isAlphabet(c) || isDigit(c) || TRUE){ // treat others as literal + if (escape_literal){ + quote_escape ? open_quoting() : close_quoting(); + if (bslash_escape) str.append('\\'); + str.append(c); + } else { + close_quoting(); + str.append(c); + } + } + } + +public: + // Return a null-terminate c-string. The buffer is owned by callee. + char * operator()(const char * literal /*c-string*/){ + str.reset(); + for(;*literal != 0; literal++){ + append(*literal); + } + close_quoting(); // P4 exception, to close whole quoting + return str; + } +}; + +class WeightedRand{ +// Return a random number in [0, size) +// Every number has different chance (aka weight) to be selected. +private: + Buffer_int weights; + double total; + WeightedRand(const WeightedRand &); + WeightedRand & operator = (const WeightedRand &); +public: + WeightedRand(Buffer_int * weight_list = NULL, int size = 0){ + if ( weight_list == NULL){ + for (int i=0; i<size; ++i) weights.append(DEFAULT_WEIGHT); + } else { + int s = weight_list->content_size(); + if (s < size){ + weights.append_array( (*weight_list),s); + for (int i=s; i<size; ++i) weights.append(DEFAULT_WEIGHT); + } else { // s >= size + weights.append_array( (*weight_list),size); + } + } + total = 0; + int c = weights.content_size(); + for (int i=0; i<c; ++i){ + total += weights[i]; + } + } + + void append(int weight){ + weights.append(weight); + total += weight; + } + + // Give a random number with the consideration of weight. + // Every random number is associated with a weight. + // It identifies the chance to be selected, + // larger weight has more chance to be selected. + // + // + // ______________________ every slot has equal chance + // + // [____][_][___][______] each item has different slots, hence different chance + // + // + // The algorithms to generate the number is illustrated by preceding figure. + // First, a slot is selected by rand(). Then we translate the slot to corresponding item. + // + int next(){ + // get a random in [0,1] + double reference_mark = (double)rand() / (double)RAND_MAX; + + // get the slot's index, 0 <= mark <= total; + double mark = total * reference_mark; + + // translate the slot to corresponding item + int i=0; + for (;;){ + mark -= weights[i]; // 0 <= mark <= total + if (mark <= 0) + break; + i++; + } + return i; + } +}; + +/////////////////////////////////////////////////////////// +// +// The parser result nodes +// + +class Literal : public Pick { +public: + virtual const char* next(){ + return str; + } + Literal(const char * s /*c-string*/){ + str.append_array(s, strlen(s) + 1); + } +private: + Buffer_char str; //null-terminated c-string +}; + +class Variable : public Pick { +public: + Variable(SymbolTable * symbols, const char * varName, Pick * varRef = NULL){ + this->var_name.append_array(varName, strlen(varName) + 1); + if ((symbol_table = symbols)){ + symbol_table->put(varName, varRef); + } + } + + operator const char *(){ + return var_name; + } + + virtual const char* next(){ + if (symbol_table){ + Pick * var_ref = NULL; + symbol_table->find(var_name, &var_ref); + if (var_ref) { + return var_ref->next(); + } + } + return ""; // dumb string + } +private: + Buffer_char var_name; + SymbolTable * symbol_table; +}; + +class Quote : public Pick{ +public: + Quote(Pick & base):item(base),e(Escaper::NO, Escaper::NO, Escaper::BSLASH_ONLY){ + } + virtual const char* next(){ + return e(item.next()); + } +private: + Pick & item; + Buffer_char str; + Escaper e; +}; + + +class Morph : public Pick{ +/* +The difference between morph and an arbitrary random string is that +a morph changes slowly. When we build collation rules, for example, +it is a much better test if the strings we use are all in the same +'neighborhood'; they share many common characters. +*/ +public: + Morph(Pick & base):item(base){} + + virtual const char* next(){ + current.reset(); + const char * s = item.next(); + current.append_array(s, strlen(s) + 1); + if (last.content_size() == 0) { + str.reset(); + last.reset(); + str.append_array(current, current.content_size()); + last.append_array(current, current.content_size()); + } else { + morph(); + } + return str; + } +private: + Pick & item; + Buffer_char str; + Buffer_char last; + Buffer_char current; + + char * p_last; + char * p_curr; + + void copy_curr(){ + if (*p_curr) { + str.append(*p_curr); + p_curr++; + } + } + + void copy_last(){ + if (*p_last) { + str.append(*p_last); + p_last++; + } + } + + // copy 0, 1, or 2 character(s) to str + void copy(){ + static WeightedRand wr(& Buffer_int().append(DEFAULT_WEIGHT * 10), 5); + + switch (wr.next()){ + case 0: // copy last -- has 10 times chance than others + copy_last(); + break; + case 1: // copy both + copy_curr(); + copy_last(); + break; + case 2: // copy both + copy_last(); + copy_curr(); + break; + case 3: + copy_curr(); + break; + case 4: // copy nothing + break; + default: + // ASSERT(FALSE); + ; + } + } + + void morph(void){ + int min = strlen(last); + int max = strlen(current); + if (min > max){ + int temp = min; + min = max; + max = temp; + } + + int len = min + rand()%(max - min + 1); // min + [0, diff] + p_curr = current; + p_last = last; + str.reset(); + + for (; str.content_size()<len && *p_curr && *p_last;){ + copy(); // copy 0, 1, or 2 character(s) to str + } + + if (str.content_size() == len) { + str.append(0); + final(); + return; + } + + if (str.content_size() > len) { // if the last copy copied two characters + str[len]=0; + final(); + return; + } + + // str.content_size() < len + if (*p_last) { + for (; str.content_size() < len; copy_last()); + } else if (*p_curr){ + for (; str.content_size() < len; copy_curr()); + } + + int last_len = last.content_size(); + for (;str.content_size() < len;){ + str.append(last[rand()%last_len]); + } + str.append(0); + final(); + } + + void final(){ + last.reset(); + last.append_array(current, current.content_size()); + } +}; + +class Sequence : public Pick { +public: + virtual const char* next(){ + str.reset(); + int s = items.content_size(); + for(int i=0; i < s; i++){ + const char * t = items[i]->next(); + str.append_array(t, strlen(t)); + } + str.append(0); // terminal null + return str; + } + + void append (Pick * node){ + items.append(node); + } + + virtual ~Sequence(){ + int s = items.content_size(); + for(int i=0; i < s; i++){ + //How can assure the item is got from heap? + //Let's assume it. + delete items[i]; // TOFIX: point alias/recursion problem + items[i] = NULL; + } + } +private: + Buffer_pPick items; + Buffer_char str; //null-terminated c-string +}; + +class Repeat : public Pick { +private: + Pick * item; + Buffer_char str; + WeightedRand wr; + int min; + int max; + int select_a_count(){ + return min + wr.next(); + } +public: + virtual const char* next(){ + str.reset(); + int c = select_a_count(); + for(int i=0; i< c; i++){ + const char * t = item->next(); + str.append_array(t, strlen(t)); + } + str.append(0); + return str; + } + + Repeat(Pick * base, int minCount =0, int maxCount = 1, Buffer_int * weights = NULL): + wr(weights, maxCount-minCount +1) { + this->item = base; + this->min = minCount; + this->max = maxCount; + } + virtual ~Repeat(){ + delete item; // TOFIX: point alias/recursion problem + item = NULL; + } +}; + + +class Alternation : public Pick { +public: + virtual const char* next(){ + str.reset(); + int i = wr.next(); + const char * t = items[i]->next(); + str.append_array(t, strlen(t) + 1); + return str; + } + virtual ~Alternation(){ + int s = items.content_size(); + for(int i=0; i < s; i++){ + delete items[i]; // TOFIX: point alias/recursion problem + items[i] = NULL; + } + } + + Alternation & append (Pick * node, int weight = DEFAULT_WEIGHT){ + items.append(node); + wr.append(weight); + return *this; + } +private: + Buffer_pPick items; + Buffer_char str; // null-terminated c-string + WeightedRand wr; +}; + +/////////////////////////////////////////////////////////// +// +// The parser +// + +enum TokenType {STRING, VAR, NUMBER, STREAM_END, ERROR, QUESTION, STAR, PLUS, LBRACE, RBRACE, LPAR, RPAR, SEMI, EQ, COMMA, BAR, AT, WAVE, PERCENT}; + +class Scanner{ +friend int DumpScanner(Scanner & s, UBool dumb); +private: + const char * source; + const char * working; + const char * history; // for debug + enum StateType {START, IN_NUM, IN_VAR_FIRST, IN_VAR, IN_QUOTE, IN_QUOTE_BSLASH, IN_BSLASH, IN_STRING, DONE}; + StateType state; + void terminated(TokenType t){ + working--; // return the peeked character + tokenType = t; + token.append(0); // close buffer + state = DONE; + } +public: + // the buffer of "source" is owned by caller + Scanner(const char *src/*[in] c-string*/ = NULL):source(src){ + working = src; + history = working; + state = DONE; + tokenType = ERROR; + } + + //void setSource(const char *const src /*[in] c-string*/){ + // *(&const_cast<const char *>(source)) = src; + //} + + Buffer_char token; + TokenType tokenType; + + TokenType getNextToken(){ + token.reset(); + state = START; + history = working; // for debug + while (state != DONE){ + char c = *working++; + if (c == 0 && state != START){//avoid buffer overflow. for IN_QUOE, IN_ESCAPE + terminated(ERROR); + break; // while + } + switch(state){ + case START: + tokenType = ERROR; + switch(c){ + case '?' : tokenType = QUESTION; break; + case '*' : tokenType = STAR; break; + case '+' : tokenType = PLUS; break; + case '{' : tokenType = LBRACE; break; + case '}' : tokenType = RBRACE; break; + case '(' : tokenType = LPAR; break; + case ')' : tokenType = RPAR; break; + case ';' : tokenType = SEMI; break; + case '=' : tokenType = EQ; break; + case ',' : tokenType = COMMA; break; + case '|' : tokenType = BAR; break; + case '@' : tokenType = AT; break; + case '~' : tokenType = WAVE; break; + case '%' : tokenType = PERCENT; break; + case 0 : tokenType = STREAM_END; working-- /*avoid buffer overflow*/; break; + } + if (tokenType != ERROR){ + token.append(c); + token.append(0); + state = DONE; + break; // START + } + switch(c){ + case '$' : state = IN_VAR_FIRST; token.append(c); break; + case '\'' : state = IN_QUOTE; break; + case '\\' : state = IN_BSLASH; break; + default: + if (isWhiteSpace(c)){ // state = START; //do nothing + } else if (isDigit(c)){ state = IN_NUM; token.append(c); + } else if (isAlphabet(c)){ state = IN_STRING; token.append(c); + } else {terminated(ERROR);} + } + break;//START + case IN_NUM: + if (isDigit(c)){ + token.append(c); + } else { + terminated(NUMBER); + } + break;//IN_NUM + case IN_VAR_FIRST: + if (isAlphabet(c)){ + token.append(c); + state = IN_VAR; + } else { + terminated(ERROR); + } + break; // IN_VAR_FISRT + case IN_VAR: + if (isAlphabet(c) || isDigit(c)){ + token.append(c); + } else { + terminated(VAR); + } + break;//IN_VAR + case IN_STRING: + // About the scanner's behavior for STRING, AT, and ESCAPE: + // All of them can be contacted with each other. + // This means the scanner will eat up as much as possible strings + // (STRING, AT, and ESCAPE) at one time, with no regard of their + // combining sequence. + // + if (c == '\''){ + state = IN_QUOTE; // the first time we see single quote + } else if (c =='\\'){ // back slash character + state = IN_BSLASH; + } else if (isAlphabet(c) || isDigit(c)){ + token.append(c); + } else{ + terminated(STRING); + } + break;//IN_STRING + case IN_QUOTE: + if (c == '\''){ // the second time we see single quote + state = IN_STRING; // see document in IN_STRING + } else if ( c== '\\') { // backslah escape in quote + state = IN_QUOTE_BSLASH; + } else { + token.append(c); // eat up everything, includes back slash + } + break;//IN_QUOTE + case IN_QUOTE_BSLASH: + case IN_BSLASH: + switch (c){ + case 'n' : token.append('\n'); break; + case 'r' : token.append('\r'); break; + case 't' : token.append('\t'); break; + case '\'' : token.append('\''); break; + case '\\' : token.append('\\'); break; + default: token.append(c); // unknown escaping, treat it as literal + } + if (state == IN_BSLASH){ + state = IN_STRING; // see document in IN_STRING + } else { // state == IN_QUOTE_BSLASH + state = IN_QUOTE; + } + break;//IN_BSLASH + case DONE: /* should never happen */ + default: + working--; + tokenType = ERROR; + state = DONE; + break; + }//switch(state) + }//while (state != DONE) + + return tokenType; + } +};//class Scanner + +class Parser{ +friend UBool TestParser(); +friend class TestParserT; +friend class LanguageGenerator_impl; +private: + Scanner s; + TokenType & token; + int min_max; // for the evil infinite + + UBool match(TokenType expected){ + if (token == expected) { + token = s.getNextToken(); + return TRUE; + } else { + //s.dumpCurrentPoint(); + return FALSE; + } + } + + UBool weight(int & value){ + if (token == NUMBER){ + int temp = atoi(s.token); + match(NUMBER); + if (match(PERCENT)){ + value = temp; + return TRUE; + } + } + return FALSE; + } + + UBool repeat (Pick* &node /*in,out*/){ + if (node == NULL) return FALSE; + + int count = -2; + int min = -2; + int max = -2; + UBool question = FALSE; + switch (token){ + case QUESTION: + match(QUESTION); + min = 0; + max = 1; + count = 2; + question = TRUE; + break; + case STAR: + match(STAR); + min = 0; + max = -1; + count = -1; + break; + case PLUS: + match(PLUS); + min = 1; + max = -1; + count = -1; + break; + case LBRACE: + match(LBRACE); + if (token != NUMBER){ + return FALSE; + }else { + min = atoi(s.token); + match(NUMBER); + if (token == RBRACE){ + match(RBRACE); + max = min; + count = 1; + } else if (token == COMMA) { + match(COMMA); + if (token == RBRACE){ + match(RBRACE); + max = -1; + count = -1; + } else if (token == NUMBER) { + max = atoi(s.token); + match(NUMBER); + count = max - min + 1; + if (!match(RBRACE)) { + return FALSE; + } + } else { + return FALSE; + } + } else { + return FALSE; + } + } + break; + default: + return FALSE; + } + + if (count == -2 || min == -2 || max == -2){ + //ASSERT(FALSE); + return FALSE; + } + + // eat up following weights + Buffer_int weights; + int w; + while (weight(w)){ + weights.append(w); + } + + // for the evil infinite + min_max = min_max > min ? min_max : min; + min_max = min_max > max ? min_max : max; + if (min_max > PSEUDO_INFINIT){ + return FALSE; // PSEUDO_INFINIT is less than the real maximum + } + if (max == -1){ // the evil infinite + max = PSEUDO_INFINIT; + } + // for the strange question mark + if (question && weights.content_size() > 0){ + Buffer_int w2; + w2.append(DEFAULT_WEIGHT - weights[0]).append(weights[0]); + node = new Repeat(node,min,max,&w2); + return TRUE; + } + node = new Repeat(node,min,max,&weights); + return TRUE; + } + + UBool core(Pick* &node /*out*/){ + if (node != NULL) return FALSE; //assert node == NULL + + switch(token){ + case LPAR: + match(LPAR); + if(defination(node) && match(RPAR)){ + return TRUE; + } + return FALSE; + case VAR: + node = new Variable(&symbols, s.token); + match(VAR); + return TRUE; + case STRING: + node = new Literal(s.token); + match(STRING); + return TRUE; + default: + return FALSE; + } + } + UBool modified(Pick* &node /*out*/){ + if (node != NULL) return FALSE; //assert node == NULL + + if (!core(node)) { + return FALSE; + } + + for (;;){ + switch(token){ + case WAVE: + match(WAVE); + node = new Morph(*node); + break; + case AT: + match(AT); + node = new Quote(*node); + break; + case QUESTION: + case STAR: + case PLUS: + case LBRACE: + if (!repeat(node)) return FALSE; + break; + case SEMI: // rule definiation closed + case RPAR: // within parenthesis (core closed) + case BAR: // in alternation + case NUMBER: // in alternation, with weight + case LPAR: // in sequence + case VAR: // in sequence + case STRING: // in sequence + return TRUE; + default: + return FALSE; + } + } + } + + + UBool sequence_list(Pick* &node /*in,out*/){ + if (node == NULL) return FALSE; // assert node != NULL + + Sequence* seq = new Sequence(); + Pick * n = node; + + while (token == VAR || token == STRING || token == LPAR){ + seq->append(n); + n = NULL; + if (modified(n)){ + // go on + } else { + goto FAIL; + } + } + + if (token == SEMI || token == RPAR || token == BAR){ + seq->append(n); + node = seq; + return TRUE; + } +FAIL: + delete seq; + return FALSE; + + } + + UBool sequence(Pick* &node /*out*/){ + if (node != NULL) return FALSE; //assert node == NULL + + if (!modified(node)) { + return FALSE; + } + + if (token == VAR || token == STRING || token == LPAR){ + return sequence_list(node); + } else { + return TRUE; // just a modified + } + } + + UBool alternation_list(Pick* &node /*in,out*/){ + if (node == NULL) return FALSE; // assert node != NULL + + Alternation * alt = new Alternation(); + Pick * n = node; + int w = DEFAULT_WEIGHT; + + while (token == NUMBER || token == BAR){ + if(token == NUMBER) { + if (weight(w)){ + if (token == BAR){ + // the middle item, go on + } else { + // the last item or encounter error + break; //while + } + } else { + goto FAIL; + } + } // else token == BAR + match(BAR); + alt->append(n,w); + + n = NULL; + w = DEFAULT_WEIGHT; + if (sequence(n)){ + // go on + } else { + goto FAIL; + } + } + + if (token == SEMI || token == RPAR) { + alt->append(n,w); + node = alt; + return TRUE; + } +FAIL: + delete alt; + return FALSE; + } + + UBool alternation(Pick* &node /*out*/){ + if (node != NULL) return FALSE; //assert node == NULL + + // 'sequence' has higher precedence than 'alternation' + if (!sequence(node)){ + return FALSE; + } + + if (token == BAR || token == NUMBER){ // find a real alternation1, create it. + return alternation_list(node); + } else { + return TRUE; // just a sequence_old + } + } + + + UBool defination(Pick* &node /*out*/){ + if (node != NULL) return FALSE; //assert node == NULL + return alternation(node); + } + + UBool rule(){ + if (token == VAR){ + Buffer_char name; + name.append_array(s.token, strlen(s.token) + 1); + match(VAR); + + if (match(EQ)){ + Pick * t = NULL; + if(defination(t)){ + symbols.put(name, t); + return match(SEMI); + } + } + } + return FALSE; + } +public: + UBool rules(){ + symbols.reset(); + token = s.getNextToken(); + while (rule()){ + } + if (token == STREAM_END){ + return TRUE; + } else { + //s.dumpCurrentPoint(); + return FALSE; + } + } + +public: + SymbolTable symbols; + + Parser(const char *const source):s(source), token(s.tokenType){ + min_max = -2; + } + UBool parse(){ + return rules(); + } + +}; // class Parser + + +/////////////////////////////////////////////////////////// +// +// +// + +int DumpScanner(Scanner & s, UBool dump = TRUE){ + int len = strlen(s.source); + int error_start_offset = s.history - s.source; + if (dump){ + printf("\n=================== DumpScanner ================\n"); + fwrite(s.source, len, 1, stdout); + printf("\n-----parsed-------------------------------------\n"); + fwrite(s.source, s.history - s.source, 1, stdout); + printf("\n-----current------------------------------------\n"); + fwrite(s.history, s.working - s.history, 1, stdout); + printf("\n-----unparsed-----------------------------------\n"); + fwrite(s.working, (s.source + len - s.working), 1, stdout); + printf("\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); + } + return error_start_offset; +} + +class LanguageGenerator_impl{ +public: + LanguageGenerator_impl(const char *const bnf_definition, const char *const top_node) + :par(bnf_definition), top_node_name(top_node){ + srand((unsigned)time( NULL )); + } + + LanguageGenerator::PARSE_RESULT parseBNF(UBool debug = TRUE){ + if (par.parse()){ + if (par.symbols.find(top_node_name, &top_node_ref) == SymbolTable::HAS_REF) { + if (par.symbols.is_complete()) { + return LanguageGenerator::OK; + } else { + if (debug) printf("The bnf definition is incomplete.\n"); + return LanguageGenerator::INCOMPLETE; + } + } else { + if (debug) printf("No top node is found.\n"); + return LanguageGenerator::NO_TOP_NODE; + } + } else { + if(debug) { + printf("The bnf definition is wrong\n"); + DumpScanner(par.s, TRUE); + } + return LanguageGenerator::BNF_DEF_WRONG; + } + } + const char * next(){ + return top_node_ref->next(); + } + +private: + Parser par; + const char *const top_node_name; + Pick * top_node_ref; +}; + +LanguageGenerator::LanguageGenerator():lang_gen(NULL){ +} + +LanguageGenerator::~LanguageGenerator(){ + delete lang_gen; +} + +LanguageGenerator::PARSE_RESULT LanguageGenerator::parseBNF(const char *const bnf_definition /*in*/, const char *const top_node/*in*/, UBool debug){ + if (lang_gen){ + delete lang_gen; + } + lang_gen = new LanguageGenerator_impl(bnf_definition, top_node); + PARSE_RESULT r = lang_gen->parseBNF(debug); + if (r != OK){ + delete lang_gen; + lang_gen = NULL; + return r; + } else { + return r; + } +} +const char *LanguageGenerator::next(){ // Return a null-terminated c-string. The buffer is owned by callee. + if (lang_gen){ + return lang_gen->next(); + }else { + return ""; + } +} + +/////////////////////////////////////////////////////////// +// +// The test code for WBNF +// + +#define CALL(fun) \ + if (fun()){ \ + printf("Pass: " #fun "\n");\ + } else { \ + printf("FAILED: !!! " #fun " !!!\n"); \ + } + +#define DUMP_R(fun, var, times) \ + {printf("\n========= " #fun " =============\n"); \ + for (int i=0; i<times; i++) { \ + const char * t = var.next();\ + fwrite(t,strlen(t),1,stdout); \ + printf("\n"); \ + } \ + printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");} + + + +#if TEST_WBNF_TEST +static UBool TestQuote(){ + const char *const str = "This ' A !,z| qq [] .new\tline"; + //const char *const str_r = "This \\' A '!,'z'|' qq '[]' '.'new\tline"; + //// + //// :( we must quote our string to following C syntax + //// cannot type the literal here, it makes our code rather human unreadable + //// very very unconformable! + //// + ///* + //*/ + + //const char *const s1 = "ab'c"; + //const char (* s1_r1) [] = { "ab''c", // ab''c + // "ab\\'c", // ab\'c + // };// + ///* + // . '.' \. + // .. \.\. '.'\. '.'\. '..' // '.''.' wrong + //*/ + + //const char *const s2 = "a..'.b"; // a..'.b + //const char (*s2_r) [] = { "a'..''.'b" // a'..''.'b + // ,"a'..\\'.'b" // a'..\'.'b + // ,"a'..'\\''.'b" // a'..'\''.'b + // };// + + //const char *const s3 = "a..\\.b"; // a..\.b + //const char (*s3_r) [] = { "a'..\\\\.'b" // a'..\\.'b + // ,"a'..'\\\\'.'b" // a'..'\\'.'b + // };// + + // // no catact operation, no choice, must be compact + + srand((unsigned)time( NULL )); + + //Escaper l(Escaper::NO, Escaper::NO, Escaper::RAND_ESC); + Pick *p = new Literal(str); + Quote q(*p); + + DUMP_R(TestQuote, (*p), 1); + DUMP_R(TestQuote, q, 20); + return FALSE; +} +static UBool TestLiteral(){ + const char * s = "test string99."; + Literal n(s); + const char * r = n.next(); + return strcmp(s,r) == 0; +} + +static UBool TestSequence(){ + Sequence seq; + seq.append(new Literal("abc ")); + seq.append(new Literal(", s")); + + return strcmp(seq.next(), "abc , s") == 0; +} +static UBool TestAlternation(){ + srand((unsigned)time( NULL )); + Alternation alt; + alt.append(new Literal("aaa_10%"),10); + alt.append(new Literal("bbb_0%"),0); + alt.append(new Literal("ccc_10%"),10); + alt.append(new Literal("ddddddd_50%"),50); + + DUMP_R(TestAlternation, alt, 50); + + return FALSE; +} + +static UBool TestBuffer(){ + Buffer_int t; + t.append(1).append(0).append(5); + int s = t.content_size(); + for (int i=0; i<s; ++i){ + printf("%d\n", t[i]); + } + return FALSE; +} + +static UBool TestWeightedRand(){ + srand((unsigned)time( NULL )); + Buffer_int t; + t.append(1).append(0).append(5); + WeightedRand wr(&Buffer_int().append(10).append(0).append(50),4); +// WeightedRand wr(&t,3); + for (int i=0; i< 50; ++i){ + printf("%d\n", wr.next()); + } + return FALSE; +} + +static UBool TestRepeat(){ + srand((unsigned)time( NULL )); + Repeat rep(new Literal("aaa1-5 "), 1, 5); + DUMP_R(TestRepeat, rep, 50); + + Repeat r2(new Literal("b{1,3}1%0%5% "), 1, 3, &Buffer_int().append(1).append(0).append(5)); + DUMP_R(TestRepeat, r2, 50); + + Repeat r3(new Literal("aaa5-5 "), 5, 5); + DUMP_R(TestRepeat, r3, 50); + + return FALSE; +} + +static UBool TestVariable(){ + SymbolTable tab; + Pick * value = new Literal("string1"); + Variable var1(&tab, "x", value); + + Variable var2(&tab, "y"); +// tab.put(var2, value); // TOFIX: point alias/recursion problem + Pick * value2 = new Literal("string2"); + tab.put(var2, value2); + + Pick * value3 = new Literal("string3"); + Variable var3(&tab, "z"); + tab.put("z", value3); + + UBool pass; + pass = strcmp(var1.next(), value->next()) == 0; + pass = pass && strcmp(var2.next(), value2->next()) == 0; + pass = pass && strcmp(var3.next(), value3->next()) == 0; + return pass; +} + +static UBool TestSymbolTable(){ + Literal * n1 = new Literal("string1"); + Literal * n2 = new Literal("string2"); + SymbolTable t; + t.put("abc", n1); + t.put("$aaa", n2); +// t.put("alias", n1); // TOFIX: point alias/recursion problem + t.put("bbb"); + + UBool pass; + pass = t.find(NULL) == SymbolTable::EMPTY; + pass = pass && t.find("ccc") == SymbolTable::NO_VAR; + pass = pass && t.find("bbb") == SymbolTable::NO_REF; + pass = pass && t.find("abc") == SymbolTable::HAS_REF; + pass = pass && t.find("$aaa") == SymbolTable::HAS_REF; + + t.reset(); + pass = pass && t.find("abc") == SymbolTable::NO_VAR; + return pass; +} + + +static UBool TestScanner(void){ + //const char str1[] = "$root = $command{0,5} $reset $mostRules{1,20};"; + //const char str1_r[][20] = {"$root", "=", "$command", "{", "0", ",", "5", "}", + // "$reset", "$mostRules", "{", "1", ",", "20", "}", ";"}; + + const char str2[] = "$p2 =(\\\\ $s $string $s)? 25%;"; + const char str2_r[][20] = {"$p2", "=", "(", "\\", "$s", "$string", "$s", ")", "?", "25", "%", ";"}; + + const char *str = str2; + const char (*str_r)[20] = str2_r; + int tokenNum = sizeof(str2_r)/sizeof(char[20]); + + Scanner t(str); + UBool pass = TRUE; + t.getNextToken(); + int i = 0; + while (pass){ + if (t.tokenType == STREAM_END){ + pass = pass? i == tokenNum : FALSE; + break;//while + } else if (t.tokenType == ERROR){ + pass = FALSE; + break;//while + } else { + pass = strcmp( &(t.token[0]), str_r[i++]) == 0; + t.getNextToken(); + } + } + + //const char ts[] = "$commandList = '['" + //" ( alternate ' ' $alternateOptions" + //" | backwards ' 2'" + //" | normalization ' ' $onoff " + //" | caseLevel ' ' $onoff " + //" | hiraganaQ ' ' $onoff" + //" | caseFirst ' ' $caseFirstOptions" + //" | strength ' ' $strengthOptions" + //" ) ']';" ; + + //Scanner t2(ts); + //pass = TRUE; + //do { + // t2.getNextToken(); + // if (t2.tokenType == ERROR){ + // DumpScanner(t2); + // return FALSE; + // } + //}while (t.tokenType != STREAM_END); + + return pass; +} + +class TestParserT { +public: +UBool operator () (const char *const str, const int exp_error_offset = -1, const UBool dump = TRUE){ + Parser par(str); + if (par.rules()){ + if ( exp_error_offset == -1){ + return TRUE; + }else { + DumpScanner(par.s,dump); + return FALSE; + } + }else { + return DumpScanner(par.s, dump) == exp_error_offset; + } +} +}; + +UBool TestParser(){ + TestParserT test; + + UBool pass = TRUE; + pass = pass && test ("$s = ' ' ? 50%;"); + pass = pass && test("$x = ($var {1,2}) 3%;"); // legal + pass = pass && test("$x = $var {1,2} 3% | b 4%;"); // legal + pass = pass && test("$x = $var {1,2} 3%;"); // legal + pass = pass && test("$m = $c ? 2% 4% | $r 5% | $n 25%;"); // legal + pass = pass && test("$a = b ? 2% | c 5%;"); // legal + pass = pass && test("$x = A B 5% C 10% | D;", 8, FALSE); // illegal 5% + pass = pass && test("$x = aa 45% | bb 5% cc;", 19, FALSE);// illegal cc + pass = pass && test("$x = (b 5%) (c 6%);"); // legal + pass = pass && test("$x = (b 5%) c 6%;", 13, FALSE); // illegal 6% + pass = pass && test("$x = b 5% (c 6%);", 9, FALSE); // illegal (c 6%) + pass = pass && test("$x = b 5% c 6%;", 9, FALSE); // illegal c 6% + pass = pass && test("$x = b 5%;"); // legal + pass = pass && test("$x = aa 45% | bb 5% cc;", 19, FALSE);// illegal cc + pass = pass && test("$x = a | b | c 4% | d 5%;"); // legal + pass = pass && test("$s = ' ' ? 50% abc;"); // legal + pass = pass && test("$s = a | c d | e f;"); // legal + pass = pass && test( "$z = q 0% | p 1% | r 100%;"); // legal How to check parsed tree?? + + pass = pass && test("$s = ' ' ? 50%;"); + pass = pass && test("$relationList = '<' | '<<' | ';' | '<<<' | ',' | '=';"); + pass = pass && test("$p1 = ($string $s '|' $s)? 25%;"); + pass = pass && test("$p2 = (\\\\ $s $string $s)? 25%;"); + pass = pass && test("$rel2 = $p1 $string $s $p2;"); + pass = pass && test("$relation = $relationList $s ($rel1 | $rel2) $crlf;"); + pass = pass && test("$command = $commandList $crlf;"); + pass = pass && test("$reset = '&' $s ($beforeList $s)? 10% ($positionList 100% | $string 10%) $crlf;"); + pass = pass && test("$mostRules = $command 1% | $reset 5% | $relation 25%;"); + pass = pass && test("$root = $command{0,5} $reset $mostRules{1,20};"); + + const char collationBNF[] = + "$s = ' '? 50%;" + "$crlf = '\r\n';" + + "$alternateOptions = non'-'ignorable | shifted;" + "$onoff = on | off;" + "$caseFirstOptions = off | upper | lower;" + "$strengthOptions = '1' | '2' | '3' | '4' | 'I';" + "$commandList = '['" + " ( alternate ' ' $alternateOptions" + " | backwards ' 2'" + " | normalization ' ' $onoff " + " | caseLevel ' ' $onoff " + " | hiraganaQ ' ' $onoff" + " | caseFirst ' ' $caseFirstOptions" + " | strength ' ' $strengthOptions" + " ) ']';" + "$command = $commandList $crlf;" + + "$ignorableTypes = (tertiary | secondary | primary) ' ' ignorable;" + "$allTypes = variable | regular | implicit | trailing | $ignorableTypes;" + "$positionList = '[' (first | last) ' ' $allTypes ']';" + + "$beforeList = '[before ' ('1' | '2' | '3') ']';" + + "$relationList = (" + " '<'" + " | '<<'" + " | ';'" + " | '<<<'" + " | ','" + " | '='" + ");" + "$string = $magic;" + "$rel1 = '[variable top]' $s;" + "$p1 = ($string $s '|' $s)? 25%;" + "$p2 = (\\\\ $s $string $s)? 25%;" + "$rel2 = $p1 $string $s $p2;" + "$relation = $relationList $s ($rel1 | $rel2) $crlf;" + + "$reset = '&' $s ($beforeList $s)? 10% ($positionList 1% | $string 10%) $crlf;" + "$mostRules = $command 1% | $reset 5% | $relation 25%;" + "$root = $command{0,5} $reset $mostRules{1,20};" + ; + + pass = pass && test(collationBNF); + + + return pass; +} + +static UBool TestMorph(){ + srand((unsigned)time( NULL )); + + Alternation * alt = new Alternation(); + + (*alt) + .append(new Literal("a")).append(new Literal("b")).append(new Literal("c")) + .append(new Literal("d")).append(new Literal("e")).append(new Literal("f")) + .append(new Literal("g")).append(new Literal("h")).append(new Literal("i")) + .append(new Literal("j")).append(new Literal("k")).append(new Literal("l")) + .append(new Literal("m")).append(new Literal("n")).append(new Literal("o")) + ; + + Repeat * rep = new Repeat( alt ,5,5 ); + Morph m( *rep); + +// DUMP_R(TestMorph,(*rep),20); + DUMP_R(TestMorph,m,100); + + return FALSE; +} + +#endif + +static UBool TestLanguageGenerator(){ + //LanguageGenerator g; + //const char *const s = "$s = p 0% | q 1%;"; + //g.parseBNF(s, "$s"); + UBool pass; + //= strcmp("q", g.next()) == 0; + + const char *const def = + //"$a = $b;" + //"$b = $c;" + //"$c = $t;" + //"$t = abc $z{1,2};" + //"$k = a | b | c | d | e | f | g ;" + //"$z = q 0% | p 1% | r 1%;" + "$x = a ? 0%;" + ; // end of string +// const char * s = "abczz"; +// +// + LanguageGenerator g; + pass = g.parseBNF(def, "$x",TRUE); +//// LanguageGenerator g(collationBNF, "$root", "$magic", new MagicNode()); +// + if (pass != LanguageGenerator::OK) return FALSE; + + DUMP_R(TestLanguageGenerator, g, 20); + return pass; + + ////UBool pass = strcmp(s,r) == 0; + + //if (pass){ + // printf("TestRandomLanguageGenerator passed.\n"); + //} else { + // printf("TestRandomLanguageGenerator FAILED!!!\n"); + //} + //return pass; +} + +void TestWbnf(void){ + srand((unsigned)time( NULL )); + + //CALL(TestLiteral); + //CALL(TestSequence); + //CALL(TestSymbolTable); + //CALL(TestVariable); + + //TestRepeat(); + //TestAlternation(); + //TestMorph(); + + //TestQuote(); + //TestBuffer(); + //TestWeightedRand(); + + //CALL(TestScanner); + //CALL(TestParser); + CALL(TestLanguageGenerator); +} + diff --git a/Build/source/libs/icu-xetex/test/intltest/wbnf.h b/Build/source/libs/icu-xetex/test/intltest/wbnf.h new file mode 100644 index 00000000000..7b76f8f2daa --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/wbnf.h @@ -0,0 +1,157 @@ +/* + ****************************************************************************** + * Copyright (C) 2005, International Business Machines Corporation and * + * others. All Rights Reserved. * + ****************************************************************************** + */ +/* + WBNF, Weighted BNF, is an extend BNF. The most difference between WBNF + and standard BNF is the WBNF accepts weight for its alternation items. + The weight specifies the opportunity it will be selected. + + The purpose of WBNF is to help generate a random string from a given grammar + which can be described with standard BNF. The introduction of 'weight' + is to guide the generator to give the specific parts different chances to be + generated. + + Usually, the user gives LanguageGenerator the grammar description in WBNF, + then LanguageGenerator will generate a random string on every next() call. + The return code of parseBNF() can help user to determine the error, + either in the grammar description or in the WBNF parser itself. + + + The grammar of WBNF itself can be described in standard BNF, + + escaping = _single character with a leading back slash, either inside or outside quoting_ + quoting = _quoted with a pair of single quotation marks_ + string = string alphabet | string digit | string quoting | string escaping | + alphabet | quoting | escaping + alphabet = + digit = + integer = integer digit | digit + weight = integer % + weight-list = weight-list weight | weight + var = var alphabet | var digit | $ alphabet + + var-defs = var-defs var-def | var-def + var-def = var '=' definition; + + alternation = alternation '|' alt-item | alt-item + alt-item = sequence | sequence weight + + sequence = sequence modified | modified + + modified = core | morph | quote | repeat + morph = modified ~ + quote = modified @ + repeat = modified quantifier | modified quantifier weight-list + quantifier = ? | * | + | { integer , integer} | {integer, } | {integer} + + core = var | string | '(' definition ')' + + definition = core | modified | sequence | alternation + definition = alternation + + Remarks: + o Following characters are literals in preceding definition + but are syntax symbols in WBNF + + % $ ~ @ ? * + { } , + + o Following character are syntax symbols in preceding definition + (sapce) contact operation, or separators to increase readability + = definition + | selection operation + ( ) precedence select + ' ' override special-character to plain character + + o the definition of 'escaping' and 'quoting' are preceding definition text + o infinite is actually a predefine value PSEUDO_INFINIT defined in this file + o if weight is not presented in "alt-item' and 'repeat', + a default weight DEFAULT_WEIGHT defined in this file is used + + o * == {0, } + + == {1, } + ? == {0, 1} + + o the weight-list for repeat assigns the weights for repeat itmes one by one + + demo{1,3} 30% 40% 100% == (demo)30% | (demodemo)40% | (demodemodemo)100% + + To find more explain of the weight-list, please see the LIMITATION of the grammar + + o but the weight-list for question mark has different meaning + + demo ? 30% != demo{0,1} 30% 100% + demo ? 30% == demo{0,1} 70% 30% + + the 70% is calculated from (DEFAULT_WEIGHT - weight) + + + Known LIMITATION of the grammar + For 'repeat', the parser will eat up as much as possible weights at one time, + discard superfluous weights if it is too much, + fill insufficient weights with default weight if it is too less. + This behavior means following definitions are equal + + demo{1,3} 30% 40% 100% + demo{1,3} 30% 40% 100% 50% + demo{1,3} 30% 40% + + This behavior will cause a little confusion when defining an alternation + + demo{1,3} 30% 40% 100% 50% | show 20% + + is interpreted as + + (demo{1,3} 30% 40% 100%) 100% | show 20% + + not + + (demo{1,3} 30% 40% 100%) 50% | show 20% + + to get an expected definition, please use parentheses. + + Known LIMITATION of current implement + Due to the well known point alias problem, current Parser will be effectively + crashed if the definition looks like + + $a = demo; + $b = $a; + $c = $a; + or + $a = demo; + $b = $a $a; + or + $a = demo; + $b = $b $a; + + The crash will occur at delete operation in destructor or other memory release code. + Several plans are on hard to fix the problem. Use a smart point with reference count, + or use a central memory management solution. But now, it works well with collation + monkey test, which is the only user for WBNF. +*/ + +#ifndef _WBNF +#define _WBNF + +#include "unicode/utypes.h" + +const int DEFAULT_WEIGHT = 100; +const int PSEUDO_INFINIT = 200; + +class LanguageGenerator_impl; + +class LanguageGenerator{ + LanguageGenerator_impl * lang_gen; +public: + enum PARSE_RESULT {OK, BNF_DEF_WRONG, INCOMPLETE, NO_TOP_NODE}; + LanguageGenerator(); + ~LanguageGenerator(); + PARSE_RESULT parseBNF(const char *const bnf_definition /*in*/, const char *const top_node/*in*/, UBool debug=FALSE); + const char *next(); /* Return a null-terminated c-string. The buffer is owned by callee. */ +}; + +void TestWbnf(void); + +#endif /* _WBNF */ diff --git a/Build/source/libs/icu-xetex/test/intltest/windttst.cpp b/Build/source/libs/icu-xetex/test/intltest/windttst.cpp new file mode 100644 index 00000000000..3869f34acfc --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/windttst.cpp @@ -0,0 +1,197 @@ +/* +******************************************************************************** +* Copyright (C) 2005-2006, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File WINDTTST.CPP +* +******************************************************************************** +*/ + +#include "unicode/utypes.h" + +#ifdef U_WINDOWS + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/format.h" +#include "unicode/numfmt.h" +#include "unicode/locid.h" +#include "unicode/ustring.h" +#include "unicode/testlog.h" +#include "unicode/utmscale.h" + +#include "windtfmt.h" +#include "winutil.h" +#include "windttst.h" + +#include "cmemory.h" +#include "cstring.h" +#include "locmap.h" +#include "wintz.h" + +# define WIN32_LEAN_AND_MEAN +# define VC_EXTRALEAN +# define NOUSER +# define NOSERVICE +# define NOIME +# define NOMCX +# include <windows.h> + +#define ARRAY_SIZE(array) (sizeof array / sizeof array[0]) + +static const char *getCalendarType(int32_t type) +{ + switch (type) + { + case 1: + case 2: + return "@calendar=gregorian"; + + case 3: + return "@calendar=japanese"; + + case 6: + return "@calendar=islamic"; + + case 7: + return "@calendar=buddhist"; + + case 8: + return "@calendar=hebrew"; + + default: + return ""; + } +} + +void Win32DateTimeTest::testLocales(TestLog *log) +{ + SYSTEMTIME winNow; + UDate icuNow = 0; + SYSTEMTIME st; + FILETIME ft; + UnicodeString zoneID; + const TimeZone *tz = TimeZone::createDefault(); + TIME_ZONE_INFORMATION tzi; + + uprv_memset(&tzi, 0, sizeof(tzi)); + tz->getID(zoneID); + if (! uprv_getWindowsTimeZoneInfo(&tzi, zoneID.getBuffer(), zoneID.length())) { + UBool found = FALSE; + int32_t ec = TimeZone::countEquivalentIDs(zoneID); + + for (int z = 0; z < ec; z += 1) { + UnicodeString equiv = TimeZone::getEquivalentID(zoneID, z); + + if (found = uprv_getWindowsTimeZoneInfo(&tzi, equiv.getBuffer(), equiv.length())) { + break; + } + } + + if (! found) { + GetTimeZoneInformation(&tzi); + } + } + + GetSystemTime(&st); + SystemTimeToFileTime(&st, &ft); + SystemTimeToTzSpecificLocalTime(&tzi, &st, &winNow); + + int64_t wftNow = ((int64_t) ft.dwHighDateTime << 32) + ft.dwLowDateTime; + UErrorCode status = U_ZERO_ERROR; + + int64_t udtsNow = utmscale_fromInt64(wftNow, UDTS_WINDOWS_FILE_TIME, &status); + + icuNow = (UDate) utmscale_toInt64(udtsNow, UDTS_ICU4C_TIME, &status); + + int32_t lcidCount = 0; + Win32Utilities::LCIDRecord *lcidRecords = Win32Utilities::getLocales(lcidCount); + + for(int i = 0; i < lcidCount; i += 1) { + UErrorCode status = U_ZERO_ERROR; + WCHAR longDateFormat[81], longTimeFormat[81], wdBuffer[256], wtBuffer[256]; + int32_t calType = 0; + + // NULL localeID means ICU didn't recognize this locale + if (lcidRecords[i].localeID == NULL) { + continue; + } + + GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_SLONGDATE, longDateFormat, 81); + GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_STIMEFORMAT, longTimeFormat, 81); + GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_RETURN_NUMBER|LOCALE_ICALENDARTYPE, (LPWSTR) calType, sizeof(int32_t)); + + char localeID[64]; + + uprv_strcpy(localeID, lcidRecords[i].localeID); + uprv_strcat(localeID, getCalendarType(calType)); + + UnicodeString ubBuffer, udBuffer, utBuffer; + Locale ulocale(localeID); + int32_t wdLength, wtLength; + + wdLength = GetDateFormatW(lcidRecords[i].lcid, DATE_LONGDATE, &winNow, NULL, wdBuffer, ARRAY_SIZE(wdBuffer)); + wtLength = GetTimeFormatW(lcidRecords[i].lcid, 0, &winNow, NULL, wtBuffer, ARRAY_SIZE(wtBuffer)); + + if (uprv_strchr(localeID, '@') > 0) { + uprv_strcat(localeID, ";"); + } else { + uprv_strcat(localeID, "@"); + } + + uprv_strcat(localeID, "compat=host"); + + Locale wlocale(localeID); + DateFormat *wbf = DateFormat::createDateTimeInstance(DateFormat::kFull, DateFormat::kFull, wlocale); + DateFormat *wdf = DateFormat::createDateInstance(DateFormat::kFull, wlocale); + DateFormat *wtf = DateFormat::createTimeInstance(DateFormat::kFull, wlocale); + + wbf->format(icuNow, ubBuffer); + wdf->format(icuNow, udBuffer); + wtf->format(icuNow, utBuffer); + + if (ubBuffer.indexOf(wdBuffer, wdLength - 1, 0) < 0) { + UnicodeString baseName(wlocale.getBaseName()); + UnicodeString expected(wdBuffer); + + log->errln("DateTime format error for locale " + baseName + ": expected date \"" + expected + + "\" got \"" + ubBuffer + "\""); + } + + if (ubBuffer.indexOf(wtBuffer, wtLength - 1, 0) < 0) { + UnicodeString baseName(wlocale.getBaseName()); + UnicodeString expected(wtBuffer); + + log->errln("DateTime format error for locale " + baseName + ": expected time \"" + expected + + "\" got \"" + ubBuffer + "\""); + } + + if (udBuffer.compare(wdBuffer) != 0) { + UnicodeString baseName(wlocale.getBaseName()); + UnicodeString expected(wdBuffer); + + log->errln("Date format error for locale " + baseName + ": expected \"" + expected + + "\" got \"" + udBuffer + "\""); + } + + if (utBuffer.compare(wtBuffer) != 0) { + UnicodeString baseName(wlocale.getBaseName()); + UnicodeString expected(wtBuffer); + + log->errln("Time format error for locale " + baseName + ": expected \"" + expected + + "\" got \"" + utBuffer + "\""); + } + delete wbf; + delete wdf; + delete wtf; + } + + Win32Utilities::freeLocales(lcidRecords); + delete tz; +} + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* #ifdef U_WINDOWS */ diff --git a/Build/source/libs/icu-xetex/test/intltest/windttst.h b/Build/source/libs/icu-xetex/test/intltest/windttst.h new file mode 100644 index 00000000000..b9b3e637488 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/windttst.h @@ -0,0 +1,41 @@ +/* +******************************************************************************** +* Copyright (C) 2005-2006, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File WINDTTST.H +* +******************************************************************************** +*/ + +#ifndef __WINDTTST +#define __WINDTTST + +#include "unicode/utypes.h" + +#ifdef U_WINDOWS + +#if !UCONFIG_NO_FORMATTING + +/** + * \file + * \brief C++ API: Format dates using Windows API. + */ + +class TestLog; + +class Win32DateTimeTest +{ +public: + static void testLocales(TestLog *log); + +private: + Win32DateTimeTest(); +}; + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // #ifdef U_WINDOWS + +#endif // __WINDTTST diff --git a/Build/source/libs/icu-xetex/test/intltest/winnmtst.cpp b/Build/source/libs/icu-xetex/test/intltest/winnmtst.cpp new file mode 100644 index 00000000000..dfbf200bff0 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/winnmtst.cpp @@ -0,0 +1,323 @@ +/* +******************************************************************************** +* Copyright (C) 2005-2006, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File WINNMTST.CPP +* +******************************************************************************** +*/ + +#include "unicode/utypes.h" + +#ifdef U_WINDOWS + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/format.h" +#include "unicode/numfmt.h" +#include "unicode/locid.h" +#include "unicode/ustring.h" +#include "unicode/testlog.h" +#include "unicode/utmscale.h" + +#include "winnmfmt.h" +#include "winutil.h" +#include "winnmtst.h" + +#include "cmemory.h" +#include "cstring.h" +#include "locmap.h" +#include "wintz.h" +#include "uassert.h" + +# define WIN32_LEAN_AND_MEAN +# define VC_EXTRALEAN +# define NOUSER +# define NOSERVICE +# define NOIME +# define NOMCX +# include <windows.h> +# include <stdio.h> +# include <time.h> +# include <float.h> +# include <locale.h> + +#define ARRAY_SIZE(array) (sizeof array / sizeof array[0]) +#define NEW_ARRAY(type,count) (type *) uprv_malloc((count) * sizeof(type)) +#define DELETE_ARRAY(array) uprv_free((void *) (array)) + +#define STACK_BUFFER_SIZE 32 + +#define LOOP_COUNT 1000 + +static UBool initialized = FALSE; + +/** + * Return a random int64_t where U_INT64_MIN <= ran <= U_INT64_MAX. + */ +static uint64_t randomInt64(void) +{ + int64_t ran = 0; + int32_t i; + + if (!initialized) { + srand((unsigned)time(NULL)); + initialized = TRUE; + } + + /* Assume rand has at least 12 bits of precision */ + for (i = 0; i < sizeof(ran); i += 1) { + ((char*)&ran)[i] = (char)((rand() & 0x0FF0) >> 4); + } + + return ran; +} + +/** + * Return a random double where U_DOUBLE_MIN <= ran <= U_DOUBLE_MAX. + */ +static double randomDouble(void) +{ + double ran = 0; + + if (!initialized) { + srand((unsigned)time(NULL)); + initialized = TRUE; + } +#if 0 + int32_t i; + do { + /* Assume rand has at least 12 bits of precision */ + for (i = 0; i < sizeof(ran); i += 1) { + ((char*)&ran)[i] = (char)((rand() & 0x0FF0) >> 4); + } + } while (_isnan(ran)); +#else + int64_t numerator = randomInt64(); + int64_t denomenator; + do { + denomenator = randomInt64(); + } + while (denomenator == 0); + + ran = (double)numerator / (double)denomenator; +#endif + + return ran; +} + +/** + * Return a random int32_t where U_INT32_MIN <= ran <= U_INT32_MAX. + */ +static uint32_t randomInt32(void) +{ + int32_t ran = 0; + int32_t i; + + if (!initialized) { + srand((unsigned)time(NULL)); + initialized = TRUE; + } + + /* Assume rand has at least 12 bits of precision */ + for (i = 0; i < sizeof(ran); i += 1) { + ((char*)&ran)[i] = (char)((rand() & 0x0FF0) >> 4); + } + + return ran; +} + +static UnicodeString &getWindowsFormat(int32_t lcid, UBool currency, UnicodeString &appendTo, const wchar_t *fmt, ...) +{ + wchar_t nStackBuffer[STACK_BUFFER_SIZE]; + wchar_t *nBuffer = nStackBuffer; + va_list args; + int result; + + nBuffer[0] = 0x0000; + + /* Due to the arguments causing a result to be <= 23 characters (+2 for NULL and minus), + we don't need to reallocate the buffer. */ + va_start(args, fmt); + result = _vsnwprintf(nBuffer, STACK_BUFFER_SIZE, fmt, args); + va_end(args); + + /* Just to make sure of the above statement, we add this assert */ + U_ASSERT(result >=0); + // The following code is not used because _vscwprintf isn't available on MinGW at the moment. + /*if (result < 0) { + int newLength; + + va_start(args, fmt); + newLength = _vscwprintf(fmt, args); + va_end(args); + + nBuffer = NEW_ARRAY(UChar, newLength + 1); + + va_start(args, fmt); + result = _vsnwprintf(nBuffer, newLength + 1, fmt, args); + va_end(args); + }*/ + + + // vswprintf is sensitive to the locale set by setlocale. For some locales + // it doesn't use "." as the decimal separator, which is what GetNumberFormatW + // and GetCurrencyFormatW both expect to see. + // + // To fix this, we scan over the string and replace the first non-digits, except + // for a leading "-", with a "." + // + // Note: (nBuffer[0] == L'-') will evaluate to 1 if there is a leading '-' in the + // number, and 0 otherwise. + for (wchar_t *p = &nBuffer[nBuffer[0] == L'-']; *p != L'\0'; p += 1) { + if (*p < L'0' || *p > L'9') { + *p = L'.'; + break; + } + } + + wchar_t stackBuffer[STACK_BUFFER_SIZE]; + wchar_t *buffer = stackBuffer; + + buffer[0] = 0x0000; + + if (currency) { + result = GetCurrencyFormatW(lcid, 0, nBuffer, NULL, buffer, STACK_BUFFER_SIZE); + + if (result == 0) { + DWORD lastError = GetLastError(); + + if (lastError == ERROR_INSUFFICIENT_BUFFER) { + int newLength = GetCurrencyFormatW(lcid, 0, nBuffer, NULL, NULL, 0); + + buffer = NEW_ARRAY(UChar, newLength); + buffer[0] = 0x0000; + GetCurrencyFormatW(lcid, 0, nBuffer, NULL, buffer, newLength); + } + } + } else { + result = GetNumberFormatW(lcid, 0, nBuffer, NULL, buffer, STACK_BUFFER_SIZE); + + if (result == 0) { + DWORD lastError = GetLastError(); + + if (lastError == ERROR_INSUFFICIENT_BUFFER) { + int newLength = GetNumberFormatW(lcid, 0, nBuffer, NULL, NULL, 0); + + buffer = NEW_ARRAY(UChar, newLength); + buffer[0] = 0x0000; + GetNumberFormatW(lcid, 0, nBuffer, NULL, buffer, newLength); + } + } + } + + appendTo.append(buffer, (int32_t) wcslen(buffer)); + + if (buffer != stackBuffer) { + DELETE_ARRAY(buffer); + } + + /*if (nBuffer != nStackBuffer) { + DELETE_ARRAY(nBuffer); + }*/ + + return appendTo; +} + +static void testLocale(const char *localeID, int32_t lcid, NumberFormat *wnf, UBool currency, TestLog *log) +{ + for (int n = 0; n < LOOP_COUNT; n += 1) { + UnicodeString u3Buffer, u6Buffer, udBuffer; + UnicodeString w3Buffer, w6Buffer, wdBuffer; + double d = randomDouble(); + int32_t i32 = randomInt32(); + int64_t i64 = randomInt64(); + + getWindowsFormat(lcid, currency, wdBuffer, L"%.16f", d); + + getWindowsFormat(lcid, currency, w3Buffer, L"%I32d", i32); + + getWindowsFormat(lcid, currency, w6Buffer, L"%I64d", i64); + + wnf->format(d, udBuffer); + if (udBuffer.compare(wdBuffer) != 0) { + UnicodeString locale(localeID); + + log->errln("Double format error for locale " + locale + + ": got " + udBuffer + " expected " + wdBuffer); + } + + wnf->format(i32, u3Buffer); + if (u3Buffer.compare(w3Buffer) != 0) { + UnicodeString locale(localeID); + + log->errln("int32_t format error for locale " + locale + + ": got " + u3Buffer + " expected " + w3Buffer); + } + + wnf->format(i64, u6Buffer); + if (u6Buffer.compare(w6Buffer) != 0) { + UnicodeString locale(localeID); + + log->errln("int64_t format error for locale " + locale + + ": got " + u6Buffer + " expected " + w6Buffer); + } + } +} + +void Win32NumberTest::testLocales(TestLog *log) +{ + int32_t lcidCount = 0; + Win32Utilities::LCIDRecord *lcidRecords = Win32Utilities::getLocales(lcidCount); + + for(int i = 0; i < lcidCount; i += 1) { + UErrorCode status = U_ZERO_ERROR; + char localeID[128]; + + // NULL localeID means ICU didn't recognize the lcid + if (lcidRecords[i].localeID == NULL) { + continue; + } + + strcpy(localeID, lcidRecords[i].localeID); + + if (strchr(localeID, '@') > 0) { + strcat(localeID, ";"); + } else { + strcat(localeID, "@"); + } + + strcat(localeID, "compat=host"); + + Locale ulocale(localeID); + NumberFormat *wnf = NumberFormat::createInstance(ulocale, status); + NumberFormat *wcf = NumberFormat::createCurrencyInstance(ulocale, status); + + testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wnf, FALSE, log); + testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wcf, TRUE, log); + +#if 0 + char *old_locale = strdup(setlocale(LC_ALL, NULL)); + + setlocale(LC_ALL, "German"); + + testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wnf, FALSE, log); + testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wcf, TRUE, log); + + setlocale(LC_ALL, old_locale); + + free(old_locale); +#endif + + delete wcf; + delete wnf; + } + + Win32Utilities::freeLocales(lcidRecords); +} + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* #ifdef U_WINDOWS */ diff --git a/Build/source/libs/icu-xetex/test/intltest/winnmtst.h b/Build/source/libs/icu-xetex/test/intltest/winnmtst.h new file mode 100644 index 00000000000..411969ad9ef --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/winnmtst.h @@ -0,0 +1,41 @@ +/* +******************************************************************************** +* Copyright (C) 2005-2006, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File WINNMTST.H +* +******************************************************************************** +*/ + +#ifndef __WINNMTST +#define __WINNMTST + +#include "unicode/utypes.h" + +#ifdef U_WINDOWS + +#if !UCONFIG_NO_FORMATTING + +/** + * \file + * \brief C++ API: Format dates using Windows API. + */ + +class TestLog; + +class Win32NumberTest +{ +public: + static void testLocales(TestLog *log); + +private: + Win32NumberTest(); +}; + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // #ifdef U_WINDOWS + +#endif // __WINNMTST diff --git a/Build/source/libs/icu-xetex/test/intltest/winutil.cpp b/Build/source/libs/icu-xetex/test/intltest/winutil.cpp new file mode 100644 index 00000000000..1963221ea4e --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/winutil.cpp @@ -0,0 +1,81 @@ +/* +******************************************************************************** +* Copyright (C) 2005-2006, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File WINUTIL.CPP +* +******************************************************************************** +*/ + +#include "unicode/utypes.h" + +#ifdef U_WINDOWS + +#if !UCONFIG_NO_FORMATTING + +#include "winutil.h" +#include "locmap.h" + +# define WIN32_LEAN_AND_MEAN +# define VC_EXTRALEAN +# define NOUSER +# define NOSERVICE +# define NOIME +# define NOMCX +# include <windows.h> +# include <stdio.h> + +static Win32Utilities::LCIDRecord *lcidRecords = NULL; +static int32_t lcidCount = 0; +static int32_t lcidMax = 0; + +BOOL CALLBACK EnumLocalesProc(LPSTR lpLocaleString) +{ + UErrorCode status = U_ZERO_ERROR; + + if (lcidCount >= lcidMax) { + Win32Utilities::LCIDRecord *newRecords = new Win32Utilities::LCIDRecord[lcidMax + 32]; + + for (int i = 0; i < lcidMax; i += 1) { + newRecords[i] = lcidRecords[i]; + } + + delete[] lcidRecords; + lcidRecords = newRecords; + lcidMax += 32; + } + + sscanf(lpLocaleString, "%8x", &lcidRecords[lcidCount].lcid); + + lcidRecords[lcidCount].localeID = uprv_convertToPosix(lcidRecords[lcidCount].lcid, &status); + + lcidCount += 1; + + return TRUE; +} + +Win32Utilities::LCIDRecord *Win32Utilities::getLocales(int32_t &localeCount) +{ + LCIDRecord *result; + + EnumSystemLocalesA(EnumLocalesProc, LCID_INSTALLED); + + localeCount = lcidCount; + result = lcidRecords; + + lcidCount = lcidMax = 0; + lcidRecords = NULL; + + return result; +} + +void Win32Utilities::freeLocales(LCIDRecord *records) +{ + delete[] records; +} + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif /* #ifdef U_WINDOWS */ diff --git a/Build/source/libs/icu-xetex/test/intltest/winutil.h b/Build/source/libs/icu-xetex/test/intltest/winutil.h new file mode 100644 index 00000000000..03a0044ac6e --- /dev/null +++ b/Build/source/libs/icu-xetex/test/intltest/winutil.h @@ -0,0 +1,46 @@ +/* +******************************************************************************** +* Copyright (C) 2005-2006, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************** +* +* File WINUTIL.H +* +******************************************************************************** +*/ + +#ifndef __WINUTIL +#define __WINUTIL + +#include "unicode/utypes.h" + +#ifdef U_WINDOWS + +#if !UCONFIG_NO_FORMATTING + +/** + * \file + * \brief C++ API: Format dates using Windows API. + */ + +class Win32Utilities +{ +public: + struct LCIDRecord + { + int32_t lcid; + const char *localeID; + }; + + static LCIDRecord *getLocales(int32_t &localeCount); + static void freeLocales(LCIDRecord *records); + +private: + Win32Utilities(); +}; + +#endif /* #if !UCONFIG_NO_FORMATTING */ + +#endif // #ifdef U_WINDOWS + +#endif // __WINUTIL diff --git a/Build/source/libs/icu-xetex/test/iotest/Makefile.in b/Build/source/libs/icu-xetex/test/iotest/Makefile.in index 3e22044f4d5..bfdbcf4c39f 100644 --- a/Build/source/libs/icu-xetex/test/iotest/Makefile.in +++ b/Build/source/libs/icu-xetex/test/iotest/Makefile.in @@ -1,6 +1,10 @@ +#****************************************************************************** +# +# Copyright (C) 1999-2005, International Business Machines +# Corporation and others. All Rights Reserved. +# +#****************************************************************************** ## Makefile.in for ICU - test/iotest -## Copyright (c) 2002-2005, International Business Machines Corporation and -## others. All Rights Reserved. ## Source directory information srcdir = @srcdir@ @@ -8,6 +12,7 @@ top_srcdir = @top_srcdir@ top_builddir = ../.. +## All the flags and other definitions are included here. include $(top_builddir)/icudefs.mk ## Build directory information @@ -27,15 +32,19 @@ BUILDDIR := $(BUILDDIR:test\\iotest/../../=) # Simplify the path for Windows 98 BUILDDIR := $(BUILDDIR:TEST\\IOTEST/../../=) -CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n \ --I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/io +ifneq ($(top_builddir),$(top_srcdir)) +CPPFLAGS += -I$(top_builddir)/common +endif +CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/io DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"' LIBS = $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(LIBICUIO) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M) -OBJECTS = iotest.o strtst.o filetst.o trnstst.o +OBJECTS = iotest.o stream.o strtst.o filetst.o trnstst.o DEPS = $(OBJECTS:.o=.d) +-include Makefile.local + ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ distclean distclean-local dist dist-local check check-local @@ -64,8 +73,6 @@ clean-local: distclean-local: clean-local $(RMV) Makefile --include Makefile.local - check-local: all-local $(INVOKE) ./$(TARGET) $(IOTEST_OPTS) || true @@ -85,3 +92,4 @@ ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) endif endif endif + diff --git a/Build/source/libs/icu-xetex/test/iotest/filetst.c b/Build/source/libs/icu-xetex/test/iotest/filetst.c index 1c09dd0a02c..1e908e42a1b 100644 --- a/Build/source/libs/icu-xetex/test/iotest/filetst.c +++ b/Build/source/libs/icu-xetex/test/iotest/filetst.c @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2004-2005, International Business Machines +* Copyright (C) 2004-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * file name: filetst.c @@ -53,8 +53,11 @@ static void TestFileFromICU(UFILE *myFile) { origPtr = (void *) INT64_C(0x1000200030004000); } else if (sizeof(void *) == 16) { /* iSeries */ - int32_t massiveBigEndianPtr[] = { 0x10002000, 0x30004000, 0x50006000, 0x70008000 }; - origPtr = *((void **)massiveBigEndianPtr); + union { + int32_t arr[4]; + void *ptr; + } massiveBigEndianPtr = {{ 0x10002000, 0x30004000, 0x50006000, 0x70008000 }}; + origPtr = massiveBigEndianPtr.ptr; } else { log_err("sizeof(void*)=%d hasn't been tested before", (int)sizeof(void*)); } @@ -90,8 +93,8 @@ static void TestFileFromICU(UFILE *myFile) { u_fprintf(myFile, "Pointer to integer Value: %d\n", *n); u_fprintf(myFile, "This is a long test123456789012345678901234567890123456789012345678901234567890\n"); *n = 1; - fprintf(u_fgetfile(myFile), "\tNormal fprintf count: n=%d %n n=%d\n", (int)*n, (int*)n, (int)*n); - fprintf(u_fgetfile(myFile), "\tNormal fprintf count value: n=%d\n", (int)*n); + u_fprintf(myFile, "\tNormal fprintf count: n=%d %n n=%d\n", (int)*n, (int*)n, (int)*n); + fprintf(u_fgetfile(myFile), "\tNormal fprintf count value: n=%d\n", (int)*n); /* Should be 27 as stated later on. */ u_fclose(myFile); myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, NULL); @@ -163,27 +166,27 @@ static void TestFileFromICU(UFILE *myFile) { log_err("%%X Got: %X, Expected: %X\n", *newValuePtr, *n); } *newDoubleValuePtr = -1.0; - u_fscanf(myFile, "Float %%f: %f\n", newDoubleValuePtr); + u_fscanf(myFile, "Float %%f: %lf\n", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%f Got: %f, Expected: %f\n", *newDoubleValuePtr, myFloat); } *newDoubleValuePtr = -1.0; - u_fscanf(myFile, "Lowercase float %%e: %e\n", newDoubleValuePtr); + u_fscanf(myFile, "Lowercase float %%e: %le\n", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%e Got: %e, Expected: %e\n", *newDoubleValuePtr, myFloat); } *newDoubleValuePtr = -1.0; - u_fscanf(myFile, "Uppercase float %%E: %E\n", newDoubleValuePtr); + u_fscanf(myFile, "Uppercase float %%E: %lE\n", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%E Got: %E, Expected: %E\n", *newDoubleValuePtr, myFloat); } *newDoubleValuePtr = -1.0; - u_fscanf(myFile, "Lowercase float %%g: %g\n", newDoubleValuePtr); + u_fscanf(myFile, "Lowercase float %%g: %lg\n", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%g Got: %g, Expected: %g\n", *newDoubleValuePtr, myFloat); } *newDoubleValuePtr = -1.0; - u_fscanf(myFile, "Uppercase float %%G: %G\n", newDoubleValuePtr); + u_fscanf(myFile, "Uppercase float %%G: %lG\n", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%G Got: %G, Expected: %G\n", *newDoubleValuePtr, myFloat); } @@ -433,12 +436,12 @@ static void TestfgetsBuffers(void) { } u_fputc(0x3BC, myFile); - if (u_fputc(0x110000, myFile) != U_EOF) { + if (u_fputc(0x110000, myFile) != U_EOF) { log_err("u_fputc should return U_EOF for 0x110000.\n"); - } - if (u_fputc((UChar32)0xFFFFFFFFu, myFile) != U_EOF) { + } + if (u_fputc((UChar32)0xFFFFFFFFu, myFile) != U_EOF) { log_err("u_fputc should return U_EOF for 0xFFFFFFFF.\n"); - } + } u_fputc(0xFF41, myFile); u_memset(buffer, 0xBEEF, sizeof(buffer)/sizeof(buffer[0])); u_memset(expectedBuffer, 0, sizeof(expectedBuffer)/sizeof(expectedBuffer[0])); @@ -1396,32 +1399,32 @@ static void TestVargs(void) { static void TestUnicodeFormat(void) { #if !UCONFIG_NO_FORMATTING - /* Make sure that invariant conversion doesn't happen on the _u formats. */ + /* Make sure that invariant conversion doesn't happen on the _u formats. */ UChar myUString[256]; - UFILE *myFile; - static const UChar TEST_STR[] = { 0x03BC, 0x0025, 0x0024, 0}; - static const UChar PERCENT_S[] = { 0x03BC, 0x0025, 0x0053, 0}; + UFILE *myFile; + static const UChar TEST_STR[] = { 0x03BC, 0x0025, 0x0024, 0}; + static const UChar PERCENT_S[] = { 0x03BC, 0x0025, 0x0053, 0}; - u_memset(myUString, 0x2a, sizeof(myUString)/sizeof(*myUString)); + u_memset(myUString, 0x2a, sizeof(myUString)/sizeof(*myUString)); myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-8"); if (!myFile) { log_err("Test file can't be opened\n"); return; } - u_fprintf_u(myFile, PERCENT_S, TEST_STR); - u_fclose(myFile); + u_fprintf_u(myFile, PERCENT_S, TEST_STR); + u_fclose(myFile); myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-8"); if (!myFile) { log_err("Test file can't be opened\n"); return; } - u_fscanf_u(myFile, PERCENT_S, myUString); - u_fclose(myFile); - if (u_strcmp(TEST_STR, myUString) != 0) { + u_fscanf_u(myFile, PERCENT_S, myUString); + u_fclose(myFile); + if (u_strcmp(TEST_STR, myUString) != 0) { log_err("u_fscanf_u doesn't work.\n"); - } + } #endif } diff --git a/Build/source/libs/icu-xetex/test/iotest/iotest.cpp b/Build/source/libs/icu-xetex/test/iotest/iotest.cpp index 250aafb6237..748ae3584d8 100644 --- a/Build/source/libs/icu-xetex/test/iotest/iotest.cpp +++ b/Build/source/libs/icu-xetex/test/iotest/iotest.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2002-2005, International Business Machines +* Copyright (C) 2002-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * file name: iotest.cpp @@ -14,7 +14,6 @@ #include "unicode/ustdio.h" -#include "unicode/ustream.h" #include "unicode/uclean.h" #include "unicode/ucnv.h" @@ -26,36 +25,9 @@ #include "unicode/tstdtmod.h" #include "putilimp.h" -#if U_IOSTREAM_SOURCE >= 199711 -#include <iostream> -#if defined(U_LINUX) || defined(U_CYGWIN) -#define USE_SSTREAM 1 -#include <sstream> -#else -// <strstream> is deprecated on some platforms, and the compiler complains very loudly if you use it. -#include <strstream> -#endif -using namespace std; -#elif U_IOSTREAM_SOURCE >= 198506 -#include <iostream.h> -#include <strstream.h> -#endif - #include <string.h> #include <stdlib.h> -U_CDECL_BEGIN -#ifdef U_WINDOWS -const UChar NEW_LINE[] = {0x0d,0x0a,0}; -const char C_NEW_LINE[] = {0x0d,0x0a,0}; -#define UTF8_NEW_LINE "\x0d\x0a" -#else -const UChar NEW_LINE[] = {0x0a,0}; -const char C_NEW_LINE[] = {'\n',0}; -#define UTF8_NEW_LINE "\x0a" -#endif -U_CDECL_END - class DataDrivenLogger : public TestLog { static const char* fgDataDir; static char *fgTestDataPath; @@ -389,6 +361,7 @@ static void U_CALLCONV DataDrivenScanf(void) int32_t i32, expected32; int64_t i64, expected64; double dbl, expectedDbl; + volatile float flt, expectedFlt; // Use volatile in order to get around an Intel compiler issue. int32_t uBufferLenReturned; //const char *fileLocale = "en_US_POSIX"; @@ -438,6 +411,15 @@ static void U_CALLCONV DataDrivenScanf(void) i, dbl, expectedDbl); } break; + case 0x66: // 'f' float + expectedFlt = (float)atof(u_austrcpy(cBuffer, expectedResult)); + uBufferLenReturned = u_sscanf_u(argument, format, &flt); + //uFileBufferLenReturned = u_fscanf_u(testFile, format, flt); + if (flt != expectedFlt) { + log_err("error in scanf test case[%d] Got: %f Exp: %f\n", + i, flt, expectedFlt); + } + break; case 0x31: // '1' int8_t expected8 = (int8_t)uto64(expectedResult); uBufferLenReturned = u_sscanf_u(argument, format, &i8); @@ -682,88 +664,6 @@ static void U_CALLCONV DataDrivenPrintfPrecision(void) } U_CDECL_END -U_CDECL_BEGIN -static void U_CALLCONV TestStream(void) -{ -#if U_IOSTREAM_SOURCE >= 198506 - const UChar thisMu[] = { 0x74, 0x48, 0x69, 0x73, 0x3BC, 0}; - const UChar mu[] = { 0x6D, 0x75, 0}; - UnicodeString str1 = UNICODE_STRING_SIMPLE("str1"); - UnicodeString str2 = UNICODE_STRING_SIMPLE(" <<"); - UnicodeString str3 = UNICODE_STRING_SIMPLE("2"); - UnicodeString str4 = UNICODE_STRING_SIMPLE(" UTF-8 "); - UnicodeString inStr = UNICODE_STRING_SIMPLE(" UTF-8 "); - UnicodeString inStr2; - char defConvName[UCNV_MAX_CONVERTER_NAME_LENGTH*2]; - char inStrC[128]; - UErrorCode status = U_ZERO_ERROR; - UConverter *defConv; - static const char testStr[] = "\x42\x65\x67\x69\x6E\x6E\x69\x6E\x67\x20\x6F\x66\x20\x74\x65\x73\x74\x20\x73\x74\x72\x31\x20\x20\x20\x3C\x3C\x32\x31\x20" UTF8_NEW_LINE "\x20\x55\x54\x46\x2D\x38\x20\xCE\xBC\xF0\x90\x80\x81\xF0\x90\x80\x82"; - - str4.append((UChar32)0x03BC); /* mu */ - str4.append((UChar32)0x10001); - str4.append((UChar32)0x10002); - - /* release the default converter and use utf-8 for a bit */ - defConv = u_getDefaultConverter(&status); - if (U_FAILURE(status)) { - log_err("Can't get default converter\n"); - return; - } - ucnv_close(defConv); - strncpy(defConvName, ucnv_getDefaultName(), sizeof(defConvName)/sizeof(defConvName[0])); - ucnv_setDefaultName("UTF-8"); - - static const char * const TESTSTRING = "\x20\x74\x48\x69\x73\xCE\xBC\xE2\x80\x82\x20\x6D\x75\x20\x77\x6F\x72\x6C\x64"; -#ifdef USE_SSTREAM - ostringstream outTestStream; - istringstream inTestStream(TESTSTRING); -#else - char testStreamBuf[512]; - ostrstream outTestStream(testStreamBuf, sizeof(testStreamBuf)); - istrstream inTestStream(TESTSTRING, 0); - - /* initialize testStreamBuf */ - memset(testStreamBuf, '*', sizeof(testStreamBuf)); - testStreamBuf[sizeof(testStreamBuf)-1] = 0; -#endif - - outTestStream << "\x42\x65\x67\x69\x6E\x6E\x69\x6E\x67\x20\x6F\x66\x20\x74\x65\x73\x74\x20"; - outTestStream << str1 << "\x20\x20" << str2 << str3 << "\x31\x20" << UTF8_NEW_LINE << str4 << ends; -#ifdef USE_SSTREAM - string tempStr = outTestStream.str(); - const char *testStreamBuf = tempStr.c_str(); -#endif - if (strcmp(testStreamBuf, testStr) != 0) { - log_err("Got: \"%s\", Expected: \"%s\"\n", testStreamBuf, testStr); - } - - inTestStream >> inStr >> inStr2; - if (inStr.compare(thisMu) != 0) { - u_austrncpy(inStrC, inStr.getBuffer(), inStr.length()); - inStrC[inStr.length()] = 0; - log_err("Got: \"%s\", Expected: \"tHis\\u03BC\"\n", inStrC); - } - if (inStr2.compare(mu) != 0) { - u_austrncpy(inStrC, inStr.getBuffer(), inStr.length()); - inStrC[inStr.length()] = 0; - log_err("Got: \"%s\", Expected: \"mu\"\n", inStrC); - } - - /* return the default converter to the original state. */ - ucnv_setDefaultName(defConvName); - defConv = u_getDefaultConverter(&status); - if (U_FAILURE(status)) { - log_err("Can't get default converter"); - return; - } - ucnv_close(defConv); -#else - log_info("U_IOSTREAM_SOURCE is disabled\n"); -#endif -} -U_CDECL_END - static void addAllTests(TestNode** root) { addFileTest(root); addStringTest(root); @@ -774,7 +674,7 @@ static void addAllTests(TestNode** root) { addTest(root, &DataDrivenPrintfPrecision, "datadriv/DataDrivenPrintfPrecision"); addTest(root, &DataDrivenScanf, "datadriv/DataDrivenScanf"); #endif - addTest(root, &TestStream, "stream/TestStream"); + addStreamTests(root); } /* returns the path to icu/source/data/out */ diff --git a/Build/source/libs/icu-xetex/test/iotest/iotest.h b/Build/source/libs/icu-xetex/test/iotest/iotest.h index 6e63d958177..6d522dc435d 100644 --- a/Build/source/libs/icu-xetex/test/iotest/iotest.h +++ b/Build/source/libs/icu-xetex/test/iotest/iotest.h @@ -27,6 +27,9 @@ addFileTest(TestNode** root); U_CFUNC void addTranslitTest(TestNode** root); +U_CFUNC void +addStreamTests(TestNode** root); + U_CDECL_BEGIN extern const UChar NEW_LINE[]; extern const char C_NEW_LINE[]; diff --git a/Build/source/libs/icu-xetex/test/iotest/iotest.vcproj b/Build/source/libs/icu-xetex/test/iotest/iotest.vcproj index 682f9a39258..68ea46e094a 100644 --- a/Build/source/libs/icu-xetex/test/iotest/iotest.vcproj +++ b/Build/source/libs/icu-xetex/test/iotest/iotest.vcproj @@ -29,6 +29,7 @@ RuntimeLibrary="3" BufferSecurityCheck="TRUE" DisableLanguageExtensions="TRUE" + TreatWChar_tAsBuiltInType="TRUE" PrecompiledHeaderFile=".\Debug/iotest.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" @@ -90,6 +91,7 @@ StringPooling="TRUE" RuntimeLibrary="2" DisableLanguageExtensions="TRUE" + TreatWChar_tAsBuiltInType="TRUE" PrecompiledHeaderFile=".\Release/iotest.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" @@ -139,23 +141,38 @@ Name="Source Files" Filter="cpp;c;cxx"> <File - RelativePath="filetst.c"> + RelativePath=".\filetst.c"> </File> <File - RelativePath="iotest.cpp"> + RelativePath=".\iotest.cpp"> </File> <File - RelativePath="strtst.c"> + RelativePath=".\stream.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="FALSE"/> + </FileConfiguration> </File> <File - RelativePath="trnstst.c"> + RelativePath=".\strtst.c"> + </File> + <File + RelativePath=".\trnstst.c"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx"> <File - RelativePath="iotest.h"> + RelativePath=".\iotest.h"> </File> </Filter> </Files> diff --git a/Build/source/libs/icu-xetex/test/iotest/stream.cpp b/Build/source/libs/icu-xetex/test/iotest/stream.cpp new file mode 100644 index 00000000000..ccc70632235 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/iotest/stream.cpp @@ -0,0 +1,135 @@ +/* +********************************************************************** +* Copyright (C) 2002-2006, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: iotest.cpp +* encoding: US-ASCII +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2002feb21 +* created by: George Rhoten +*/ + + +#include "unicode/ustream.h" + +#include "unicode/ucnv.h" +#include "unicode/ustring.h" +#include "ustr_cnv.h" +#include "iotest.h" + +#if U_IOSTREAM_SOURCE >= 199711 +#if defined(__GNUC__) && __GNUC__ >= 4 +#define USE_SSTREAM 1 +#include <sstream> +#else +// <strstream> is deprecated on some platforms, and the compiler complains very loudly if you use it. +#include <strstream> +#endif +using namespace std; +#elif U_IOSTREAM_SOURCE >= 198506 +#include <strstream.h> +#endif + +#include <string.h> + +U_CDECL_BEGIN +#ifdef U_WINDOWS +const UChar NEW_LINE[] = {0x0d,0x0a,0}; +const char C_NEW_LINE[] = {0x0d,0x0a,0}; +#define UTF8_NEW_LINE "\x0d\x0a" +#else +const UChar NEW_LINE[] = {0x0a,0}; +const char C_NEW_LINE[] = {'\n',0}; +#define UTF8_NEW_LINE "\x0a" +#endif +U_CDECL_END + +U_CDECL_BEGIN +static void U_CALLCONV TestStream(void) +{ +#if U_IOSTREAM_SOURCE >= 198506 + const UChar thisMu[] = { 0x74, 0x48, 0x69, 0x73, 0x3BC, 0}; + const UChar mu[] = { 0x6D, 0x75, 0}; + UnicodeString str1 = UNICODE_STRING_SIMPLE("str1"); + UnicodeString str2 = UNICODE_STRING_SIMPLE(" <<"); + UnicodeString str3 = UNICODE_STRING_SIMPLE("2"); + UnicodeString str4 = UNICODE_STRING_SIMPLE(" UTF-8 "); + UnicodeString inStr = UNICODE_STRING_SIMPLE(" UTF-8 "); + UnicodeString inStr2; + char defConvName[UCNV_MAX_CONVERTER_NAME_LENGTH*2]; + char inStrC[128]; + UErrorCode status = U_ZERO_ERROR; + UConverter *defConv; + static const char testStr[] = "\x42\x65\x67\x69\x6E\x6E\x69\x6E\x67\x20\x6F\x66\x20\x74\x65\x73\x74\x20\x73\x74\x72\x31\x20\x20\x20\x3C\x3C\x32\x31\x20" UTF8_NEW_LINE "\x20\x55\x54\x46\x2D\x38\x20\xCE\xBC\xF0\x90\x80\x81\xF0\x90\x80\x82"; + + str4.append((UChar32)0x03BC); /* mu */ + str4.append((UChar32)0x10001); + str4.append((UChar32)0x10002); + + /* release the default converter and use utf-8 for a bit */ + defConv = u_getDefaultConverter(&status); + if (U_FAILURE(status)) { + log_err("Can't get default converter\n"); + return; + } + ucnv_close(defConv); + strncpy(defConvName, ucnv_getDefaultName(), sizeof(defConvName)/sizeof(defConvName[0])); + ucnv_setDefaultName("UTF-8"); + + static const char * const TESTSTRING = "\x20\x74\x48\x69\x73\xCE\xBC\xE2\x80\x82\x20\x6D\x75\x20\x77\x6F\x72\x6C\x64"; +#ifdef USE_SSTREAM + ostringstream outTestStream; + istringstream inTestStream(TESTSTRING); +#else + char testStreamBuf[512]; + ostrstream outTestStream(testStreamBuf, sizeof(testStreamBuf)); + istrstream inTestStream(TESTSTRING, 0); + + /* initialize testStreamBuf */ + memset(testStreamBuf, '*', sizeof(testStreamBuf)); + testStreamBuf[sizeof(testStreamBuf)-1] = 0; +#endif + + outTestStream << "\x42\x65\x67\x69\x6E\x6E\x69\x6E\x67\x20\x6F\x66\x20\x74\x65\x73\x74\x20"; + outTestStream << str1 << "\x20\x20" << str2 << str3 << "\x31\x20" << UTF8_NEW_LINE << str4 << ends; +#ifdef USE_SSTREAM + string tempStr = outTestStream.str(); + const char *testStreamBuf = tempStr.c_str(); +#endif + if (strcmp(testStreamBuf, testStr) != 0) { + log_err("Got: \"%s\", Expected: \"%s\"\n", testStreamBuf, testStr); + } + + inTestStream >> inStr >> inStr2; + if (inStr.compare(thisMu) != 0) { + u_austrncpy(inStrC, inStr.getBuffer(), inStr.length()); + inStrC[inStr.length()] = 0; + log_err("Got: \"%s\", Expected: \"tHis\\u03BC\"\n", inStrC); + } + if (inStr2.compare(mu) != 0) { + u_austrncpy(inStrC, inStr.getBuffer(), inStr.length()); + inStrC[inStr.length()] = 0; + log_err("Got: \"%s\", Expected: \"mu\"\n", inStrC); + } + + /* return the default converter to the original state. */ + ucnv_setDefaultName(defConvName); + defConv = u_getDefaultConverter(&status); + if (U_FAILURE(status)) { + log_err("Can't get default converter"); + return; + } + ucnv_close(defConv); +#else + log_info("U_IOSTREAM_SOURCE is disabled\n"); +#endif +} +U_CDECL_END + +U_CFUNC void addStreamTests(TestNode** root) { + addTest(root, &TestStream, "stream/TestStream"); +} + diff --git a/Build/source/libs/icu-xetex/test/iotest/strtst.c b/Build/source/libs/icu-xetex/test/iotest/strtst.c index 906f519d3c2..0412f25efb2 100644 --- a/Build/source/libs/icu-xetex/test/iotest/strtst.c +++ b/Build/source/libs/icu-xetex/test/iotest/strtst.c @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2004-2005, International Business Machines +* Copyright (C) 2004-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * file name: strtst.c @@ -42,8 +42,11 @@ static void TestString(void) { origPtr = (void *) INT64_C(0x1000200030004000); } else if (sizeof(void *) == 16) { /* iSeries */ - int32_t massiveBigEndianPtr[] = { 0x10002000, 0x30004000, 0x50006000, 0x70008000 }; - origPtr = *((void **)massiveBigEndianPtr); + union { + int32_t arr[4]; + void *ptr; + } massiveBigEndianPtr = {{ 0x10002000, 0x30004000, 0x50006000, 0x70008000 }}; + origPtr = massiveBigEndianPtr.ptr; } else { log_err("sizeof(void*)=%d hasn't been tested before", (int)sizeof(void*)); } @@ -93,35 +96,35 @@ static void TestString(void) { u_sprintf(uStringBuf, "Float f: %f", myFloat); *newDoubleValuePtr = -1.0; - u_sscanf(uStringBuf, "Float f: %f", newDoubleValuePtr); + u_sscanf(uStringBuf, "Float f: %lf", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%f Got: %f, Expected: %f\n", *newDoubleValuePtr, myFloat); } u_sprintf(uStringBuf, "Lowercase float e: %e", myFloat); *newDoubleValuePtr = -1.0; - u_sscanf(uStringBuf, "Lowercase float e: %e", newDoubleValuePtr); + u_sscanf(uStringBuf, "Lowercase float e: %le", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%e Got: %e, Expected: %e\n", *newDoubleValuePtr, myFloat); } u_sprintf(uStringBuf, "Uppercase float E: %E", myFloat); *newDoubleValuePtr = -1.0; - u_sscanf(uStringBuf, "Uppercase float E: %E", newDoubleValuePtr); + u_sscanf(uStringBuf, "Uppercase float E: %lE", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%E Got: %E, Expected: %E\n", *newDoubleValuePtr, myFloat); } u_sprintf(uStringBuf, "Lowercase float g: %g", myFloat); *newDoubleValuePtr = -1.0; - u_sscanf(uStringBuf, "Lowercase float g: %g", newDoubleValuePtr); + u_sscanf(uStringBuf, "Lowercase float g: %lg", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%g Got: %g, Expected: %g\n", *newDoubleValuePtr, myFloat); } u_sprintf(uStringBuf, "Uppercase float G: %G", myFloat); *newDoubleValuePtr = -1.0; - u_sscanf(uStringBuf, "Uppercase float G: %G", newDoubleValuePtr); + u_sscanf(uStringBuf, "Uppercase float G: %lG", newDoubleValuePtr); if (myFloat != *newDoubleValuePtr) { log_err("%%G Got: %G, Expected: %G\n", *newDoubleValuePtr, myFloat); } @@ -279,7 +282,7 @@ static void TestLocalizedString(void) { u_fprintf(strFile, "%d", 1234); u_frewind(strFile); - numResult = -1; + numResult = -1; u_fscanf(strFile, "%d", &numResult); u_fclose(strFile); u_uastrcpy(uBuffer,"1.234"); @@ -294,15 +297,15 @@ static void TestLocalizedString(void) { strFile = u_fstropen(testStr, sizeof(testStr)/sizeof(testStr[0]), NULL); u_fprintf(strFile, "%d", 1234); u_frewind(strFile); - numResult = -1; + numResult = -1; u_fscanf(strFile, "%d", &numResult); u_fclose(strFile); if (numResult != 1234) { - log_err("u_fscanf failed to work on a default locale string Got: %d, Expected: 1234\n", numResult); + log_err("u_fscanf failed to work on a default locale string Got: %d, Expected: 1234\n", numResult); + } + if (u_fstropen(testStr, -1, NULL) != NULL) { + log_err("u_fstropen returned a UFILE* on a negative buffer size\n", numResult); } - if (u_fstropen(testStr, -1, NULL) != NULL) { - log_err("u_fstropen returned a UFILE* on a negative buffer size\n", numResult); - } #endif } @@ -728,9 +731,11 @@ static void TestVargs(void) { static void TestCount(void) { #if !UCONFIG_NO_FORMATTING + static const UChar x15[] = { 0x78, 0x31, 0x35, 0 }; UChar testStr[16]; + UChar character; int16_t i16 = -1; - int32_t i32 = -1; + int32_t i32 = -1, actual_count, actual_result; int64_t i64 = -1; u_uastrcpy(testStr, "1233456789"); if (u_sscanf(testStr, "%*3[123]%n%*[1-9]", &i32) != 0) { @@ -751,6 +756,19 @@ static void TestCount(void) { if (i64 != 10) { log_err("test 3: scanf did not return 10\n", i64); } + actual_result = u_sscanf(x15, "%C%d%n", &character, &i32, &actual_count); + if (actual_result != 2) { + log_err("scanf should return 2, but returned %d\n", actual_result); + } + if (character != 0x78) { + log_err("scanf should return 0x78 for the character, but returned %X\n", character); + } + if (i32 != 15) { + log_err("scanf should return 15 for the number, but returned %d\n", i32); + } + if (actual_count != 3) { + log_err("scanf should return 3 for actual_count, but returned %d\n", actual_count); + } #endif } diff --git a/Build/source/libs/icu-xetex/test/letest/.cvsignore b/Build/source/libs/icu-xetex/test/letest/.cvsignore index 169a662430a..903b98913a7 100644 --- a/Build/source/libs/icu-xetex/test/letest/.cvsignore +++ b/Build/source/libs/icu-xetex/test/letest/.cvsignore @@ -1,7 +1,7 @@ Makefile *.d -*.pdb +*.o Debug Release -tmp -.#* +letest +letest.exe diff --git a/Build/source/libs/icu-xetex/test/letest/FontTableCache.cpp b/Build/source/libs/icu-xetex/test/letest/FontTableCache.cpp index 6dbaddf3699..cf28de2228b 100644 --- a/Build/source/libs/icu-xetex/test/letest/FontTableCache.cpp +++ b/Build/source/libs/icu-xetex/test/letest/FontTableCache.cpp @@ -1,12 +1,13 @@ /* ********************************************************************** - * Copyright (C) 2003-2005, International Business Machines + * Copyright (C) 2003-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ #include "layout/LETypes.h" +#include "letest.h" #include "FontTableCache.h" #define TABLE_CACHE_INIT 5 @@ -21,7 +22,7 @@ struct FontTableCacheEntry FontTableCache::FontTableCache() : fTableCacheCurr(0), fTableCacheSize(TABLE_CACHE_INIT) { - fTableCache = LE_NEW_ARRAY(FontTableCacheEntry, fTableCacheSize); + fTableCache = NEW_ARRAY(FontTableCacheEntry, fTableCacheSize); if (fTableCache == NULL) { fTableCacheSize = 0; @@ -37,7 +38,7 @@ FontTableCache::FontTableCache() FontTableCache::~FontTableCache() { for (int i = fTableCacheCurr - 1; i >= 0; i -= 1) { - LE_DELETE_ARRAY(fTableCache[i].table); + DELETE_ARRAY(fTableCache[i].table); fTableCache[i].tag = 0; fTableCache[i].table = NULL; @@ -45,7 +46,7 @@ FontTableCache::~FontTableCache() fTableCacheCurr = 0; - LE_DELETE_ARRAY(fTableCache); + DELETE_ARRAY(fTableCache); } const void *FontTableCache::find(LETag tableTag) const @@ -68,7 +69,7 @@ void FontTableCache::add(LETag tableTag, const void *table) if (fTableCacheCurr >= fTableCacheSize) { le_int32 newSize = fTableCacheSize + TABLE_CACHE_GROW; - fTableCache = (FontTableCacheEntry *) LE_GROW_ARRAY(fTableCache, newSize); + fTableCache = (FontTableCacheEntry *) GROW_ARRAY(fTableCache, newSize); for (le_int32 i = fTableCacheSize; i < newSize; i += 1) { fTableCache[i].tag = 0; diff --git a/Build/source/libs/icu-xetex/test/letest/Makefile.in b/Build/source/libs/icu-xetex/test/letest/Makefile.in index 400fc55bbfd..55f6b88f811 100644 --- a/Build/source/libs/icu-xetex/test/letest/Makefile.in +++ b/Build/source/libs/icu-xetex/test/letest/Makefile.in @@ -1,5 +1,5 @@ ## Makefile.in for ICU - test/letest -## Copyright (c) 2001-2003, International Business Machines Corporation and +## Copyright (c) 2001-2006, International Business Machines Corporation and ## others. All Rights Reserved. ## Source directory information @@ -23,11 +23,24 @@ CLEANFILES = *~ $(DEPS) TESTTARGET = letest GENTARGET = gendata -CPPFLAGS += -DLE_USE_CMEMORY -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/layout -I$(top_srcdir) -LIBS = $(LIBICULE) $(LIBICUUC) @LIBS@ @LIB_M@ +BUILDDIR := $(CURR_SRCCODE_FULL_DIR)/../../ +# Simplify the path for Unix +BUILDDIR := $(BUILDDIR:test/cintltst/../../=) +# Simplify the path for Windows +BUILDDIR := $(BUILDDIR:test\\cintltst/../../=) +# Simplify the path for Windows 98 +BUILDDIR := $(BUILDDIR:TEST\\CINTLTST/../../=) -COMMONOBJECTS = cmaps.o FontTableCache.o PortableFontInstance.o -TESTOBJECTS = testdata.o letest.o +ifneq ($(top_builddir),$(top_srcdir)) +CPPFLAGS += -I$(top_builddir)/common +endif + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/layout -I$(top_srcdir) +DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"' +LIBS = $(LIBICULE) $(LIBICUUC) $(LIBICUI18N) $(LIBCTESTFW) $(LIBICUTOOLUTIL) @LIBS@ @LIB_M@ + +COMMONOBJECTS = letsutil.o cmaps.o FontTableCache.o SimpleFontInstance.o PortableFontInstance.o +TESTOBJECTS = letest.o GENOBJECTS = gendata.o OBJECTS = $(COMMONOBJECTS) $(TESTOBJECTS) $(GENOBJECTS) diff --git a/Build/source/libs/icu-xetex/test/letest/PortableFontInstance.cpp b/Build/source/libs/icu-xetex/test/letest/PortableFontInstance.cpp index 4b3ec35419a..c96b6ed762c 100644 --- a/Build/source/libs/icu-xetex/test/letest/PortableFontInstance.cpp +++ b/Build/source/libs/icu-xetex/test/letest/PortableFontInstance.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 1999-2005, International Business Machines + * Copyright (C) 1999-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -19,6 +19,7 @@ #include "PortableFontInstance.h" +#include "letest.h" #include "sfnt.h" #include <string.h> @@ -92,7 +93,7 @@ PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize // const NAMETable *nameTable = NULL; le_uint16 numTables = 0; - fDirectory = (const SFNTDirectory *) LE_NEW_ARRAY(char, dirSize); + fDirectory = (const SFNTDirectory *) NEW_ARRAY(char, dirSize); if (fDirectory == NULL) { status = LE_MEMORY_ALLOCATION_ERROR; @@ -178,13 +179,13 @@ PortableFontInstance::~PortableFontInstance() delete fCMAPMapper; - LE_DELETE_ARRAY(fDirectory); + DELETE_ARRAY(fDirectory); } } void PortableFontInstance::deleteTable(const void *table) const { - LE_DELETE_ARRAY(table); + DELETE_ARRAY(table); } const DirectoryEntry *PortableFontInstance::findTable(LETag tag) const @@ -224,7 +225,7 @@ const void *PortableFontInstance::readTable(LETag tag, le_uint32 *length) const *length = SWAPL(entry->length); - void *table = LE_NEW_ARRAY(char, *length); + void *table = NEW_ARRAY(char, *length); if (table != NULL) { fseek(fFile, SWAPL(entry->offset), SEEK_SET); @@ -279,9 +280,9 @@ const char *PortableFontInstance::getNameString(le_uint16 nameID, le_uint16 plat SWAPW(nameRecord->languageID) == languageID && SWAPW(nameRecord->nameID) == nameID) { char *name = ((char *) fNAMETable) + fNameStringOffset + SWAPW(nameRecord->offset); le_uint16 length = SWAPW(nameRecord->length); - char *result = LE_NEW_ARRAY(char, length + 2); + char *result = NEW_ARRAY(char, length + 2); - LE_ARRAY_COPY(result, name, length); + ARRAY_COPY(result, name, length); result[length] = result[length + 1] = 0; return result; @@ -293,7 +294,7 @@ const char *PortableFontInstance::getNameString(le_uint16 nameID, le_uint16 plat void PortableFontInstance::deleteNameString(const char *name) const { - LE_DELETE_ARRAY(name); + DELETE_ARRAY(name); } void PortableFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const @@ -334,3 +335,66 @@ le_bool PortableFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*poin return FALSE; } +le_int32 PortableFontInstance::getUnitsPerEM() const +{ + return fUnitsPerEM; +} + +le_uint32 PortableFontInstance::getFontChecksum() const +{ + return fFontChecksum; +} + +le_int32 PortableFontInstance::getAscent() const +{ + return fAscent; +} + +le_int32 PortableFontInstance::getDescent() const +{ + return fDescent; +} + +le_int32 PortableFontInstance::getLeading() const +{ + return fLeading; +} + +// We really want to inherit this method from the superclass, but some compilers +// issue a warning if we don't implement it... +LEGlyphID PortableFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const +{ + return LEFontInstance::mapCharToGlyph(ch, mapper, filterZeroWidth); +} + +// We really want to inherit this method from the superclass, but some compilers +// issue a warning if we don't implement it... +LEGlyphID PortableFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const +{ + return LEFontInstance::mapCharToGlyph(ch, mapper); +} + +LEGlyphID PortableFontInstance::mapCharToGlyph(LEUnicode32 ch) const +{ + return fCMAPMapper->unicodeToGlyph(ch); +} + +float PortableFontInstance::getXPixelsPerEm() const +{ + return fPointSize; +} + +float PortableFontInstance::getYPixelsPerEm() const +{ + return fPointSize; +} + +float PortableFontInstance::getScaleFactorX() const +{ + return 1.0; +} + +float PortableFontInstance::getScaleFactorY() const +{ + return 1.0; +} diff --git a/Build/source/libs/icu-xetex/test/letest/PortableFontInstance.h b/Build/source/libs/icu-xetex/test/letest/PortableFontInstance.h index eff9efe5ade..3c22d5ebe91 100644 --- a/Build/source/libs/icu-xetex/test/letest/PortableFontInstance.h +++ b/Build/source/libs/icu-xetex/test/letest/PortableFontInstance.h @@ -2,7 +2,7 @@ /* ******************************************************************************* * - * Copyright (C) 1999-2005, International Business Machines + * Copyright (C) 1999-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -77,59 +77,37 @@ public: virtual void deleteNameString(const char *name) const; - virtual le_int32 getUnitsPerEM() const - { - return fUnitsPerEM; - }; + virtual le_int32 getUnitsPerEM() const; - virtual le_uint32 getFontChecksum() const - { - return fFontChecksum; - } + virtual le_uint32 getFontChecksum() const; - virtual le_int32 getAscent() const - { - return fAscent; - } + virtual le_int32 getAscent() const; - virtual le_int32 getDescent() const - { - return fDescent; - } + virtual le_int32 getDescent() const; - virtual le_int32 getLeading() const - { - return fLeading; - } + virtual le_int32 getLeading() const; - virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const - { - return fCMAPMapper->unicodeToGlyph(ch); - } + // We really want to inherit this method from the superclass, but some compilers + // issue a warning if we don't implement it... + virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const; + + // We really want to inherit this method from the superclass, but some compilers + // issue a warning if we don't implement it... + virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const; + + virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const; virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const; virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const; - float getXPixelsPerEm() const - { - return fPointSize; - }; - - float getYPixelsPerEm() const - { - return fPointSize; - }; - - float getScaleFactorX() const - { - return 1.0; - } - - float getScaleFactorY() const - { - return 1.0; - } + float getXPixelsPerEm() const; + + float getYPixelsPerEm() const; + + float getScaleFactorX() const; + + float getScaleFactorY() const; }; diff --git a/Build/source/libs/icu-xetex/test/letest/SimpleFontInstance.cpp b/Build/source/libs/icu-xetex/test/letest/SimpleFontInstance.cpp new file mode 100644 index 00000000000..29543e3f4a0 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/letest/SimpleFontInstance.cpp @@ -0,0 +1,132 @@ +/* + ******************************************************************************* + * + * Copyright (C) 1999-2006, International Business Machines + * Corporation and others. All Rights Reserved. + * + ******************************************************************************* + * file name: SimpleFontInstance.cpp + * + * created on: 03/30/2006 + * created by: Eric R. Mader + */ + +#include "unicode/utypes.h" +#include "unicode/uchar.h" + +#include "layout/LETypes.h" +#include "layout/LEFontInstance.h" + +#include "CanonShaping.h" +#include "SimpleFontInstance.h" + +SimpleFontInstance::SimpleFontInstance(float pointSize, LEErrorCode &status) + : fPointSize(pointSize), fAscent(0), fDescent(0) +{ + if (LE_FAILURE(status)) { + return; + } + + fAscent = (le_int32) yUnitsToPoints(2000.0); + fDescent = (le_int32) yUnitsToPoints(600.0); + + return; +} + +SimpleFontInstance::~SimpleFontInstance() +{ + // nothing to do... +} + +const void *SimpleFontInstance::getFontTable(LETag tableTag) const +{ + if (tableTag == LE_GSUB_TABLE_TAG) { + return CanonShaping::glyphSubstitutionTable; + } + + if (tableTag == LE_GDEF_TABLE_TAG) { + return CanonShaping::glyphDefinitionTable; + } + + return NULL; +} + +void SimpleFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const +{ +#if 0 + if (u_getCombiningClass((UChar32) glyph) == 0) { + advance.fX = xUnitsToPoints(2048); + } else { + advance.fX = 0; + } +#else + advance.fX = xUnitsToPoints(2048); +#endif + + advance.fY = 0; +} + +le_int32 SimpleFontInstance::getUnitsPerEM() const +{ + return 2048; +} + +le_int32 SimpleFontInstance::getAscent() const +{ + return fAscent; +} + +le_int32 SimpleFontInstance::getDescent() const +{ + return fDescent; +} + +le_int32 SimpleFontInstance::getLeading() const +{ + return 0; +} + +// We really want to inherit this method from the superclass, but some compilers +// issue a warning if we don't implement it... +LEGlyphID SimpleFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const +{ + return LEFontInstance::mapCharToGlyph(ch, mapper, filterZeroWidth); +} + +// We really want to inherit this method from the superclass, but some compilers +// issue a warning if we don't implement it... +LEGlyphID SimpleFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const +{ + return LEFontInstance::mapCharToGlyph(ch, mapper); +} + +LEGlyphID SimpleFontInstance::mapCharToGlyph(LEUnicode32 ch) const +{ + return (LEGlyphID) ch; +} + +float SimpleFontInstance::getXPixelsPerEm() const +{ + return fPointSize; +} + +float SimpleFontInstance::getYPixelsPerEm() const +{ + return fPointSize; +} + +float SimpleFontInstance::getScaleFactorX() const +{ + return 1.0; +} + +float SimpleFontInstance::getScaleFactorY() const +{ + return 1.0; +} + +le_bool SimpleFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*pointNumber*/, LEPoint &/*point*/) const +{ + return FALSE; +} + diff --git a/Build/source/libs/icu-xetex/test/letest/SimpleFontInstance.h b/Build/source/libs/icu-xetex/test/letest/SimpleFontInstance.h new file mode 100644 index 00000000000..4bac8f8838b --- /dev/null +++ b/Build/source/libs/icu-xetex/test/letest/SimpleFontInstance.h @@ -0,0 +1,72 @@ + +/* + ******************************************************************************* + * + * Copyright (C) 1999-2006, International Business Machines + * Corporation and others. All Rights Reserved. + * + ******************************************************************************* + * file name: SimpleFontInstance.h + * + * created on: 03/30/2006 + * created by: Eric R. Mader + */ + +#ifndef __SIMPLEFONTINSTANCE_H +#define __SIMPLEFONTINSTANCE_H + +#include <stdio.h> + +#include "layout/LETypes.h" +#include "layout/LEFontInstance.h" + +class SimpleFontInstance : public LEFontInstance +{ +private: + float fPointSize; + le_int32 fAscent; + le_int32 fDescent; + +protected: + const void *readFontTable(LETag tableTag) const; + +public: + SimpleFontInstance(float pointSize, LEErrorCode &status); + + virtual ~SimpleFontInstance(); + + virtual const void *getFontTable(LETag tableTag) const; + + virtual le_int32 getUnitsPerEM() const; + + virtual le_int32 getAscent() const; + + virtual le_int32 getDescent() const; + + virtual le_int32 getLeading() const; + + // We really want to inherit this method from the superclass, but some compilers + // issue a warning if we don't implement it... + virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const; + + // We really want to inherit this method from the superclass, but some compilers + // issue a warning if we don't implement it... + virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const; + + virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const; + + virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const; + + virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const; + + float getXPixelsPerEm() const; + + float getYPixelsPerEm() const; + + float getScaleFactorX() const; + + float getScaleFactorY() const; + +}; + +#endif diff --git a/Build/source/libs/icu-xetex/test/letest/cmaps.h b/Build/source/libs/icu-xetex/test/letest/cmaps.h index 4b78ad66f26..df0bb116ba5 100644 --- a/Build/source/libs/icu-xetex/test/letest/cmaps.h +++ b/Build/source/libs/icu-xetex/test/letest/cmaps.h @@ -1,6 +1,6 @@ /*************************************************************************** * -* Copyright (C) 1998-2003, International Business Machines +* Copyright (C) 1998-2006, International Business Machines * Corporation and others. All Rights Reserved. * ************************************************************************/ @@ -9,7 +9,8 @@ #ifndef __CMAPS_H #define __CMAPS_H -#include "LETypes.h" +#include "layout/LETypes.h" +#include "letest.h" #include "sfnt.h" class CMAPMapper @@ -77,7 +78,7 @@ inline CMAPMapper::CMAPMapper(const CMAPTable *cmap) inline CMAPMapper::~CMAPMapper() { - LE_DELETE_ARRAY(fcmap); + DELETE_ARRAY(fcmap); } #endif diff --git a/Build/source/libs/icu-xetex/test/letest/gendata.cpp b/Build/source/libs/icu-xetex/test/letest/gendata.cpp index 0f32bc95930..58f8a1bb4a3 100644 --- a/Build/source/libs/icu-xetex/test/letest/gendata.cpp +++ b/Build/source/libs/icu-xetex/test/letest/gendata.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 1999-2005, International Business Machines + * Copyright (C) 1999-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -12,21 +12,27 @@ */ #include <stdio.h> -#include <ctype.h> +#include <string.h> #include <time.h> -#include "LETypes.h" -#include "LEScripts.h" -#include "LayoutEngine.h" +#include "unicode/utypes.h" +#include "unicode/unistr.h" +#include "unicode/uscript.h" +#include "unicode/ubidi.h" + +#include "layout/LETypes.h" +#include "layout/LEScripts.h" +#include "layout/LayoutEngine.h" -#include "sfnt.h" #include "PortableFontInstance.h" +#include "SimpleFontInstance.h" -#include "unicode/uscript.h" +#include "xmlparser.h" -U_NAMESPACE_USE +#include "letsutil.h" +#include "letest.h" -#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0]) +U_NAMESPACE_USE struct TestInput { @@ -41,264 +47,31 @@ struct TestInput * FIXME: should use the output file name and the current date. */ const char *header = - "/*\n" - " *******************************************************************************\n" - " *\n" - " * Copyright (C) 1999-%4.4d, International Business Machines\n" - " * Corporation and others. All Rights Reserved.\n" - " *\n" - " * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT\n" - " * UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.\n" - " *\n" - " *******************************************************************************\n" - " *\n" - " * file name: testdata.cpp\n" - " * generated on: %s\n" - " * generated by: gendata.cpp\n" - " */\n" + "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "\n" - "#include \"LETypes.h\"\n" - "#include \"LEScripts.h\"\n" - "#include \"letest.h\"\n" - "\n"; - -#if 0 -char *scriptNames[] = -{ - "USCRIPT_COMMON", /* Zyyy */ - "USCRIPT_INHERITED", /* Qaai */ - "USCRIPT_ARABIC", /* Arab */ - "USCRIPT_ARMENIAN", /* Armn */ - "USCRIPT_BENGALI", /* Beng */ - "USCRIPT_BOPOMOFO", /* Bopo */ - "USCRIPT_CHEROKEE", /* Cher */ - "USCRIPT_COPTIC", /* Copt=Qaac */ - "USCRIPT_CYRILLIC", /* Cyrl (Cyrs) */ - "USCRIPT_DESERET", /* Dsrt */ - "USCRIPT_DEVANAGARI", /* Deva */ - "USCRIPT_ETHIOPIC", /* Ethi */ - "USCRIPT_GEORGIAN", /* Geor (Geon, Geoa) */ - "USCRIPT_GOTHIC", /* Goth */ - "USCRIPT_GREEK", /* Grek */ - "USCRIPT_GUJARATI", /* Gujr */ - "USCRIPT_GURMUKHI", /* Guru */ - "USCRIPT_HAN", /* Hani */ - "USCRIPT_HANGUL", /* Hang */ - "USCRIPT_HEBREW", /* Hebr */ - "USCRIPT_HIRAGANA", /* Hira */ - "USCRIPT_KANNADA", /* Knda */ - "USCRIPT_KATAKANA", /* Kana */ - "USCRIPT_KHMER", /* Khmr */ - "USCRIPT_LAO", /* Laoo */ - "USCRIPT_LATIN", /* Latn (Latf, Latg) */ - "USCRIPT_MALAYALAM", /* Mlym */ - "USCRIPT_MONGOLIAN", /* Mong */ - "USCRIPT_MYANMAR", /* Mymr */ - "USCRIPT_OGHAM", /* Ogam */ - "USCRIPT_OLD_ITALIC", /* Ital */ - "USCRIPT_ORIYA", /* Orya */ - "USCRIPT_RUNIC", /* Runr */ - "USCRIPT_SINHALA", /* Sinh */ - "USCRIPT_SYRIAC", /* Syrc (Syrj, Syrn, Syre) */ - "USCRIPT_TAMIL", /* Taml */ - "USCRIPT_TELUGU", /* Telu */ - "USCRIPT_THAANA", /* Thaa */ - "USCRIPT_THAI", /* Thai */ - "USCRIPT_TIBETAN", /* Tibt */ - "USCRIPT_UCAS", /* Cans */ - "USCRIPT_YI", /* Yiii */ - "USCRIPT_TAGALOG", /* Tglg */ - "USCRIPT_HANUNOO", /* Hano */ - "USCRIPT_BUHID", /* Buhd */ - "USCRIPT_TAGBANWA" /* Tagb */ -}; -#endif - -LEUnicode devaText[] = -{ - 0x0936, 0x094d, 0x0930, 0x0940, 0x092e, 0x0926, 0x094d, 0x0020, - 0x092d, 0x0917, 0x0935, 0x0926, 0x094d, 0x0917, 0x0940, 0x0924, - 0x093e, 0x0020, 0x0905, 0x0927, 0x094d, 0x092f, 0x093e, 0x092f, - 0x0020, 0x0905, 0x0930, 0x094d, 0x091c, 0x0941, 0x0928, 0x0020, - 0x0935, 0x093f, 0x0937, 0x093e, 0x0926, 0x0020, 0x092f, 0x094b, - 0x0917, 0x0020, 0x0927, 0x0943, 0x0924, 0x0930, 0x093e, 0x0937, - 0x094d, 0x091f, 0x094d, 0x0930, 0x0020, 0x0909, 0x0935, 0x093E, - 0x091A, 0x0943, 0x0020, 0x0927, 0x0930, 0x094d, 0x092e, 0x0915, - 0x094d, 0x0937, 0x0947, 0x0924, 0x094d, 0x0930, 0x0947, 0x0020, - 0x0915, 0x0941, 0x0930, 0x0941, 0x0915, 0x094d, 0x0937, 0x0947, - 0x0924, 0x094d, 0x0930, 0x0947, 0x0020, 0x0938, 0x092e, 0x0935, - 0x0947, 0x0924, 0x093e, 0x0020, 0x092f, 0x0941, 0x092f, 0x0941, - 0x0924, 0x094d, 0x0938, 0x0935, 0x0903, 0x0020, 0x092e, 0x093e, - 0x092e, 0x0915, 0x093e, 0x0903, 0x0020, 0x092a, 0x093e, 0x0923, - 0x094d, 0x0921, 0x0935, 0x093e, 0x0936, 0x094d, 0x091a, 0x0948, - 0x0935, 0x0020, 0x0915, 0x093f, 0x092e, 0x0915, 0x0941, 0x0930, - 0x094d, 0x0935, 0x0924, 0x0020, 0x0938, 0x0902, 0x091c, 0x0935 -}; - -le_int32 devaTextLength = ARRAY_LENGTH(devaText); - -LEUnicode arabText[] = -{ - 0x0623, 0x0633, 0x0627, 0x0633, 0x064B, 0x0627, 0x060C, 0x0020, - 0x062A, 0x062A, 0x0639, 0x0627, 0x0645, 0x0644, 0x0020, - 0x0627, 0x0644, 0x062D, 0x0648, 0x0627, 0x0633, 0x064A, 0x0628, - 0x0020, 0x0641, 0x0642, 0x0637, 0x0020, 0x0645, 0x0639, 0x0020, - 0x0627, 0x0644, 0x0623, 0x0631, 0x0642, 0x0627, 0x0645, 0x060C, - 0x0020, 0x0648, 0x062A, 0x0642, 0x0648, 0x0645, 0x0020, 0x0628, - 0x062A, 0x062E, 0x0632, 0x064A, 0x0646, 0x0020, 0x0627, 0x0644, - 0x0623, 0x062D, 0x0631, 0x0641, 0x0020, 0x0648, 0x0627, 0x0644, - 0x0645, 0x062D, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, - 0x0623, 0x062E, 0x0631, 0x0649, 0x0020, 0x0628, 0x0639, 0x062F, - 0x0020, 0x0623, 0x0646, 0x0020, 0x062A, 0x064F, 0x0639, 0x0637, - 0x064A, 0x0020, 0x0631, 0x0642, 0x0645, 0x0627, 0x0020, 0x0645, - 0x0639, 0x064A, 0x0646, 0x0627, 0x0020, 0x0644, 0x0643, 0x0644, - 0x0020, 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x0645, 0x0646, - 0x0647, 0x0627, 0x002E, 0x0020, 0x0648, 0x0642, 0x0628, 0x0644, - 0x0020, 0x0627, 0x062E, 0x062A, 0x0631, 0x0627, 0x0639, 0x0020, - 0x0022, 0x064A, 0x0648, 0x0646, 0x0650, 0x0643, 0x0648, 0x062F, - 0x0022, 0x060C, 0x0020, 0x0643, 0x0627, 0x0646, 0x0020, 0x0647, - 0x0646, 0x0627, 0x0643, 0x0020, 0x0645, 0x0626, 0x0627, 0x062A, - 0x0020, 0x0627, 0x0644, 0x0623, 0x0646, 0x0638, 0x0645, 0x0629, - 0x0020, 0x0644, 0x0644, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, - 0x0020, 0x0648, 0x062A, 0x062E, 0x0635, 0x064A, 0x0635, 0x0020, - 0x0647, 0x0630, 0x0647, 0x0020, 0x0627, 0x0644, 0x0623, 0x0631, - 0x0642, 0x0627, 0x0645, 0x0020, 0x0644, 0x0644, 0x0645, 0x062D, - 0x0627, 0x0631, 0x0641, 0x060C, 0x0020, 0x0648, 0x0644, 0x0645, - 0x0020, 0x064A, 0x0648, 0x062C, 0x062F, 0x0020, 0x0646, 0x0638, - 0x0627, 0x0645, 0x0020, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, - 0x0020, 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x064A, 0x062D, - 0x062A, 0x0648, 0x064A, 0x0020, 0x0639, 0x0644, 0x0649, 0x0020, - 0x062C, 0x0645, 0x064A, 0x0639, 0x0020, 0x0627, 0x0644, 0x0645, - 0x062D, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0636, - 0x0631, 0x0648, 0x0631, 0x064A, 0x0629 - - /* The next few sentences... - 0x002E, 0x0020, 0x0648, - 0x0639, 0x0644, 0x0649, 0x0020, 0x0633, 0x0628, 0x064A, 0x0644, - 0x0020, 0x0627, 0x0644, 0x0645, 0x062B, 0x0627, 0x0644, 0x060C, - 0x0020, 0x0641, 0x0625, 0x0646, 0x0020, 0x0627, 0x0644, 0x0627, - 0x062A, 0x062D, 0x0627, 0x062F, 0x0020, 0x0627, 0x0644, 0x0623, - 0x0648, 0x0631, 0x0648, 0x0628, 0x064A, 0x0020, 0x0644, 0x0648, - 0x062D, 0x062F, 0x0647, 0x060C, 0x0020, 0x0627, 0x062D, 0x062A, - 0x0648, 0x0649, 0x0020, 0x0627, 0x0644, 0x0639, 0x062F, 0x064A, - 0x062F, 0x0020, 0x0645, 0x0646, 0x0020, 0x0627, 0x0644, 0x0634, - 0x0641, 0x0631, 0x0627, 0x062A, 0x0020, 0x0627, 0x0644, 0x0645, - 0x062E, 0x062A, 0x0644, 0x0641, 0x0629, 0x0020, 0x0644, 0x064A, - 0x063A, 0x0637, 0x064A, 0x0020, 0x062C, 0x0645, 0x064A, 0x0639, - 0x0020, 0x0627, 0x0644, 0x0644, 0x063A, 0x0627, 0x062A, 0x0020, - 0x0627, 0x0644, 0x0645, 0x0633, 0x062A, 0x062E, 0x062F, 0x0645, - 0x0629, 0x0020, 0x0641, 0x064A, 0x0020, 0x0627, 0x0644, 0x0627, - 0x062A, 0x062D, 0x0627, 0x062F, 0x002E, 0x0020, 0x0648, 0x062D, - 0x062A, 0x0649, 0x0020, 0x0644, 0x0648, 0x0020, 0x0627, 0x0639, - 0x062A, 0x0628, 0x0631, 0x0646, 0x0627, 0x0020, 0x0644, 0x063A, - 0x0629, 0x0020, 0x0648, 0x0627, 0x062D, 0x062F, 0x0629, 0x060C, - 0x0020, 0x0643, 0x0627, 0x0644, 0x0644, 0x063A, 0x0629, 0x0020, - 0x0627, 0x0644, 0x0625, 0x0646, 0x062C, 0x0644, 0x064A, 0x0632, - 0x064A, 0x0629, 0x060C, 0x0020, 0x0641, 0x0625, 0x0646, 0x0020, - 0x062C, 0x062F, 0x0648, 0x0644, 0x0020, 0x0634, 0x0641, 0x0631, - 0x0629, 0x0020, 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x0644, - 0x0645, 0x0020, 0x064A, 0x0643, 0x0641, 0x0020, 0x0644, 0x0627, - 0x0633, 0x062A, 0x064A, 0x0639, 0x0627, 0x0628, 0x0020, 0x062C, - 0x0645, 0x064A, 0x0639, 0x0020, 0x0627, 0x0644, 0x0623, 0x062D, - 0x0631, 0x0641, 0x0020, 0x0648, 0x0639, 0x0644, 0x0627, 0x0645, - 0x0627, 0x062A, 0x0020, 0x0627, 0x0644, 0x062A, 0x0631, 0x0642, - 0x064A, 0x0645, 0x0020, 0x0648, 0x0627, 0x0644, 0x0631, 0x0645, - 0x0648, 0x0632, 0x0020, 0x0627, 0x0644, 0x0641, 0x0646, 0x064A, - 0x0629, 0x0020, 0x0648, 0x0627, 0x0644, 0x0639, 0x0644, 0x0645, - 0x064A, 0x0629, 0x0020, 0x0627, 0x0644, 0x0634, 0x0627, 0x0626, - 0x0639, 0x0629, 0x0020, 0x0627, 0x0644, 0x0627, 0x0633, 0x062A, - 0x0639, 0x0645, 0x0627, 0x0644, 0x002E */ -}; -le_int32 arabTextLength = ARRAY_LENGTH(arabText); - - -LEUnicode thaiSample[] = -{ - 0x0E1A, 0x0E17, 0x0E17, 0x0E35, 0x0E48, 0x0E51, 0x0E1E, 0x0E32, - 0x0E22, 0x0E38, 0x0E44, 0x0E0B, 0x0E42, 0x0E04, 0x0E25, 0x0E19, - 0x0E42, 0x0E14, 0x0E42, 0x0E23, 0x0E18, 0x0E35, 0x0E2D, 0x0E32, - 0x0E28, 0x0E31, 0x0E22, 0x0E2D, 0x0E22, 0x0E39, 0x0E48, 0x0E17, - 0x0E48, 0x0E32, 0x0E21, 0x0E01, 0x0E25, 0x0E32, 0x0E07, 0x0E17, - 0x0E38, 0x0E48, 0x0E07, 0x0E43, 0x0E2B, 0x0E0D, 0x0E48, 0x0E43, - 0x0E19, 0x0E41, 0x0E04, 0x0E19, 0x0E0B, 0x0E31, 0x0E2A, 0x0E01, - 0x0E31, 0x0E1A, 0x0E25, 0x0E38, 0x0E07, 0x0E40, 0x0E2E, 0x0E19, - 0x0E23, 0x0E35, 0x0E0A, 0x0E32, 0x0E27, 0x0E44, 0x0E23, 0x0E48, - 0x0E41, 0x0E25, 0x0E30, 0x0E1B, 0x0E49, 0x0E32, 0x0E40, 0x0E2D, - 0x0E47, 0x0E21, 0x0E20, 0x0E23, 0x0E23, 0x0E22, 0x0E32, 0x0E0A, - 0x0E32, 0x0E27, 0x0E44, 0x0E23, 0x0E48, 0x0E1A, 0x0E49, 0x0E32, - 0x0E19, 0x0E02, 0x0E2D, 0x0E07, 0x0E1E, 0x0E27, 0x0E01, 0x0E40, - 0x0E02, 0x0E32, 0x0E2B, 0x0E25, 0x0E31, 0x0E07, 0x0E40, 0x0E25, - 0x0E47, 0x0E01, 0x0E40, 0x0E1E, 0x0E23, 0x0E32, 0x0E30, 0x0E44, - 0x0E21, 0x0E49, 0x0E2A, 0x0E23, 0x0E49, 0x0E32, 0x0E07, 0x0E1A, - 0x0E49, 0x0E32, 0x0E19, 0x0E15, 0x0E49, 0x0E2D, 0x0E07, 0x0E02, - 0x0E19, 0x0E21, 0x0E32, 0x0E14, 0x0E49, 0x0E27, 0x0E22, 0x0E40, - 0x0E01, 0x0E27, 0x0E35, 0x0E22, 0x0E19, 0x0E40, 0x0E1B, 0x0E47, - 0x0E19, 0x0E23, 0x0E30, 0x0E22, 0x0E30, 0x0E17, 0x0E32, 0x0E07, - 0x0E2B, 0x0E25, 0x0E32, 0x0E22, 0x0E44, 0x0E21, 0x0E25, 0x0E4C - /* A few more lines... - 0x0E1A, 0x0E49, 0x0E32, 0x0E19, 0x0E21, 0x0E35, 0x0E2A, 0x0E35, - 0x0E48, 0x0E1D, 0x0E32, 0x0E21, 0x0E35, 0x0E1E, 0x0E37, 0x0E49, - 0x0E19, 0x0E01, 0x0E31, 0x0E1A, 0x0E2B, 0x0E25, 0x0E31, 0x0E07, - 0x0E04, 0x0E32, 0x0E23, 0x0E27, 0x0E21, 0x0E17, 0x0E33, 0x0E40, - 0x0E1B, 0x0E47, 0x0E19, 0x0E2B, 0x0E49, 0x0E2D, 0x0E07, 0x0E40, - 0x0E14, 0x0E35, 0x0E22, 0x0E27, 0x0E43, 0x0E19, 0x0E2B, 0x0E49, - 0x0E2D, 0x0E07, 0x0E21, 0x0E35, 0x0E17, 0x0E31, 0x0E49, 0x0E07, - 0x0E40, 0x0E15, 0x0E32, 0x0E2B, 0x0E38, 0x0E07, 0x0E15, 0x0E49, - 0x0E21, 0x0E17, 0x0E35, 0x0E48, 0x0E2A, 0x0E19, 0x0E34, 0x0E21, - 0x0E14, 0x0E39, 0x0E02, 0x0E36, 0x0E49, 0x0E19, 0x0E40, 0x0E25, - 0x0E2D, 0x0E30, 0x0E21, 0x0E35, 0x0E15, 0x0E39, 0x0E49, 0x0E43, - 0x0E2A, 0x0E48, 0x0E16, 0x0E49, 0x0E27, 0x0E22, 0x0E0A, 0x0E32, - 0x0E21, 0x0E42, 0x0E15, 0x0E4A, 0x0E30, 0x0E40, 0x0E01, 0x0E49, - 0x0E32, 0x0E2D, 0x0E35, 0x0E49, 0x0E2A, 0x0E32, 0x0E21, 0x0E2B, - 0x0E23 - */ -}; - -le_int32 thaiSampleLength = ARRAY_LENGTH(thaiSample); - -TestInput testInputs[] = { - {"raghu.ttf", devaText, devaTextLength, devaScriptCode, FALSE}, - {"CODE2000.TTF", arabText, arabTextLength, arabScriptCode, TRUE}, - {"LucidaSansRegular.ttf", arabText, arabTextLength, arabScriptCode, TRUE}, - {"angsd___.ttf", thaiSample, thaiSampleLength, thaiScriptCode, FALSE} -}; - -#define TEST_COUNT ARRAY_LENGTH(testInputs) - -le_int32 testCount = TEST_COUNT; - -void dumpShorts(FILE *file, const char *label, le_int32 id, le_uint16 *shorts, le_int32 count) { - char lineBuffer[8 * 8 + 2]; - le_int32 bufp = 0; - - fprintf(file, label, id); - - for (int i = 0; i < count; i += 1) { - if (i % 8 == 0 && bufp != 0) { - fprintf(file, " %s\n", lineBuffer); - bufp = 0; - } - - bufp += sprintf(&lineBuffer[bufp], "0x%4.4X, ", shorts[i]); - } - - if (bufp != 0) { - lineBuffer[bufp - 2] = '\0'; - fprintf(file, " %s\n", lineBuffer); - } - - fprintf(file, "};\n\n"); -} + "<!--\n" + " Copyright (c) 1999-%4.4d International Business Machines\n" + " Corporation and others. All rights reserved.\n" + "\n" + " WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT\n" + " UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.\n" + "\n" + " file name: letest.xml\n" + " generated on: %s\n" + " generated by: gendata.cpp\n" + "-->\n" + "\n" + "<layout-tests>\n"; -void dumpLongs(FILE *file, const char *label, le_int32 id, le_int32 *longs, le_int32 count) { +void dumpLongs(FILE *file, const char *tag, le_int32 *longs, le_int32 count) { char lineBuffer[8 * 12 + 2]; le_int32 bufp = 0; - fprintf(file, label, id); + fprintf(file, " <%s>\n", tag); for (int i = 0; i < count; i += 1) { if (i % 8 == 0 && bufp != 0) { - fprintf(file, " %s\n", lineBuffer); + fprintf(file, " %s\n", lineBuffer); bufp = 0; } @@ -307,52 +80,38 @@ void dumpLongs(FILE *file, const char *label, le_int32 id, le_int32 *longs, le_i if (bufp != 0) { lineBuffer[bufp - 2] = '\0'; - fprintf(file, " %s\n", lineBuffer); + fprintf(file, " %s\n", lineBuffer); } - fprintf(file, "};\n\n"); + fprintf(file, " </%s>\n\n", tag); } -void dumpFloats(FILE *file, const char *label, le_int32 id, float *floats, le_int32 count) { +void dumpFloats(FILE *file, const char *tag, float *floats, le_int32 count) { char lineBuffer[8 * 16 + 2]; le_int32 bufp = 0; - fprintf(file, label, id); + fprintf(file, " <%s>\n", tag); for (int i = 0; i < count; i += 1) { if (i % 8 == 0 && bufp != 0) { - fprintf(file, " %s\n", lineBuffer); + fprintf(file, " %s\n", lineBuffer); bufp = 0; } - bufp += sprintf(&lineBuffer[bufp], "%fF, ", floats[i]); + bufp += sprintf(&lineBuffer[bufp], "%f, ", floats[i]); } if (bufp != 0) { lineBuffer[bufp - 2] = '\0'; - fprintf(file, " %s\n", lineBuffer); + fprintf(file, " %s\n", lineBuffer); } - fprintf(file, "};\n\n"); -} - -const char *getShortName(le_int32 scriptCode) -{ - static char shortName[5]; - const char *name = uscript_getShortName((UScriptCode) scriptCode); - - shortName[0] = tolower(name[0]); - shortName[1] = tolower(name[1]); - shortName[2] = tolower(name[2]); - shortName[3] = tolower(name[3]); - shortName[4] = '\0'; - - return shortName; + fprintf(file, " </%s>\n", tag); } int main(int /*argc*/, char *argv[]) { - le_int32 test; + UErrorCode status = U_ZERO_ERROR; FILE *outputFile = fopen(argv[1], "w"); time_t now = time(NULL); struct tm *local = localtime(&now); @@ -362,81 +121,162 @@ int main(int /*argc*/, char *argv[]) strftime(tmString, 64, tmFormat, local); fprintf(outputFile, header, local->tm_year + 1900, tmString); - for (test = 0; test < testCount; test += 1) { - LEErrorCode fontStatus = LE_NO_ERROR; - PortableFontInstance fontInstance(testInputs[test].fontName, 12, fontStatus); - - if (LE_FAILURE(fontStatus)) { - printf("ERROR: test case %d, could not get a font instance for %s\n", test, testInputs[test].fontName); - continue; - } + UXMLParser *parser = UXMLParser::createParser(status); + UXMLElement *root = parser->parseFile("gendata.xml", status); - const char *nameString = fontInstance.getNameString(NAME_VERSION_STRING, PLATFORM_MACINTOSH, MACINTOSH_ROMAN, MACINTOSH_ENGLISH); + if (root == NULL) { + printf("Error: Could not open gendata.xml\n"); + delete parser; + return -1; + } - fprintf(outputFile, "const char *fontVersionString%d = \"%s\";\n", test, nameString); - fprintf(outputFile, "le_uint32 fontChecksum%d = 0x%8.8X;\n\n", test, fontInstance.getFontChecksum()); + UnicodeString test_case = UNICODE_STRING_SIMPLE("test-case"); + UnicodeString test_text = UNICODE_STRING_SIMPLE("test-text"); + UnicodeString test_font = UNICODE_STRING_SIMPLE("test-font"); + + // test-case attributes + UnicodeString id_attr = UNICODE_STRING_SIMPLE("id"); + UnicodeString script_attr = UNICODE_STRING_SIMPLE("script"); + UnicodeString lang_attr = UNICODE_STRING_SIMPLE("lang"); + + // test-font attributes + UnicodeString name_attr = UNICODE_STRING_SIMPLE("name"); + + const UXMLElement *testCase; + int32_t tc = 0; + + while((testCase = root->nextChildElement(tc)) != NULL) { + if (testCase->getTagName().compare(test_case) == 0) { + char *id = getCString(testCase->getAttribute(id_attr)); + char *script = getCString(testCase->getAttribute(script_attr)); + char *lang = getCString(testCase->getAttribute(lang_attr)); + LEFontInstance *font = NULL; + const UXMLElement *element; + int32_t ec = 0; + int32_t charCount = 0; + int32_t typoFlags = 3; // kerning + ligatures... + UScriptCode scriptCode; + le_int32 languageCode = -1; + UnicodeString text; + int32_t glyphCount = 0; + LEErrorCode leStatus = LE_NO_ERROR; + LayoutEngine *engine = NULL; + LEGlyphID *glyphs = NULL; + le_int32 *indices = NULL; + float *positions = NULL; + + uscript_getCode(script, &scriptCode, 1, &status); + if (LE_FAILURE(status)) { + printf("Error: invalid script name: %s.\n", script); + goto free_c_strings; + } + + if (lang != NULL) { + languageCode = getLanguageCode(lang); + + if (languageCode < 0) { + printf("Error: invalid language name: %s.\n", lang); + goto free_c_strings; + } + + fprintf(outputFile, " <test-case id=\"%s\" script=\"%s\" lang=\"%s\">\n", id, script, lang); + } else { + fprintf(outputFile, " <test-case id=\"%s\" script=\"%s\">\n", id, script); + } + + while((element = testCase->nextChildElement(ec)) != NULL) { + UnicodeString tag = element->getTagName(); + + // TODO: make sure that each element is only used once. + if (tag.compare(test_font) == 0) { + char *fontName = getCString(element->getAttribute(name_attr)); + const char *version = NULL; + PortableFontInstance *pfi = new PortableFontInstance(fontName, 12, leStatus); + + if (LE_FAILURE(leStatus)) { + printf("Error: could not open font: %s\n", fontName); + freeCString(fontName); + goto free_c_strings; + } + + version = pfi->getNameString(NAME_VERSION_STRING, PLATFORM_MACINTOSH, MACINTOSH_ROMAN, MACINTOSH_ENGLISH); + + fprintf(outputFile, " <test-font name=\"%s\" version=\"%s\" checksum=\"0x%8.8X\"/>\n\n", + fontName, version, pfi->getFontChecksum()); + + pfi->deleteNameString(version); + freeCString(fontName); + font = pfi; + } else if (tag.compare(test_text) == 0) { + char *utf8 = NULL; + + text = element->getText(TRUE); + charCount = text.length(); + + utf8 = getUTF8String(&text); + fprintf(outputFile, " <test-text>%s</test-text>\n\n", utf8); + freeCString(utf8); + } else { + // an unknown tag... + char *cTag = getCString(&tag); + + printf("Test %s: unknown element with tag \"%s\"\n", id, cTag); + freeCString(cTag); + } + } + + if (font == NULL) { + LEErrorCode fontStatus = LE_NO_ERROR; + + font = new SimpleFontInstance(12, fontStatus); + typoFlags |= 0x80000000L; // use CharSubstitutionFilter... + } + + engine = LayoutEngine::layoutEngineFactory(font, scriptCode, languageCode, typoFlags, leStatus); + + if (LE_FAILURE(leStatus)) { + printf("Error for test %s: could not create a LayoutEngine.\n", id); + goto delete_font; + } + + glyphCount = engine->layoutChars(text.getBuffer(), 0, charCount, charCount, getRTL(text), 0, 0, leStatus); + + glyphs = NEW_ARRAY(LEGlyphID, glyphCount); + indices = NEW_ARRAY(le_int32, glyphCount); + positions = NEW_ARRAY(float, glyphCount * 2 + 2); + + engine->getGlyphs(glyphs, leStatus); + engine->getCharIndices(indices, leStatus); + engine->getGlyphPositions(positions, leStatus); + + dumpLongs(outputFile, "result-glyphs", (le_int32 *) glyphs, glyphCount); + + dumpLongs(outputFile, "result-indices", indices, glyphCount); + + dumpFloats(outputFile, "result-positions", positions, glyphCount * 2 + 2); + + fprintf(outputFile, " </test-case>\n\n"); + + DELETE_ARRAY(positions); + DELETE_ARRAY(indices); + DELETE_ARRAY(glyphs); - fontInstance.deleteNameString(nameString); + delete engine; - LEErrorCode success = LE_NO_ERROR; - LayoutEngine *engine = LayoutEngine::layoutEngineFactory(&fontInstance, testInputs[test].scriptCode, -1, success); - le_uint32 glyphCount; - LEGlyphID *glyphs; - le_int32 *indices; - float *positions; +delete_font: + delete font; - if (LE_FAILURE(success)) { - printf("ERROR: test case %d, could not create a LayoutEngine for script %s.\n", test, uscript_getName((UScriptCode) testInputs[test].scriptCode)); - continue; +free_c_strings: + freeCString(lang); + freeCString(script); + freeCString(id); } - - glyphCount = engine->layoutChars(testInputs[test].text, 0, testInputs[test].textLength, testInputs[test].textLength, testInputs[test].rightToLeft, 0, 0, success); - - glyphs = new LEGlyphID[glyphCount]; - indices = new le_int32[glyphCount]; - positions = new float[glyphCount * 2 + 2]; - - engine->getGlyphs(glyphs, success); - engine->getCharIndices(indices, success); - engine->getGlyphPositions(positions, success); - - //fprintf(outputFile, "font: %s\n", testInputs[test].fontName); - dumpShorts(outputFile, "LEUnicode inputText%d[] =\n{\n", test, testInputs[test].text, testInputs[test].textLength); - - dumpLongs(outputFile, "LEGlyphID resultGlyphs%d[] =\n{\n", test, (le_int32 *) glyphs, glyphCount); - fprintf(outputFile, "le_int32 resultGlyphCount%d = %d;\n\n", test, glyphCount); - - dumpLongs(outputFile, "le_int32 resultIndices%d[] =\n{\n", test, indices, glyphCount); - - dumpFloats(outputFile, "float resultPositions%d[] =\n{\n", test, positions, glyphCount * 2 + 2); - - fprintf(outputFile, "\n"); - - delete[] positions; - delete[] indices; - delete[] glyphs; - delete engine; - } - - fprintf(outputFile, "TestInput testInputs[] = \n{\n"); - - for (test = 0; test < testCount; test += 1) { - fprintf(outputFile, " {\"%s\", fontVersionString%d, fontChecksum%d, inputText%d, %d, %sScriptCode, %s},\n", - testInputs[test].fontName, test, test, test, testInputs[test].textLength, getShortName(testInputs[test].scriptCode), - testInputs[test].rightToLeft? "TRUE" : "FALSE"); } - fprintf(outputFile, "};\n\nle_int32 testCount = ARRAY_LENGTH(testInputs);\n\n"); - - fprintf(outputFile, "TestResult testResults[] = \n{\n"); - - for (test = 0; test < testCount; test += 1) { - fprintf(outputFile, " {resultGlyphCount%d, resultGlyphs%d, resultIndices%d, resultPositions%d},\n", - test, test, test, test); - } + delete root; + delete parser; - fprintf(outputFile, "};\n\n"); + fprintf(outputFile, "</layout-tests>\n"); fclose(outputFile); - return 0; } diff --git a/Build/source/libs/icu-xetex/test/letest/gendata.vcproj b/Build/source/libs/icu-xetex/test/letest/gendata.vcproj index 53196d82258..05827c4bc9e 100644 --- a/Build/source/libs/icu-xetex/test/letest/gendata.vcproj +++ b/Build/source/libs/icu-xetex/test/letest/gendata.vcproj @@ -21,10 +21,11 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\..\include\layout,..\..\..\include,..\..\common" + AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\layout;..\..\tools\toolutil" PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,LE_USE_CMEMORY" BasicRuntimeChecks="3" RuntimeLibrary="5" + TreatWChar_tAsBuiltInType="TRUE" UsePrecompiledHeader="2" PrecompiledHeaderFile=".\Debug/gendata.pch" AssemblerListingLocation=".\Debug/" @@ -39,7 +40,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="..\..\..\lib\iculed.lib ..\..\..\lib\icuucd.lib odbc32.lib odbccp32.lib" + AdditionalDependencies="..\..\..\lib\iculed.lib ..\..\..\lib\icuucd.lib ..\..\..\lib\icutud.lib odbc32.lib odbccp32.lib" OutputFile=".\Debug/gendata.exe" LinkIncremental="2" SuppressStartupBanner="TRUE" @@ -81,11 +82,12 @@ <Tool Name="VCCLCompilerTool" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\include\layout,..\..\..\include,..\..\common" + AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\layout;..\..\tools\toolutil" PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,LE_USE_CMEMORY" StringPooling="TRUE" RuntimeLibrary="4" EnableFunctionLevelLinking="TRUE" + TreatWChar_tAsBuiltInType="TRUE" UsePrecompiledHeader="2" PrecompiledHeaderFile=".\Release/gendata.pch" AssemblerListingLocation=".\Release/" @@ -99,7 +101,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="..\..\..\lib\icule.lib ..\..\..\lib\icuuc.lib odbc32.lib odbccp32.lib" + AdditionalDependencies="..\..\..\lib\icule.lib ..\..\..\lib\icuuc.lib ..\..\..\lib\icutu.lib odbc32.lib odbccp32.lib" OutputFile=".\Release/gendata.exe" LinkIncremental="1" SuppressStartupBanner="TRUE" @@ -146,8 +148,14 @@ RelativePath=".\gendata.cpp"> </File> <File + RelativePath=".\letsutil.cpp"> + </File> + <File RelativePath=".\PortableFontInstance.cpp"> </File> + <File + RelativePath=".\SimpleFontInstance.cpp"> + </File> </Filter> <Filter Name="Header Files" @@ -162,11 +170,17 @@ RelativePath=".\letest.h"> </File> <File + RelativePath=".\letsutil.h"> + </File> + <File RelativePath=".\PortableFontInstance.h"> </File> <File RelativePath=".\sfnt.h"> </File> + <File + RelativePath=".\SimpleFontInstance.h"> + </File> </Filter> <Filter Name="Resource Files" diff --git a/Build/source/libs/icu-xetex/test/letest/gendata.xml b/Build/source/libs/icu-xetex/test/letest/gendata.xml new file mode 100644 index 00000000000..b6edfd9c61c --- /dev/null +++ b/Build/source/libs/icu-xetex/test/letest/gendata.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Copyright (c) 1999-2006 International Business Machines + Corporation and others. All rights reserved. +--> + +<layout-tests> + <test-case id="Ghita" script="deva"> + <test-font name="raghu.ttf"/> + <test-text>शà¥à¤°à¥€à¤®à¤¦à¥ à¤à¤—वदà¥à¤—ीता अधà¥à¤¯à¤¾à¤¯ अरà¥à¤œà¥à¤¨ विषाद योग धृतराषà¥à¤Ÿà¥à¤° उवाचृ धरà¥à¤®à¤•à¥à¤·à¥‡à¤¤à¥à¤°à¥‡ कà¥à¤°à¥à¤•à¥à¤·à¥‡à¤¤à¥à¤°à¥‡ समवेता यà¥à¤¯à¥à¤¤à¥à¤¸à¤µà¤ƒ मामकाः पाणà¥à¤¡à¤µà¤¾à¤¶à¥à¤šà¥ˆà¤µ किमकà¥à¤°à¥à¤µà¤¤ संजव</test-text> + </test-case> + + <test-case id="Arabic" script="arab"> + <test-font name="CODE2000.TTF"/> + <test-text>أساسًا، تتعامل الØواسيب Ùقط مع الأرقام، وتقوم بتخزين الأØر٠والمØار٠الأخرى بعد أن تÙعطي رقما معينا لكل واØد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمØارÙØŒ ولم يوجد نظام تشÙير واØد ÙŠØتوي على جميع المØار٠الضرورية</test-text> + </test-case> + + <test-case id="Unicode Arabic" script="arab"> + <test-font name="LucidaSansRegular.ttf"/> + <test-text>أساسًا، تتعامل الØواسيب Ùقط مع الأرقام، وتقوم بتخزين الأØر٠والمØار٠الأخرى بعد أن تÙعطي رقما معينا لكل واØد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمØارÙØŒ ولم يوجد نظام تشÙير واØد ÙŠØتوي على جميع المØار٠الضرورية</test-text> + </test-case> + + <test-case id="Thai" script="thai"> + <test-font name="angsd___.ttf"/> + <test-text>บทที่๑พายุไซโคลนโดโรธีà¸à¸²à¸¨à¸±à¸¢à¸à¸¢à¸¹à¹ˆà¸—่ามà¸à¸¥à¸²à¸‡à¸—ุ่งใหà¸à¹ˆà¹ƒà¸™à¹à¸„นซัสà¸à¸±à¸šà¸¥à¸¸à¸‡à¹€à¸®à¸™à¸£à¸µà¸Šà¸²à¸§à¹„ร่à¹à¸¥à¸°à¸›à¹‰à¸²à¹€à¸à¹‡à¸¡à¸ รรยาชาวไร่บ้านขà¸à¸‡à¸žà¸§à¸à¹€à¸‚าหลังเล็à¸à¹€à¸žà¸£à¸²à¸°à¹„ม้สร้างบ้านต้à¸à¸‡à¸‚นมาด้วยเà¸à¸§à¸µà¸¢à¸™à¹€à¸›à¹‡à¸™à¸£à¸°à¸¢à¸°à¸—างหลายไมล์</test-text> + </test-case> + + <test-case id="Arabic Simple" script="arab"> + <test-text>أساسًا، تتعامل الØواسيب Ùقط مع الأرقام، وتقوم بتخزين الأØر٠والمØار٠الأخرى بعد أن تÙعطي رقما معينا لكل واØد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمØارÙØŒ ولم يوجد نظام تشÙير واØد ÙŠØتوي على جميع المØار٠الضرورية</test-text> + </test-case> + + <test-case id="Matra Test" script="deva"> + <test-font name="Devamt.ttf"/> + <test-text>à¥à¤‚ ं॑</test-text> + </test-case> + + <test-case id="Deva Stress Test" script="deva"> + <test-font name="Devamt.ttf"/> + <test-text>कठकं कः क॑ क॒ कà¤à¥‘ कं॒ कà¤à¤‚ः क॒॑</test-text> + </test-case> + + <test-case id="Deva Test" script="deva"> + <test-font name="Devamt.ttf"/> + <test-text>रू क़ॠकà¥à¤· कà¥à¤•à¤¿ कà¥à¤°à¤¿ टà¥à¤°à¤¿ हिनà¥à¤¦à¥€ रà¥à¤•à¥à¤°à¤¿à¤‚ कà¥à¤·à¤¤à¥à¤°à¤œà¥à¤žà¤¤à¥à¤°à¤•à¥à¤· शà¥à¤° थà¥à¤° शà¥à¤° कके रà¥à¤•à¥‡à¤‚ केूकूेकेृ रà¥à¤•à¥‚ क़ क कॠकà¥à¤· कà¥à¤·à¥ कà¥à¤·à¥à¤• ज़ ज जॠजà¥à¤ž जà¥à¤žà¥ जà¥à¤žà¥à¤• रà¥à¤• रà¥à¤•à¥à¤• डà¥à¤° कà¥à¤• क़à¥à¤• क़à¥à¤• क़ॠकà¥à¤·à¥à¤• कà¥à¤·à¥ तà¥à¤°à¥à¤• दà¥à¤¦ कि हि रू रॠरà¥à¤•à¥‡ रà¥à¤•à¤‚ कॠकॠके दà¥à¤¦à¥à¤¦ क़à¥à¤· कà¥à¤· रà¥à¤•à¥à¤·à¥‡ दà¥à¤¦à¤¤à¥à¤°à¥à¤• जà¥à¤ž कà¥à¤¤à¥à¤µ जà¥à¤žà¥à¤• रà¥à¤•à¤ रà¥à¤•à¤¿à¤ रà¥à¤•à¥‡à¤ रà¥à¤•à¥à¤°à¤¿à¤ हिंदी हà¥à¤®à¤¿à¤¹à¥à¤¯à¤¿à¤–ि ङà¥à¤• ङà¥à¤® ङà¥à¤•à¥à¤¤ ङà¥à¤– ङà¥à¤— ङà¥à¤˜ ङà¥à¤•à¥à¤· ङà¥à¤•à¥à¤·à¥à¤µ ङà¥à¤•à¥à¤·à¥à¤¯ रà¥à¤•à¥à¤¤à¥à¤µà¤¿ रà¥à¤°à¥à¤°à¥à¤° कै के कॠकू कृ कॅ कॆ हॠहू हॆ है हे</test-text> + </test-case> + + <test-case id="Japanese Han" script="hani" lang="JAN"> + <test-font name="ARIALUNI.TTF"/> + <test-text>ä¸åŽäººæ°‘共和国 å°æ¹¾ ä¸è¯äººæ°‘共和國 臺ç£</test-text> + </test-case> + + <test-case id="Korean Han" script="hani" lang="KOR"> + <test-font name="ARIALUNI.TTF"/> + <test-text>ä¸åŽäººæ°‘共和国 å°æ¹¾ ä¸è¯äººæ°‘共和國 臺ç£</test-text> + </test-case> + + <test-case id="Traditional Han" script="hani" lang="ZHT"> + <test-font name="ARIALUNI.TTF"/> + <test-text>ä¸åŽäººæ°‘共和国 å°æ¹¾ ä¸è¯äººæ°‘共和國 臺ç£</test-text> + </test-case> + + <test-case id="Simplified Han" script="hani" lang="ZHS"> + <test-font name="ARIALUNI.TTF"/> + <test-text>ä¸åŽäººæ°‘共和国 å°æ¹¾ ä¸è¯äººæ°‘共和國 臺ç£</test-text> + </test-case> + + <test-case id="Deva locl Hindi" script="deva" lang="HIN"> + <test-font name="TestFont1.otf"/> + <test-text>शङ़à¥</test-text> + </test-case> + + <test-case id="Deva locl Marathi" script="deva" lang="MAR"> + <test-font name="TestFont1.otf"/> + <test-text>शङ़à¥</test-text> + </test-case> +</layout-tests>
\ No newline at end of file diff --git a/Build/source/libs/icu-xetex/test/letest/letest.cpp b/Build/source/libs/icu-xetex/test/letest/letest.cpp index f34c3a20e3d..e73d9b82cb0 100644 --- a/Build/source/libs/icu-xetex/test/letest/letest.cpp +++ b/Build/source/libs/icu-xetex/test/letest/letest.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 1999-2005, International Business Machines + * Copyright (C) 1999-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -11,21 +11,315 @@ * created by: Eric R. Mader */ -#include "math.h" +#include "unicode/utypes.h" +#include "unicode/uclean.h" +#include "unicode/uchar.h" +#include "unicode/unistr.h" +#include "unicode/uscript.h" +#include "unicode/putil.h" +#include "unicode/ctest.h" + +#include "layout/LETypes.h" +#include "layout/LEScripts.h" +#include "layout/LayoutEngine.h" -#include "LETypes.h" -#include "LayoutEngine.h" #include "PortableFontInstance.h" +#include "SimpleFontInstance.h" +#include "letsutil.h" #include "letest.h" +#include "xmlparser.h" +#include "putilimp.h" // for uprv_getUTCtime() + +#include <stdlib.h> +#include <string.h> + U_NAMESPACE_USE -le_bool compareResults(le_int32 /*testNumber*/, TestResult *expected, TestResult *actual) +#define CH_COMMA 0x002C + +U_CDECL_BEGIN +static void U_CALLCONV ParamTest(void) +{ + LEErrorCode status = LE_NO_ERROR; + SimpleFontInstance *font = new SimpleFontInstance(12, status); + LayoutEngine *engine = LayoutEngine::layoutEngineFactory(font, arabScriptCode, -1, status); + LEGlyphID *glyphs = NULL; + le_int32 *indices = NULL; + float *positions = NULL; + le_int32 glyphCount = 0; + + glyphCount = engine->getGlyphCount(); + if (glyphCount != 0) { + log_err("Calling getGlyphCount() on an empty layout returned %d.\n", glyphCount); + } + + glyphs = NEW_ARRAY(LEGlyphID, glyphCount + 10); + indices = NEW_ARRAY(le_int32, glyphCount + 10); + positions = NEW_ARRAY(float, glyphCount + 10); + + engine->getGlyphs(NULL, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling getGlyphs(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getGlyphs(glyphs, status); + + if (status != LE_NO_LAYOUT_ERROR) { + log_err("Calling getGlyphs(glyphs, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getGlyphs(NULL, 0xFF000000L, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling getGlyphs(NULL, 0xFF000000L, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getGlyphs(glyphs, 0xFF000000L, status); + + if (status != LE_NO_LAYOUT_ERROR) { + log_err("Calling getGlyphs(glyphs, 0xFF000000L, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getCharIndices(NULL, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling getCharIndices(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getCharIndices(indices, status); + + if (status != LE_NO_LAYOUT_ERROR) { + log_err("Calling getCharIndices(indices, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getCharIndices(NULL, 1024, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling getCharIndices(NULL, 1024, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getCharIndices(indices, 1024, status); + + if (status != LE_NO_LAYOUT_ERROR) { + log_err("Calling getCharIndices(indices, 1024, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getGlyphPositions(NULL, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling getGlyphPositions(NULL, status) did not return LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getGlyphPositions(positions, status); + + if (status != LE_NO_LAYOUT_ERROR) { + log_err("Calling getGlyphPositions(positions, status) on an empty layout did not return LE_NO_LAYOUT_ERROR.\n"); + } + + DELETE_ARRAY(positions); + DELETE_ARRAY(indices); + DELETE_ARRAY(glyphs); + + status = LE_NO_ERROR; + glyphCount = engine->layoutChars(NULL, 0, 0, 0, FALSE, 0.0, 0.0, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling layoutChars(NULL, 0, 0, 0, FALSE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + LEUnicode chars[] = { + 0x0045, 0x006E, 0x0067, 0x006C, 0x0069, 0x0073, 0x0068, 0x0020, // "English " + 0x0645, 0x0627, 0x0646, 0x062A, 0x0648, 0x0634, // MEM ALIF KAF NOON TEH WAW SHEEN + 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x02E // " text." + }; + + status = LE_NO_ERROR; + glyphCount = engine->layoutChars(chars, -1, 6, 20, TRUE, 0.0, 0.0, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling layoutChars(chars, -1, 6, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + status = LE_NO_ERROR; + glyphCount = engine->layoutChars(chars, 8, -1, 20, TRUE, 0.0, 0.0, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling layoutChars(chars, 8, -1, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + status = LE_NO_ERROR; + glyphCount = engine->layoutChars(chars, 8, 6, -1, TRUE, 0.0, 0.0, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling layoutChars((chars, 8, 6, -1, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + status = LE_NO_ERROR; + glyphCount = engine->layoutChars(chars, 8, 6, 10, TRUE, 0.0, 0.0, status); + + if (status != LE_ILLEGAL_ARGUMENT_ERROR) { + log_err("Calling layoutChars(chars, 8, 6, 10, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n"); + } + + float x = 0.0, y = 0.0; + + status = LE_NO_ERROR; + glyphCount = engine->layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status); + + if (LE_FAILURE(status)) { + log_err("Calling layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n"); + goto bail; + } + + engine->getGlyphPosition(-1, x, y, status); + + if (status != LE_INDEX_OUT_OF_BOUNDS_ERROR) { + log_err("Calling getGlyphPosition(-1, x, y, status) did not fail w/ LE_INDEX_OUT_OF_BOUNDS_ERROR.\n"); + } + + status = LE_NO_ERROR; + engine->getGlyphPosition(glyphCount + 1, x, y, status); + + if (status != LE_INDEX_OUT_OF_BOUNDS_ERROR) { + log_err("Calling getGlyphPosition(glyphCount + 1, x, y, status) did not fail w/ LE_INDEX_OUT_OF_BOUNDS_ERROR.\n"); + } + +bail: + delete engine; + delete font; +} +U_CDECL_END + +U_CDECL_BEGIN +static void U_CALLCONV FactoryTest(void) +{ + LEErrorCode status = LE_NO_ERROR; + SimpleFontInstance *font = new SimpleFontInstance(12, status); + LayoutEngine *engine = NULL; + + for(le_int32 scriptCode = 0; scriptCode < scriptCodeCount; scriptCode += 1) { + status = LE_NO_ERROR; + engine = LayoutEngine::layoutEngineFactory(font, scriptCode, -1, status); + + if (LE_FAILURE(status)) { + log_err("Could not create a LayoutEngine for script \'%s\'.\n", uscript_getShortName((UScriptCode)scriptCode)); + } + + delete engine; + } + + delete font; +} +U_CDECL_END + +U_CDECL_BEGIN +static void U_CALLCONV AccessTest(void) +{ + LEErrorCode status = LE_NO_ERROR; + SimpleFontInstance *font = new SimpleFontInstance(12, status); + LayoutEngine *engine = LayoutEngine::layoutEngineFactory(font, arabScriptCode, -1, status); + le_int32 glyphCount; + LEGlyphID glyphs[6], extraBitGlyphs[6];; + le_int32 biasedIndices[6], indices[6], glyph; + float positions[6 * 2 + 2]; + LEUnicode chars[] = { + 0x0045, 0x006E, 0x0067, 0x006C, 0x0069, 0x0073, 0x0068, 0x0020, // "English " + 0x0645, 0x0627, 0x0646, 0x062A, 0x0648, 0x0634, // MEM ALIF KAF NOON TEH WAW SHEEN + 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x02E // " text." + }; + + if (LE_FAILURE(status)) { + log_err("Could not create LayoutEngine.\n"); + goto bail; + } + + glyphCount = engine->layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status); + + if (LE_FAILURE(status) || glyphCount != 6) { + log_err("layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n"); + goto bail; + } + + engine->getGlyphs(glyphs, status); + engine->getCharIndices(indices, status); + engine->getGlyphPositions(positions, status); + + if (LE_FAILURE(status)) { + log_err("Could not get glyph, indices and position arrays.\n"); + goto bail; + } + + engine->getGlyphs(extraBitGlyphs, 0xFF000000L, status); + + if (LE_FAILURE(status)) { + log_err("getGlyphs(extraBitGlyphs, 0xFF000000L, status); failed.\n"); + } else { + for(glyph = 0; glyph < glyphCount; glyph += 1) { + if (extraBitGlyphs[glyph] != (glyphs[glyph] | 0xFF000000L)) { + log_err("extraBigGlyphs[%d] != glyphs[%d] | 0xFF000000L: %8X, %8X\n", + glyph, glyph, extraBitGlyphs[glyph], glyphs[glyph]); + break; + } + } + } + + status = LE_NO_ERROR; + engine->getCharIndices(biasedIndices, 1024, status); + + if (LE_FAILURE(status)) { + log_err("getCharIndices(biasedIndices, 1024, status) failed.\n"); + } else { + for (glyph = 0; glyph < glyphCount; glyph += 1) { + if (biasedIndices[glyph] != (indices[glyph] + 1024)) { + log_err("biasedIndices[%d] != indices[%d] + 1024: %8X, %8X\n", + glyph, glyph, biasedIndices[glyph], indices[glyph]); + break; + } + } + } + + status = LE_NO_ERROR; + for (glyph = 0; glyph <= glyphCount; glyph += 1) { + float x = 0.0, y = 0.0; + + engine->getGlyphPosition(glyph, x, y, status); + + if (LE_FAILURE(status)) { + log_err("getGlyphPosition(%d, x, y, status) failed.\n", glyph); + break; + } + + if (x != positions[glyph*2] || y != positions[glyph*2 + 1]) { + log_err("getGlyphPosition(%d, x, y, status) returned bad position: (%f, %f) != (%f, %f)\n", + glyph, x, y, positions[glyph*2], positions[glyph*2 + 1]); + break; + } + } + +bail: + delete engine; + delete font; +} +U_CDECL_END + +le_bool compareResults(const char *testID, TestResult *expected, TestResult *actual) { /* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */ if (actual->glyphCount != expected->glyphCount) { - printf("incorrect glyph count: exptected %d, got %d\n", expected->glyphCount, actual->glyphCount); + log_err("Test %s: incorrect glyph count: exptected %d, got %d\n", + testID, expected->glyphCount, actual->glyphCount); return FALSE; } @@ -33,34 +327,38 @@ le_bool compareResults(le_int32 /*testNumber*/, TestResult *expected, TestResult for (i = 0; i < actual->glyphCount; i += 1) { if (actual->glyphs[i] != expected->glyphs[i]) { - printf("incorrect id for glyph %d: expected %4X, got %4X\n", i, expected->glyphs[i], actual->glyphs[i]); + log_err("Test %s: incorrect id for glyph %d: expected %4X, got %4X\n", + testID, i, expected->glyphs[i], actual->glyphs[i]); return FALSE; } } for (i = 0; i < actual->glyphCount; i += 1) { if (actual->indices[i] != expected->indices[i]) { - printf("incorrect index for glyph %d: expected %8X, got %8X\n", i, expected->indices[i], actual->indices[i]); + log_err("Test %s: incorrect index for glyph %d: expected %8X, got %8X\n", + testID, i, expected->indices[i], actual->indices[i]); return FALSE; } } for (i = 0; i <= actual->glyphCount; i += 1) { - double xError = fabs(actual->positions[i * 2] - expected->positions[i * 2]); + double xError = uprv_fabs(actual->positions[i * 2] - expected->positions[i * 2]); if (xError > 0.0001) { - printf("incorrect x position for glyph %d: expected %f, got %f\n", i, expected->positions[i * 2], actual->positions[i * 2]); + log_err("Test %s: incorrect x position for glyph %d: expected %f, got %f\n", + testID, i, expected->positions[i * 2], actual->positions[i * 2]); return FALSE; } - double yError = fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]); + double yError = uprv_fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]); if (yError < 0) { yError = -yError; } if (yError > 0.0001) { - printf("incorrect y position for glyph %d: expected %f, got %f\n", i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]); + log_err("Test %s: incorrect y position for glyph %d: expected %f, got %f\n", + testID, i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]); return FALSE; } } @@ -68,77 +366,495 @@ le_bool compareResults(le_int32 /*testNumber*/, TestResult *expected, TestResult return TRUE; } -static void checkFontVersion(PortableFontInstance &fontInstance, const char *testVersionString, le_uint32 testChecksum) +static void checkFontVersion(PortableFontInstance *fontInstance, const char *testVersionString, + le_uint32 testChecksum, const char *testID) { - le_uint32 fontChecksum = fontInstance.getFontChecksum(); + le_uint32 fontChecksum = fontInstance->getFontChecksum(); if (fontChecksum != testChecksum) { - const char *fontVersionString = fontInstance.getNameString(NAME_VERSION_STRING, + const char *fontVersionString = fontInstance->getNameString(NAME_VERSION_STRING, PLATFORM_MACINTOSH, MACINTOSH_ROMAN, MACINTOSH_ENGLISH); - printf("this may not be the same font used to generate the test data.\n"); - printf("Your font's version string is \"%s\"\n", fontVersionString); - printf("The expected version string is \"%s\"\n", testVersionString); - printf("If you see errors, they may be due to the version of the font you're using.\n"); + log_info("Test %s: this may not be the same font used to generate the test data.\n", testID); + log_info("Your font's version string is \"%s\"\n", fontVersionString); + log_info("The expected version string is \"%s\"\n", testVersionString); + log_info("If you see errors, they may be due to the version of the font you're using.\n"); + + fontInstance->deleteNameString(fontVersionString); + } +} + +/* Returns the path to icu/source/test/testdata/ */ +const char *getSourceTestData() { + const char *srcDataDir = NULL; +#ifdef U_TOPSRCDIR + srcDataDir = U_TOPSRCDIR U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING; +#else + srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING; + FILE *f = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING"rbbitst.txt", "r"); + + if (f != NULL) { + /* We're in icu/source/test/letest/ */ + fclose(f); + } else { + /* We're in icu/source/test/letest/(Debug|Release) */ + srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING; } +#endif + + return srcDataDir; } -int main(int /*argc*/, char * /*argv[]*/) +const char *getPath(char buffer[2048], const char *filename) { + const char *testDataDirectory = getSourceTestData(); + + strcpy(buffer, testDataDirectory); + strcat(buffer, filename); + + return buffer; +} + +le_uint32 *getHexArray(const UnicodeString &numbers, int32_t &arraySize) { - le_int32 failures = 0; + int32_t offset = -1; + + arraySize = 1; + while((offset = numbers.indexOf(CH_COMMA, offset + 1)) >= 0) { + arraySize += 1; + } + + le_uint32 *array = NEW_ARRAY(le_uint32, arraySize); + char number[16]; + le_int32 count = 0; + le_int32 start = 0, end = 0; + le_int32 len = 0; - for (le_int32 test = 0; test < testCount; test += 1) { - LEErrorCode fontStatus = LE_NO_ERROR; + // trim leading whitespace + while(u_isUWhiteSpace(numbers[start])) { + start += 1; + } - printf("Test %d, font = %s... ", test, testInputs[test].fontName); + while((end = numbers.indexOf(CH_COMMA, start)) >= 0) { + len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV); + number[len] = '\0'; + start = end + 1; - PortableFontInstance fontInstance(testInputs[test].fontName, 12, fontStatus); + sscanf(number, "%x", &array[count++]); - if (LE_FAILURE(fontStatus)) { - printf("could not open font.\n"); - continue; + // trim whitespace following the comma + while(u_isUWhiteSpace(numbers[start])) { + start += 1; } + } + + // trim trailing whitespace + end = numbers.length(); + while(u_isUWhiteSpace(numbers[end - 1])) { + end -= 1; + } + + len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV); + number[len] = '\0'; + sscanf(number, "%x", &array[count]); + + return array; +} + +float *getFloatArray(const UnicodeString &numbers, int32_t &arraySize) +{ + int32_t offset = -1; - checkFontVersion(fontInstance, testInputs[test].fontVersionString, testInputs[test].fontChecksum); + arraySize = 1; + while((offset = numbers.indexOf(CH_COMMA, offset + 1)) >= 0) { + arraySize += 1; + } + + float *array = NEW_ARRAY(float, arraySize); + char number[32]; + le_int32 count = 0; + le_int32 start = 0, end = 0; + le_int32 len = 0; + + // trim leading whitespace + while(u_isUWhiteSpace(numbers[start])) { + start += 1; + } + + while((end = numbers.indexOf(CH_COMMA, start)) >= 0) { + len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV); + number[len] = '\0'; + start = end + 1; - LEErrorCode success = LE_NO_ERROR; - LayoutEngine *engine = LayoutEngine::layoutEngineFactory(&fontInstance, testInputs[test].scriptCode, -1, success); - le_int32 textLength = testInputs[test].textLength; - le_bool result; - TestResult actual; + sscanf(number, "%f", &array[count++]); - if (LE_FAILURE(success)) { - // would be nice to print the script name here, but - // don't want to maintain a table, and don't want to - // require ICU just for the script name... - printf("could not create a LayoutEngine.\n"); - continue; + // trim whiteapce following the comma + while(u_isUWhiteSpace(numbers[start])) { + start += 1; } + } - actual.glyphCount = engine->layoutChars(testInputs[test].text, 0, textLength, textLength, testInputs[test].rightToLeft, 0, 0, success); + while(u_isUWhiteSpace(numbers[start])) { + start += 1; + } - actual.glyphs = new LEGlyphID[actual.glyphCount]; - actual.indices = new le_int32[actual.glyphCount]; - actual.positions = new float[actual.glyphCount * 2 + 2]; + // trim trailing whitespace + end = numbers.length(); + while(u_isUWhiteSpace(numbers[end - 1])) { + end -= 1; + } - engine->getGlyphs(actual.glyphs, success); - engine->getCharIndices(actual.indices, success); - engine->getGlyphPositions(actual.positions, success); + len = numbers.extract(start, end - start, number, ARRAY_SIZE(number), US_INV); + number[len] = '\0'; + sscanf(number, "%f", &array[count]); - result = compareResults(test, &testResults[test], &actual); + return array; +} + +LEFontInstance *openFont(const char *fontName, const char *checksum, const char *version, const char *testID) +{ + char path[2048]; + PortableFontInstance *font; + LEErrorCode fontStatus = LE_NO_ERROR; - if (result) { - printf("passed.\n"); - } else { - failures += 1; - printf("failed.\n"); + + font = new PortableFontInstance(getPath(path, fontName), 12, fontStatus); + + if (LE_FAILURE(fontStatus)) { + log_info("Test %s: can't open font %s - test skipped.\n", testID, fontName); + delete font; + return NULL; + } else { + le_uint32 cksum = 0; + + sscanf(checksum, "%x", &cksum); + + checkFontVersion(font, version, cksum, testID); + } + + return font; +} + +U_CDECL_BEGIN +static void U_CALLCONV DataDrivenTest(void) +{ +#if !UCONFIG_NO_REGULAR_EXPRESSIONS + UErrorCode status = U_ZERO_ERROR; + char path[2048]; + const char *testFilePath = getPath(path, "letest.xml"); + + UXMLParser *parser = UXMLParser::createParser(status); + UXMLElement *root = parser->parseFile(testFilePath, status); + + if (root == NULL) { + log_err("Could not open the test data file: %s\n", testFilePath); + delete parser; + return; + } + + UnicodeString test_case = UNICODE_STRING_SIMPLE("test-case"); + UnicodeString test_text = UNICODE_STRING_SIMPLE("test-text"); + UnicodeString test_font = UNICODE_STRING_SIMPLE("test-font"); + UnicodeString result_glyphs = UNICODE_STRING_SIMPLE("result-glyphs"); + UnicodeString result_indices = UNICODE_STRING_SIMPLE("result-indices"); + UnicodeString result_positions = UNICODE_STRING_SIMPLE("result-positions"); + + // test-case attributes + UnicodeString id_attr = UNICODE_STRING_SIMPLE("id"); + UnicodeString script_attr = UNICODE_STRING_SIMPLE("script"); + UnicodeString lang_attr = UNICODE_STRING_SIMPLE("lang"); + + // test-font attributes + UnicodeString name_attr = UNICODE_STRING_SIMPLE("name"); + UnicodeString ver_attr = UNICODE_STRING_SIMPLE("version"); + UnicodeString cksum_attr = UNICODE_STRING_SIMPLE("checksum"); + + const UXMLElement *testCase; + int32_t tc = 0; + + while((testCase = root->nextChildElement(tc)) != NULL) { + if (testCase->getTagName().compare(test_case) == 0) { + char *id = getCString(testCase->getAttribute(id_attr)); + char *script = getCString(testCase->getAttribute(script_attr)); + char *lang = getCString(testCase->getAttribute(lang_attr)); + LEFontInstance *font = NULL; + const UXMLElement *element; + int32_t ec = 0; + int32_t charCount = 0; + int32_t typoFlags = 3; // kerning + ligatures... + UScriptCode scriptCode; + le_int32 languageCode = -1; + UnicodeString text, glyphs, indices, positions; + int32_t glyphCount = 0, indexCount = 0, positionCount = 0; + TestResult expected = {0, NULL, NULL, NULL}; + TestResult actual = {0, NULL, NULL, NULL}; + LEErrorCode success = LE_NO_ERROR; + LayoutEngine *engine = NULL; + + uscript_getCode(script, &scriptCode, 1, &status); + if (LE_FAILURE(status)) { + log_err("invalid script name: %s.\n", script); + goto free_c_strings; + } + + if (lang != NULL) { + languageCode = getLanguageCode(lang); + + if (languageCode < 0) { + log_err("invalid language name: %s.\n", lang); + goto free_c_strings; + } + } + + while((element = testCase->nextChildElement(ec)) != NULL) { + UnicodeString tag = element->getTagName(); + + // TODO: make sure that each element is only used once. + if (tag.compare(test_font) == 0) { + char *fontName = getCString(element->getAttribute(name_attr)); + char *fontVer = getCString(element->getAttribute(ver_attr)); + char *fontCksum = getCString(element->getAttribute(cksum_attr)); + + font = openFont(fontName, fontCksum, fontVer, id); + freeCString(fontCksum); + freeCString(fontVer); + freeCString(fontName); + + if (font == NULL) { + // warning message already displayed... + goto free_c_strings; + } + } else if (tag.compare(test_text) == 0) { + text = element->getText(TRUE); + charCount = text.length(); + } else if (tag.compare(result_glyphs) == 0) { + glyphs = element->getText(TRUE); + } else if (tag.compare(result_indices) == 0) { + indices = element->getText(TRUE); + } else if (tag.compare(result_positions) == 0) { + positions = element->getText(TRUE); + } else { + // an unknown tag... + char *cTag = getCString(&tag); + + log_info("Test %s: unknown element with tag \"%s\"\n", id, cTag); + freeCString(cTag); + } + } + + // TODO: make sure that the font, test-text, result-glyphs, result-indices and result-positions + // have all been provided + if (font == NULL) { + LEErrorCode fontStatus = LE_NO_ERROR; + + font = new SimpleFontInstance(12, fontStatus); + typoFlags |= 0x80000000L; // use CharSubstitutionFilter... + } + + expected.glyphs = (LEGlyphID *) getHexArray(glyphs, glyphCount); + expected.indices = (le_int32 *) getHexArray(indices, indexCount); + expected.positions = getFloatArray(positions, positionCount); + + expected.glyphCount = glyphCount; + + if (glyphCount < charCount || indexCount != glyphCount || positionCount < glyphCount * 2 + 2) { + log_err("Test %s: inconsistent input data: charCount = %d, glyphCount = %d, glyphCount = %d, indexCount = %d, positionCount = %d\n", + id, charCount, glyphCount, indexCount, positionCount); + goto free_expected; + }; + + engine = LayoutEngine::layoutEngineFactory(font, scriptCode, languageCode, typoFlags, success); + + if (LE_FAILURE(success)) { + log_err("Test %s: could not create a LayoutEngine.\n", id); + goto free_expected; + } + + actual.glyphCount = engine->layoutChars(text.getBuffer(), 0, charCount, charCount, getRTL(text), 0, 0, success); + + actual.glyphs = NEW_ARRAY(LEGlyphID, actual.glyphCount); + actual.indices = NEW_ARRAY(le_int32, actual.glyphCount); + actual.positions = NEW_ARRAY(float, actual.glyphCount * 2 + 2); + + engine->getGlyphs(actual.glyphs, success); + engine->getCharIndices(actual.indices, success); + engine->getGlyphPositions(actual.positions, success); + + compareResults(id, &expected, &actual); + + DELETE_ARRAY(actual.positions); + DELETE_ARRAY(actual.indices); + DELETE_ARRAY(actual.glyphs); + + delete engine; + +free_expected: + DELETE_ARRAY(expected.positions); + DELETE_ARRAY(expected.indices); + DELETE_ARRAY(expected.glyphs); + + delete font; + +free_c_strings: + freeCString(lang); + freeCString(script); + freeCString(id); } + } + + delete root; + delete parser; +#endif +} +U_CDECL_END + +static void addAllTests(TestNode** root) +{ + addTest(root, &ParamTest, "api/ParameterTest"); + addTest(root, &FactoryTest, "api/FactoryTest"); + addTest(root, &AccessTest, "layout/AccessTest"); + addTest(root, &DataDrivenTest, "layout/DataDrivenTest"); +} - delete[] actual.positions; - delete[] actual.indices; - delete[] actual.glyphs; - delete engine; +/* returns the path to icu/source/data/out */ +static const char *ctest_dataOutDir() +{ + static const char *dataOutDir = NULL; + + if(dataOutDir) { + return dataOutDir; } - return failures; + /* U_TOPBUILDDIR is set by the makefiles on UNIXes when building cintltst and intltst + // to point to the top of the build hierarchy, which may or + // may not be the same as the source directory, depending on + // the configure options used. At any rate, + // set the data path to the built data from this directory. + // The value is complete with quotes, so it can be used + // as-is as a string constant. + */ +#if defined (U_TOPBUILDDIR) + { + dataOutDir = U_TOPBUILDDIR "data"U_FILE_SEP_STRING"out"U_FILE_SEP_STRING; + } +#else + + /* On Windows, the file name obtained from __FILE__ includes a full path. + * This file is "wherever\icu\source\test\cintltst\cintltst.c" + * Change to "wherever\icu\source\data" + */ + { + static char p[sizeof(__FILE__) + 20]; + char *pBackSlash; + int i; + + strcpy(p, __FILE__); + /* We want to back over three '\' chars. */ + /* Only Windows should end up here, so looking for '\' is safe. */ + for (i=1; i<=3; i++) { + pBackSlash = strrchr(p, U_FILE_SEP_CHAR); + if (pBackSlash != NULL) { + *pBackSlash = 0; /* Truncate the string at the '\' */ + } + } + + if (pBackSlash != NULL) { + /* We found and truncated three names from the path. + * Now append "source\data" and set the environment + */ + strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING); + dataOutDir = p; + } + else { + /* __FILE__ on MSVC7 does not contain the directory */ + FILE *file = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "Makefile.in", "r"); + if (file) { + fclose(file); + dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING; + } + else { + dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING; + } + } + } +#endif + + return dataOutDir; } + +/* ctest_setICU_DATA - if the ICU_DATA environment variable is not already + * set, try to deduce the directory in which ICU was built, + * and set ICU_DATA to "icu/source/data" in that location. + * The intent is to allow the tests to have a good chance + * of running without requiring that the user manually set + * ICU_DATA. Common data isn't a problem, since it is + * picked up via a static (build time) reference, but the + * tests dynamically load some data. + */ +static void ctest_setICU_DATA() { + + /* No location for the data dir was identifiable. + * Add other fallbacks for the test data location here if the need arises + */ + if (getenv("ICU_DATA") == NULL) { + /* If ICU_DATA isn't set, set it to the usual location */ + u_setDataDirectory(ctest_dataOutDir()); + } +} + +int main(int argc, char* argv[]) +{ + int32_t nerrors = 0; + TestNode *root = NULL; + UErrorCode errorCode = U_ZERO_ERROR; + UDate startTime, endTime; + int32_t diffTime; + + startTime = uprv_getUTCtime(); + + /* Check whether ICU will initialize without forcing the build data directory into + * the ICU_DATA path. Success here means either the data dll contains data, or that + * this test program was run with ICU_DATA set externally. Failure of this check + * is normal when ICU data is not packaged into a shared library. + * + * Whether or not this test succeeds, we want to cleanup and reinitialize + * with a data path so that data loading from individual files can be tested. + */ + u_init(&errorCode); + + if (U_FAILURE(errorCode)) { + fprintf(stderr, + "#### Note: ICU Init without build-specific setDataDirectory() failed.\n"); + } + + u_cleanup(); + errorCode = U_ZERO_ERROR; + + /* Initialize ICU */ + ctest_setICU_DATA(); /* u_setDataDirectory() must happen Before u_init() */ + u_init(&errorCode); + + if (U_FAILURE(errorCode)) { + fprintf(stderr, + "#### ERROR! %s: u_init() failed with status = \"%s\".\n" + "*** Check the ICU_DATA environment variable and \n" + "*** check that the data files are present.\n", argv[0], u_errorName(errorCode)); + return 1; + } + + addAllTests(&root); + nerrors = processArgs(root, argc, argv); + + cleanUpTestTree(root); + u_cleanup(); + + endTime = uprv_getUTCtime(); + diffTime = (int32_t)(endTime - startTime); + printf("Elapsed Time: %02d:%02d:%02d.%03d\n", + (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR), + (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE), + (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND), + (int)(diffTime%U_MILLIS_PER_SECOND)); + + return nerrors; +} + diff --git a/Build/source/libs/icu-xetex/test/letest/letest.h b/Build/source/libs/icu-xetex/test/letest/letest.h index 2fd381e2923..15224a369d0 100644 --- a/Build/source/libs/icu-xetex/test/letest/letest.h +++ b/Build/source/libs/icu-xetex/test/letest/letest.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 1999-2005, International Business Machines + * Copyright (C) 1999-2006, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -11,24 +11,23 @@ * created by: Eric R. Mader */ +#ifndef __LETEST_H +#define __LETEST_H + #include "LETypes.h" -#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0]) +#include <stdlib.h> +#include <string.h> -struct TestInput -{ - const char *fontName; - const char *fontVersionString; - le_uint32 fontChecksum; - LEUnicode *text; - le_int32 textLength; - le_int32 scriptCode; - le_bool rightToLeft; -}; +#define ARRAY_SIZE(array) (sizeof array / sizeof array[0]) + +#define ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0]) -extern le_int32 testCount; +#define NEW_ARRAY(type,count) (type *) malloc((count) * sizeof(type)) -extern TestInput testInputs[]; +#define DELETE_ARRAY(array) free((void *) (array)) + +#define GROW_ARRAY(array,newSize) realloc((void *) (array), (newSize) * sizeof (array)[0]) struct TestResult { @@ -37,7 +36,4 @@ struct TestResult le_int32 *indices; float *positions; }; - -extern TestResult testResults[]; - - +#endif diff --git a/Build/source/libs/icu-xetex/test/letest/letest.sln b/Build/source/libs/icu-xetex/test/letest/letest.sln index 59ba292ada1..de181d150ee 100644 --- a/Build/source/libs/icu-xetex/test/letest/letest.sln +++ b/Build/source/libs/icu-xetex/test/letest/letest.sln @@ -1,6 +1,11 @@ Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "letest", "letest.vcproj", "{88CD8CC8-2CD7-40D1-8B31-672AF434468B}" ProjectSection(ProjectDependencies) = postProject + {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65} = {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctestfw", "..\..\tools\ctestfw\ctestfw.vcproj", "{E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}" + ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global @@ -13,6 +18,10 @@ Global {88CD8CC8-2CD7-40D1-8B31-672AF434468B}.Debug.Build.0 = Debug|Win32 {88CD8CC8-2CD7-40D1-8B31-672AF434468B}.Release.ActiveCfg = Release|Win32 {88CD8CC8-2CD7-40D1-8B31-672AF434468B}.Release.Build.0 = Release|Win32 + {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}.Debug.ActiveCfg = Debug|Win32 + {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}.Debug.Build.0 = Debug|Win32 + {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}.Release.ActiveCfg = Release|Win32 + {E7D9BA19-6ED3-4325-8D0D-D724F6D29C65}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/Build/source/libs/icu-xetex/test/letest/letest.vcproj b/Build/source/libs/icu-xetex/test/letest/letest.vcproj index 9f79ac2ab9c..0810a5b1910 100644 --- a/Build/source/libs/icu-xetex/test/letest/letest.vcproj +++ b/Build/source/libs/icu-xetex/test/letest/letest.vcproj @@ -3,6 +3,7 @@ ProjectType="Visual C++" Version="7.10" Name="letest" + ProjectGUID="{67351485-4D18-4245-BE39-A7EF0675ACD2}" SccProjectName="" SccLocalPath=""> <Platforms> @@ -21,11 +22,12 @@ <Tool Name="VCCLCompilerTool" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\include\layout,..\..\..\include,..\..\common" - PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,LE_USE_CMEMORY" + AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\tools\ctestfw;..\..\tools\toolutil;..\..\layout" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="TRUE" RuntimeLibrary="4" EnableFunctionLevelLinking="TRUE" + TreatWChar_tAsBuiltInType="TRUE" UsePrecompiledHeader="2" PrecompiledHeaderFile=".\Release/letest.pch" AssemblerListingLocation=".\Release/" @@ -80,10 +82,11 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\..\include\layout,..\..\..\include,..\..\common" - PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,LE_USE_CMEMORY" + AdditionalIncludeDirectories="..\..\..\include\layout;..\..\..\include;..\..\common;..\..\tools\ctestfw;..\..\tools\toolutil;..\..\layout" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="3" RuntimeLibrary="5" + TreatWChar_tAsBuiltInType="TRUE" UsePrecompiledHeader="2" PrecompiledHeaderFile=".\Debug/letest.pch" AssemblerListingLocation=".\Debug/" @@ -98,10 +101,10 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="../../../lib/iculed.lib ../../../lib/icuucd.lib odbc32.lib odbccp32.lib" OutputFile=".\Debug/letest.exe" LinkIncremental="2" SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\Debug/letest.pdb" SubSystem="1"/> @@ -146,10 +149,13 @@ RelativePath=".\letest.cpp"> </File> <File + RelativePath=".\letsutil.cpp"> + </File> + <File RelativePath=".\PortableFontInstance.cpp"> </File> <File - RelativePath=".\testdata.cpp"> + RelativePath=".\SimpleFontInstance.cpp"> </File> </Filter> <Filter @@ -165,11 +171,17 @@ RelativePath=".\letest.h"> </File> <File + RelativePath=".\letsutil.h"> + </File> + <File RelativePath=".\PortableFontInstance.h"> </File> <File RelativePath=".\sfnt.h"> </File> + <File + RelativePath=".\SimpleFontInstance.h"> + </File> </Filter> <Filter Name="Resource Files" diff --git a/Build/source/libs/icu-xetex/test/letest/letsutil.cpp b/Build/source/libs/icu-xetex/test/letest/letsutil.cpp new file mode 100644 index 00000000000..edac65ac9a2 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/letest/letsutil.cpp @@ -0,0 +1,98 @@ +/* + ******************************************************************************* + * + * Copyright (C) 1999-2006, International Business Machines + * Corporation and others. All Rights Reserved. + * + ******************************************************************************* + * file name: letsutil.cpp + * + * created on: 04/25/2006 + * created by: Eric R. Mader + */ + +#include "unicode/utypes.h" +#include "unicode/unistr.h" +#include "unicode/ubidi.h" + +#include "layout/LETypes.h" +#include "layout/LEScripts.h" +#include "layout/LayoutEngine.h" +#include "layout/LELanguages.h" + +#include "OpenTypeLayoutEngine.h" + +#include "letest.h" +#include "letsutil.h" + +U_NAMESPACE_USE + +char *getCString(const UnicodeString *uString) +{ + if (uString == NULL) { + return NULL; + } + + le_int32 uLength = uString->length(); + le_int32 cLength = uString->extract(0, uLength, NULL, 0, US_INV); + char *cString = NEW_ARRAY(char, cLength + 1); + + uString->extract(0, uLength, cString, cLength, US_INV); + cString[cLength] = '\0'; + + return cString; +} + +char *getUTF8String(const UnicodeString *uString) +{ + if (uString == NULL) { + return NULL; + } + + le_int32 uLength = uString->length(); + le_int32 cLength = uString->extract(0, uLength, NULL, 0, "UTF-8"); + char *cString = NEW_ARRAY(char, cLength + 1); + + uString->extract(0, uLength, cString, cLength, "UTF-8"); + + cString[cLength] = '\0'; + + return cString; +} + +void freeCString(char *cString) +{ + DELETE_ARRAY(cString); +} + +le_bool getRTL(const UnicodeString &text) +{ + UBiDiLevel paraLevel; + UErrorCode status = U_ZERO_ERROR; + le_int32 charCount = text.length(); + UBiDi *ubidi = ubidi_openSized(charCount, 0, &status); + + ubidi_setPara(ubidi, text.getBuffer(), charCount, UBIDI_DEFAULT_LTR, NULL, &status); + paraLevel = ubidi_getParaLevel(ubidi); + ubidi_close(ubidi); + + return paraLevel & 1; +} + +le_int32 getLanguageCode(const char *lang) +{ + if (strlen(lang) != 3) { + return -1; + } + + LETag langTag = (LETag) ((lang[0] << 24) + (lang[1] << 16) + (lang[2] << 8) + 0x20); + + for (le_int32 i = 0; i < languageCodeCount; i += 1) { + if (langTag == OpenTypeLayoutEngine::languageTags[i]) { + return i; + } + } + + return -1; +} + diff --git a/Build/source/libs/icu-xetex/test/letest/letsutil.h b/Build/source/libs/icu-xetex/test/letest/letsutil.h new file mode 100644 index 00000000000..b7822e5d900 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/letest/letsutil.h @@ -0,0 +1,36 @@ +/* + ******************************************************************************* + * + * Copyright (C) 1999-2006, International Business Machines + * Corporation and others. All Rights Reserved. + * + ******************************************************************************* + * file name: letsutil.h + * + * created on: 04/25/2006 + * created by: Eric R. Mader + */ + +#ifndef __LETSUTIL_H +#define __LETSUTIL_H + +#include "unicode/utypes.h" +#include "unicode/unistr.h" +#include "unicode/ubidi.h" + +#include "layout/LETypes.h" +#include "layout/LEScripts.h" +#include "layout/LayoutEngine.h" +#include "layout/LELanguages.h" + +#include "OpenTypeLayoutEngine.h" + +#include "letest.h" + +char *getCString(const UnicodeString *uString); +char *getUTF8String(const UnicodeString *uString); +void freeCString(char *cString); +le_bool getRTL(const UnicodeString &text); +le_int32 getLanguageCode(const char *lang); + +#endif diff --git a/Build/source/libs/icu-xetex/test/perf/charperf/.cvsignore b/Build/source/libs/icu-xetex/test/perf/charperf/.cvsignore new file mode 100644 index 00000000000..4c913730998 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/charperf/.cvsignore @@ -0,0 +1,6 @@ +*.d +*.o +charperf +Debug +Release +Makefile diff --git a/Build/source/libs/icu-xetex/test/perf/charperf/Makefile.in b/Build/source/libs/icu-xetex/test/perf/charperf/Makefile.in index e28833e1619..9e1c7516384 100644 --- a/Build/source/libs/icu-xetex/test/perf/charperf/Makefile.in +++ b/Build/source/libs/icu-xetex/test/perf/charperf/Makefile.in @@ -1,5 +1,5 @@ -## Makefile.in for ICU - test/charperf -## Copyright (c) 2001-2005, International Business Machines Corporation and +## Makefile.in for ICU - test/perf/charperf +## Copyright (c) 2001-2006, International Business Machines Corporation and ## others. All Rights Reserved. ## Source directory information @@ -10,11 +10,8 @@ top_builddir = ../../.. include $(top_builddir)/icudefs.mk -## Platform-specific setup -include @platform_make_fragment@ - ## Build directory information -subdir = test/charperf +subdir = test/perf/charperf ## Extra files to remove for 'make clean' CLEANFILES = *~ $(DEPS) @@ -22,16 +19,8 @@ CLEANFILES = *~ $(DEPS) ## Target information TARGET = charperf -DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -CFLAGS = @CFLAGS@ -CXXFLAGS = @CXXFLAGS@ -ENABLE_RPATH = @ENABLE_RPATH@ -ifeq ($(ENABLE_RPATH),YES) -RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) -endif -LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) -LIBS = $(LIBICUUC) $(LIBICUI18N) $(LIBICUTOOLUTIL) @LIBS@ @LIB_M@ +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) OBJECTS = charperf.o diff --git a/Build/source/libs/icu-xetex/test/perf/charperf/charperf.cpp b/Build/source/libs/icu-xetex/test/perf/charperf/charperf.cpp index bde84695473..c964625bf2f 100644 --- a/Build/source/libs/icu-xetex/test/perf/charperf/charperf.cpp +++ b/Build/source/libs/icu-xetex/test/perf/charperf/charperf.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (C) 2002-2003 IBM, Inc. All Rights Reserved. + * Copyright (C) 2002-2006 IBM, Inc. All Rights Reserved. * ********************************************************************/ /***************************************************************************** @@ -23,9 +23,9 @@ #include "uoptions.h" UOption options[] = { - UOPTION_DEF("min", 'n', UOPT_REQUIRES_ARG), - UOPTION_DEF("min", 'x', UOPT_REQUIRES_ARG), - }; + UOPTION_DEF("min", 'n', UOPT_REQUIRES_ARG), + UOPTION_DEF("min", 'x', UOPT_REQUIRES_ARG), +}; int MIN_OPTION_ = 0; int MAX_OPTION_ = 1; @@ -33,41 +33,41 @@ int main(int argc, const char *argv[]) { UErrorCode status = U_ZERO_ERROR; CharPerformanceTest test(argc, argv, status); - if (U_FAILURE(status)){ + if (U_FAILURE(status)){ return status; } if (test.run() == FALSE){ fprintf(stderr, "FAILED: Tests could not be run please check the " - "arguments.\n"); + "arguments.\n"); return -1; } return 0; } CharPerformanceTest::CharPerformanceTest(int32_t argc, const char *argv[], - UErrorCode &status) - : UPerfTest(argc, argv, status) + UErrorCode &status) + : UPerfTest(argc, argv, status) { - if (status== U_ILLEGAL_ARGUMENT_ERROR){ - fprintf(stderr,gUsageString, "charperf"); - return; + if (status== U_ILLEGAL_ARGUMENT_ERROR){ + fprintf(stderr,gUsageString, "charperf"); + return; } if (U_FAILURE(status)){ fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", - u_errorName(status)); + u_errorName(status)); return; } - if (_remainingArgc < 0) { - // that means there are some -names not matched in the super class - // first tag is always skipped in u_parseArgs - int size = - _remainingArgc; - argv += argc - size; - argc = size; - _remainingArgc = u_parseArgs(argc, (char**)argv, - (int32_t)(sizeof(options)/sizeof(options[0])), options); - } - MIN_ = 0; + if (_remainingArgc < 0) { + // that means there are some -names not matched in the super class + // first tag is always skipped in u_parseArgs + int size = - _remainingArgc; + argv += argc - size; + argc = size; + _remainingArgc = u_parseArgs(argc, (char**)argv, + (int32_t)(sizeof(options)/sizeof(options[0])), options); + } + MIN_ = 0; if (sizeof(wchar_t) > 2) { // for stdlibs like glibc that supports 32 bits wchar // we test for the whole unicode character set by default @@ -77,12 +77,12 @@ CharPerformanceTest::CharPerformanceTest(int32_t argc, const char *argv[], MAX_ = 0xffff; } printf("MAX_ size will be 0x%x\n", MAX_); - if (options[MIN_OPTION_].doesOccur) { - MIN_ = atoi(options[MIN_OPTION_].value); - } - if (options[MAX_OPTION_].doesOccur) { - MAX_ = atoi(options[MAX_OPTION_].value); - } + if (options[MIN_OPTION_].doesOccur) { + MIN_ = atoi(options[MIN_OPTION_].value); + } + if (options[MAX_OPTION_].doesOccur) { + MAX_ = atoi(options[MAX_OPTION_].value); + } } CharPerformanceTest::~CharPerformanceTest() @@ -90,32 +90,32 @@ CharPerformanceTest::~CharPerformanceTest() } UPerfFunction* CharPerformanceTest::runIndexedTest(int32_t index, UBool exec, - const char *&name, - char* par) + const char *&name, + char* par) { switch (index) { TESTCASE(0, TestIsAlpha); - TESTCASE(1, TestIsUpper); - TESTCASE(2, TestIsLower); - TESTCASE(3, TestIsDigit); - TESTCASE(4, TestIsSpace); - TESTCASE(5, TestIsAlphaNumeric); - TESTCASE(6, TestIsPrint); - TESTCASE(7, TestIsControl); - TESTCASE(8, TestToLower); - TESTCASE(9, TestToUpper); - TESTCASE(10, TestIsWhiteSpace); - TESTCASE(11, TestStdLibIsAlpha); - TESTCASE(12, TestStdLibIsUpper); - TESTCASE(13, TestStdLibIsLower); - TESTCASE(14, TestStdLibIsDigit); - TESTCASE(15, TestStdLibIsSpace); - TESTCASE(16, TestStdLibIsAlphaNumeric); - TESTCASE(17, TestStdLibIsPrint); - TESTCASE(18, TestStdLibIsControl); - TESTCASE(19, TestStdLibToLower); - TESTCASE(20, TestStdLibToUpper); - TESTCASE(21, TestStdLibIsWhiteSpace); + TESTCASE(1, TestIsUpper); + TESTCASE(2, TestIsLower); + TESTCASE(3, TestIsDigit); + TESTCASE(4, TestIsSpace); + TESTCASE(5, TestIsAlphaNumeric); + TESTCASE(6, TestIsPrint); + TESTCASE(7, TestIsControl); + TESTCASE(8, TestToLower); + TESTCASE(9, TestToUpper); + TESTCASE(10, TestIsWhiteSpace); + TESTCASE(11, TestStdLibIsAlpha); + TESTCASE(12, TestStdLibIsUpper); + TESTCASE(13, TestStdLibIsLower); + TESTCASE(14, TestStdLibIsDigit); + TESTCASE(15, TestStdLibIsSpace); + TESTCASE(16, TestStdLibIsAlphaNumeric); + TESTCASE(17, TestStdLibIsPrint); + TESTCASE(18, TestStdLibIsControl); + TESTCASE(19, TestStdLibToLower); + TESTCASE(20, TestStdLibToUpper); + TESTCASE(21, TestStdLibIsWhiteSpace); default: name = ""; return NULL; @@ -125,131 +125,131 @@ UPerfFunction* CharPerformanceTest::runIndexedTest(int32_t index, UBool exec, UPerfFunction* CharPerformanceTest::TestIsAlpha() { - return new CharPerfFunction(isAlpha, MIN_, MAX_); + return new CharPerfFunction(isAlpha, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestIsUpper() { - return new CharPerfFunction(isUpper, MIN_, MAX_); + return new CharPerfFunction(isUpper, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestIsLower() { - return new CharPerfFunction(isLower, MIN_, MAX_); + return new CharPerfFunction(isLower, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestIsDigit() { - return new CharPerfFunction(isDigit, MIN_, MAX_); + return new CharPerfFunction(isDigit, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestIsSpace() { - return new CharPerfFunction(isSpace, MIN_, MAX_); + return new CharPerfFunction(isSpace, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestIsAlphaNumeric() { - return new CharPerfFunction(isAlphaNumeric, MIN_, MAX_); + return new CharPerfFunction(isAlphaNumeric, MIN_, MAX_); } /** - * This test may be different since c lib has a type PUNCT and it is printable. - * iswgraph is not used for testing since it is a subset of iswprint with the - * exception of returning true for white spaces. no match found in icu4c. - */ +* This test may be different since c lib has a type PUNCT and it is printable. +* iswgraph is not used for testing since it is a subset of iswprint with the +* exception of returning true for white spaces. no match found in icu4c. +*/ UPerfFunction* CharPerformanceTest::TestIsPrint() { - return new CharPerfFunction(isPrint, MIN_, MAX_); + return new CharPerfFunction(isPrint, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestIsControl() { - return new CharPerfFunction(isControl, MIN_, MAX_); + return new CharPerfFunction(isControl, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestToLower() { - return new CharPerfFunction(toLower, MIN_, MAX_); + return new CharPerfFunction(toLower, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestToUpper() { - return new CharPerfFunction(toUpper, MIN_, MAX_); + return new CharPerfFunction(toUpper, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestIsWhiteSpace() { - return new CharPerfFunction(isWhiteSpace, MIN_, MAX_); + return new CharPerfFunction(isWhiteSpace, MIN_, MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibIsAlpha() { - return new StdLibCharPerfFunction(StdLibIsAlpha, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsAlpha, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibIsUpper() { - return new StdLibCharPerfFunction(StdLibIsUpper, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsUpper, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibIsLower() { - return new StdLibCharPerfFunction(StdLibIsLower, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsLower, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibIsDigit() { - return new StdLibCharPerfFunction(StdLibIsDigit, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsDigit, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibIsSpace() { - return new StdLibCharPerfFunction(StdLibIsSpace, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsSpace, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibIsAlphaNumeric() { - return new StdLibCharPerfFunction(StdLibIsAlphaNumeric, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsAlphaNumeric, (wchar_t)MIN_, + (wchar_t)MAX_); } /** - * This test may be different since c lib has a type PUNCT and it is printable. - * iswgraph is not used for testing since it is a subset of iswprint with the - * exception of returning true for white spaces. no match found in icu4c. - */ +* This test may be different since c lib has a type PUNCT and it is printable. +* iswgraph is not used for testing since it is a subset of iswprint with the +* exception of returning true for white spaces. no match found in icu4c. +*/ UPerfFunction* CharPerformanceTest::TestStdLibIsPrint() { - return new StdLibCharPerfFunction(StdLibIsPrint, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsPrint, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibIsControl() { - return new StdLibCharPerfFunction(StdLibIsControl, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsControl, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibToLower() { - return new StdLibCharPerfFunction(StdLibToLower, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibToLower, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibToUpper() { - return new StdLibCharPerfFunction(StdLibToUpper, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibToUpper, (wchar_t)MIN_, + (wchar_t)MAX_); } UPerfFunction* CharPerformanceTest::TestStdLibIsWhiteSpace() { - return new StdLibCharPerfFunction(StdLibIsWhiteSpace, (wchar_t)MIN_, - (wchar_t)MAX_); + return new StdLibCharPerfFunction(StdLibIsWhiteSpace, (wchar_t)MIN_, + (wchar_t)MAX_); } diff --git a/Build/source/libs/icu-xetex/test/perf/charperf/charperf.h b/Build/source/libs/icu-xetex/test/perf/charperf/charperf.h index 8d892cb0a3a..e23785f84cb 100644 --- a/Build/source/libs/icu-xetex/test/perf/charperf/charperf.h +++ b/Build/source/libs/icu-xetex/test/perf/charperf/charperf.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2005, International Business Machines +* Copyright (c) 2002-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** ********************************************************************** @@ -22,98 +22,98 @@ typedef void (*StdLibCharPerfFn)(wchar_t ch); class CharPerfFunction : public UPerfFunction { public: - virtual void call(UErrorCode* status) - { - for (UChar32 i = MIN_; i < MAX_; i ++) { - (*m_fn_)(i); - } - } - - virtual long getOperationsPerIteration() - { - return MAX_ - MIN_; - } - CharPerfFunction(CharPerfFn func, UChar32 min, UChar32 max) - { - m_fn_ = func; - MIN_ = min; - MAX_ = max; - } + virtual void call(UErrorCode* status) + { + for (UChar32 i = MIN_; i < MAX_; i ++) { + (*m_fn_)(i); + } + } + + virtual long getOperationsPerIteration() + { + return MAX_ - MIN_; + } + CharPerfFunction(CharPerfFn func, UChar32 min, UChar32 max) + { + m_fn_ = func; + MIN_ = min; + MAX_ = max; + } private: - CharPerfFn m_fn_; - UChar32 MIN_; - UChar32 MAX_; + CharPerfFn m_fn_; + UChar32 MIN_; + UChar32 MAX_; }; class StdLibCharPerfFunction : public UPerfFunction { public: - virtual void call(UErrorCode* status) - { - // note wchar_t is unsigned, it will revert to 0 once it reaches - // 65535 - for (wchar_t i = MIN_; i < MAX_; i ++) { - (*m_fn_)(i); - } - } - - virtual long getOperationsPerIteration() - { - return MAX_ - MIN_; - } - - StdLibCharPerfFunction(StdLibCharPerfFn func, wchar_t min, wchar_t max) - { - m_fn_ = func; - MIN_ = min; - MAX_ = max; - } - - ~StdLibCharPerfFunction() - { - } + virtual void call(UErrorCode* status) + { + // note wchar_t is unsigned, it will revert to 0 once it reaches + // 65535 + for (wchar_t i = MIN_; i < MAX_; i ++) { + (*m_fn_)(i); + } + } + + virtual long getOperationsPerIteration() + { + return MAX_ - MIN_; + } + + StdLibCharPerfFunction(StdLibCharPerfFn func, wchar_t min, wchar_t max) + { + m_fn_ = func; + MIN_ = min; + MAX_ = max; + } + + ~StdLibCharPerfFunction() + { + } private: - StdLibCharPerfFn m_fn_; - wchar_t MIN_; - wchar_t MAX_; + StdLibCharPerfFn m_fn_; + wchar_t MIN_; + wchar_t MAX_; }; class CharPerformanceTest : public UPerfTest { public: - CharPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status); - ~CharPerformanceTest(); - virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, - const char *&name, - char *par = NULL); - UPerfFunction* TestIsAlpha(); - UPerfFunction* TestIsUpper(); - UPerfFunction* TestIsLower(); - UPerfFunction* TestIsDigit(); - UPerfFunction* TestIsSpace(); - UPerfFunction* TestIsAlphaNumeric(); - UPerfFunction* TestIsPrint(); - UPerfFunction* TestIsControl(); - UPerfFunction* TestToLower(); - UPerfFunction* TestToUpper(); - UPerfFunction* TestIsWhiteSpace(); - UPerfFunction* TestStdLibIsAlpha(); - UPerfFunction* TestStdLibIsUpper(); - UPerfFunction* TestStdLibIsLower(); - UPerfFunction* TestStdLibIsDigit(); - UPerfFunction* TestStdLibIsSpace(); - UPerfFunction* TestStdLibIsAlphaNumeric(); - UPerfFunction* TestStdLibIsPrint(); - UPerfFunction* TestStdLibIsControl(); - UPerfFunction* TestStdLibToLower(); - UPerfFunction* TestStdLibToUpper(); - UPerfFunction* TestStdLibIsWhiteSpace(); + CharPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status); + ~CharPerformanceTest(); + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, + const char *&name, + char *par = NULL); + UPerfFunction* TestIsAlpha(); + UPerfFunction* TestIsUpper(); + UPerfFunction* TestIsLower(); + UPerfFunction* TestIsDigit(); + UPerfFunction* TestIsSpace(); + UPerfFunction* TestIsAlphaNumeric(); + UPerfFunction* TestIsPrint(); + UPerfFunction* TestIsControl(); + UPerfFunction* TestToLower(); + UPerfFunction* TestToUpper(); + UPerfFunction* TestIsWhiteSpace(); + UPerfFunction* TestStdLibIsAlpha(); + UPerfFunction* TestStdLibIsUpper(); + UPerfFunction* TestStdLibIsLower(); + UPerfFunction* TestStdLibIsDigit(); + UPerfFunction* TestStdLibIsSpace(); + UPerfFunction* TestStdLibIsAlphaNumeric(); + UPerfFunction* TestStdLibIsPrint(); + UPerfFunction* TestStdLibIsControl(); + UPerfFunction* TestStdLibToLower(); + UPerfFunction* TestStdLibToUpper(); + UPerfFunction* TestStdLibIsWhiteSpace(); private: - UChar32 MIN_; - UChar32 MAX_; + UChar32 MIN_; + UChar32 MAX_; }; inline void isAlpha(UChar32 ch) @@ -123,117 +123,117 @@ inline void isAlpha(UChar32 ch) inline void isUpper(UChar32 ch) { - u_isupper(ch); + u_isupper(ch); } inline void isLower(UChar32 ch) { - u_islower(ch); + u_islower(ch); } inline void isDigit(UChar32 ch) { - u_isdigit(ch); + u_isdigit(ch); } inline void isSpace(UChar32 ch) { - u_isspace(ch); + u_isspace(ch); } inline void isAlphaNumeric(UChar32 ch) { - u_isalnum(ch); + u_isalnum(ch); } /** - * This test may be different since c lib has a type PUNCT and it is printable. - * iswgraph is not used for testing since it is a subset of iswprint with the - * exception of returning true for white spaces. no match found in icu4c. - */ +* This test may be different since c lib has a type PUNCT and it is printable. +* iswgraph is not used for testing since it is a subset of iswprint with the +* exception of returning true for white spaces. no match found in icu4c. +*/ inline void isPrint(UChar32 ch) { - u_isprint(ch); + u_isprint(ch); } inline void isControl(UChar32 ch) { - u_iscntrl(ch); + u_iscntrl(ch); } inline void toLower(UChar32 ch) { - u_tolower(ch); + u_tolower(ch); } inline void toUpper(UChar32 ch) { - u_toupper(ch); + u_toupper(ch); } inline void isWhiteSpace(UChar32 ch) { - u_isWhitespace(ch); + u_isWhitespace(ch); } inline void StdLibIsAlpha(wchar_t ch) { - iswalpha(ch); + iswalpha(ch); } inline void StdLibIsUpper(wchar_t ch) { - iswupper(ch); + iswupper(ch); } inline void StdLibIsLower(wchar_t ch) { - iswlower(ch); + iswlower(ch); } inline void StdLibIsDigit(wchar_t ch) { - iswdigit(ch); + iswdigit(ch); } inline void StdLibIsSpace(wchar_t ch) { - iswspace(ch); + iswspace(ch); } inline void StdLibIsAlphaNumeric(wchar_t ch) { - iswalnum(ch); + iswalnum(ch); } /** - * This test may be different since c lib has a type PUNCT and it is printable. - * iswgraph is not used for testing since it is a subset of iswprint with the - * exception of returning true for white spaces. no match found in icu4c. - */ +* This test may be different since c lib has a type PUNCT and it is printable. +* iswgraph is not used for testing since it is a subset of iswprint with the +* exception of returning true for white spaces. no match found in icu4c. +*/ inline void StdLibIsPrint(wchar_t ch) { - iswprint(ch); + iswprint(ch); } inline void StdLibIsControl(wchar_t ch) { - iswcntrl(ch); + iswcntrl(ch); } inline void StdLibToLower(wchar_t ch) { - towlower(ch); + towlower(ch); } inline void StdLibToUpper(wchar_t ch) { - towupper(ch); + towupper(ch); } inline void StdLibIsWhiteSpace(wchar_t ch) { - iswspace(ch); + iswspace(ch); } #endif // CHARPERF_H diff --git a/Build/source/libs/icu-xetex/test/perf/collperf/.cvsignore b/Build/source/libs/icu-xetex/test/perf/collperf/.cvsignore new file mode 100644 index 00000000000..cea629d988e --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/collperf/.cvsignore @@ -0,0 +1,6 @@ +*.d +*.o +collperf +Debug +Release +Makefile diff --git a/Build/source/libs/icu-xetex/test/perf/collperf/CollPerf.pl b/Build/source/libs/icu-xetex/test/perf/collperf/CollPerf.pl new file mode 100755 index 00000000000..78c69f3549c --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/collperf/CollPerf.pl @@ -0,0 +1,82 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2005, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Collation performance: ICU,POSIX,and Win", + "headers"=>"ICU_POSIX_WIN", + "operationIs"=>"unicode String", + "passes"=>"1", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"../data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "debug/collperf.exe "; + +my $tests = { + "Key Gen ICU null", ["$p TestIcu_KeyGen_null"], + "Key Gen ICU len", ["$p TestIcu_KeyGen_len"], + "Key Gen POSIX", ["$p TestPosix_KeyGen_null"], + "Key Gen Win", ["$p TestWin_KeyGen_null"], + "Iteration icu forward null", ["$p TestIcu_ForwardIter_null"], + "Iteration icu forward len", ["$p TestIcu_ForwardIter_len"], + "Iteration icu backward null", ["$p TestIcu_BackwardIter_null"], + "Iteration icu backward len", ["$p TestIcu_BackwardIter_len"], + "Iteration/all icu forward null", ["$p TestIcu_ForwardIter_all_null"], + "Iteration/all icu forward len", ["$p TestIcu_ForwardIter_all_len"], + "Iteration/all icu backward null", ["$p TestIcu_BackwardIter_all_null"], + "Iteration/all icu backward len", ["$p TestIcu_BackwardIter_all_len"], + "qsort icu strcoll null", ["$p TestIcu_qsort_strcoll_null"], + "qsort icu strcoll len", ["$p TestIcu_qsort_strcoll_len"], + "qsort icu use key", ["$p TestIcu_qsort_usekey"], + "qsort posix strcoll null", ["$p TestPosix_qsort_strcoll_null"], + "qsort posix use key", ["$p TestPosix_qsort_usekey"], + "qsort win CompareStringW null", ["$p TestWin_qsort_CompareStringW_null"], + "qsort win CompareStringW len", ["$p TestWin_qsort_CompareStringW_len"], + "qsort win use key", ["$p TestWin_qsort_usekey"], + "Binary Search icu strcoll null", ["$p TestIcu_BinarySearch_strcoll_null"], + "Binary Search icu strcoll len", ["$p TestIcu_BinarySearch_strcoll_len"], + "Binary Search icu use key", ["$p TestIcu_BinarySearch_usekey"], + "Binary Search icu u_strcmp", ["$p TestIcu_BinarySearch_strcmp"], + "Binary Search icu cmpCPO", ["$p TestIcu_BinarySearch_cmpCPO"], + "Binary Search posix strcoll null", ["$p TestPosix_BinarySearch_strcoll_null"], + "Binary Search posix use key", ["$p TestPosix_BinarySearch_usekey"], + "Binary Search win CompareStringW null", ["$p TestWin_BinarySearch_CompareStringW_null"], + "Binary Search win CompareStringW len", ["$p TestWin_BinarySearch_CompareStringW_len"], + "Binary Search win use key", ["$p TestWin_BinarySearch_usekey"], + "Binary Search win wcscmp", ["$p TestWin_BinarySearch_wcscmp"], + }; + +my $dataFiles = { + "", + [ + "TestNames_Asian.txt", +# "TestNames_Chinese.txt", +# "TestNames_Japanese.txt", +# "TestNames_Japanese_h.txt", +# "TestNames_Japanese_k.txt", +# "TestNames_Korean.txt", +# "TestNames_Latin.txt", +# "Testnames_Russian.txt", +# "TestNames_SerbianSH.txt", +# "TestNames_SerbianSR.txt", +# "TestNames_Simplified_Chinese.txt", +# "TestNames_Thai.txt" + ] + }; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu-xetex/test/collperf/Makefile.in b/Build/source/libs/icu-xetex/test/perf/collperf/Makefile.in index bca32116de0..46e509a12fe 100644 --- a/Build/source/libs/icu-xetex/test/collperf/Makefile.in +++ b/Build/source/libs/icu-xetex/test/perf/collperf/Makefile.in @@ -1,20 +1,17 @@ -## Makefile.in for ICU - test/collperf -## Copyright (c) 2001, International Business Machines Corporation and +## Makefile.in for ICU - test/perf/collperf +## Copyright (c) 2001-2006, International Business Machines Corporation and ## others. All Rights Reserved. ## Source directory information srcdir = @srcdir@ top_srcdir = @top_srcdir@ -top_builddir = ../.. +top_builddir = ../../.. include $(top_builddir)/icudefs.mk -## Platform-specific setup -include @platform_make_fragment@ - ## Build directory information -subdir = test/collperf +subdir = test/perf/collperf ## Extra files to remove for 'make clean' CLEANFILES = *~ $(DEPS) @@ -22,16 +19,8 @@ CLEANFILES = *~ $(DEPS) ## Target information TARGET = collperf -DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -CFLAGS = @CFLAGS@ -CXXFLAGS = @CXXFLAGS@ -ENABLE_RPATH = @ENABLE_RPATH@ -ifeq ($(ENABLE_RPATH),YES) -RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) -endif -LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) -LIBS = $(LIBICUI18N) $(LIBICUUC) @LIBS@ @LIB_M@ +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) OBJECTS = collperf.o diff --git a/Build/source/libs/icu-xetex/test/perf/collperf/collperf.cpp b/Build/source/libs/icu-xetex/test/perf/collperf/collperf.cpp new file mode 100644 index 00000000000..6dd508ba6d2 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/collperf/collperf.cpp @@ -0,0 +1,879 @@ +/******************************************************************** +* COPYRIGHT: +* Copyright (C) 2001-2006 IBM, Inc. All Rights Reserved. +* +********************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include <locale.h> +#include <limits.h> +#include <string.h> +#include "unicode/uperf.h" +#include "uoptions.h" +#include "unicode/coll.h" +#include <unicode/ucoleitr.h> + + + +/* To store an array of string<UNIT> in continue space. +Since string<UNIT> itself is treated as an array of UNIT, this +class will ease our memory management for an array of string<UNIT>. +*/ + +//template<typename UNIT> +#define COMPATCT_ARRAY(CompactArrays, UNIT) \ +struct CompactArrays{\ + CompactArrays(const CompactArrays & );\ + CompactArrays & operator=(const CompactArrays & );\ + int32_t count;/*total number of the strings*/ \ + int32_t * index;/*relative offset in data*/ \ + UNIT * data; /*the real space to hold strings*/ \ + \ + ~CompactArrays(){free(index);free(data);} \ + CompactArrays():data(NULL), index(NULL), count(0){ \ + index = (int32_t *) realloc(index, sizeof(int32_t)); \ + index[0] = 0; \ + } \ + void append_one(int32_t theLen){ /*include terminal NULL*/ \ + count++; \ + index = (int32_t *) realloc(index, sizeof(int32_t) * (count + 1)); \ + index[count] = index[count - 1] + theLen; \ + data = (UNIT *) realloc(data, sizeof(UNIT) * index[count]); \ + } \ + UNIT * last(){return data + index[count - 1];} \ + UNIT * dataOf(int32_t i){return data + index[i];} \ + int32_t lengthOf(int i){return index[i+1] - index[i] - 1; } /*exclude terminating NULL*/ \ +}; + +//typedef CompactArrays<UChar> CA_uchar; +//typedef CompactArrays<char> CA_char; +//typedef CompactArrays<uint8_t> CA_uint8; +//typedef CompactArrays<WCHAR> CA_win_wchar; + +COMPATCT_ARRAY(CA_uchar, UChar) +COMPATCT_ARRAY(CA_char, char) +COMPATCT_ARRAY(CA_uint8, uint8_t) +COMPATCT_ARRAY(CA_win_wchar, WCHAR) + + +struct DataIndex { + static DWORD win_langid; // for qsort callback function + static UCollator * col; // for qsort callback function + uint8_t * icu_key; + UChar * icu_data; + int32_t icu_data_len; + char* posix_key; + char* posix_data; + int32_t posix_data_len; + char* win_key; + WCHAR * win_data; + int32_t win_data_len; +}; +DWORD DataIndex::win_langid; +UCollator * DataIndex::col; + + + +class CmdKeyGen : public UPerfFunction { + typedef void (CmdKeyGen::* Func)(int32_t); + enum{MAX_KEY_LENGTH = 5000}; + UCollator * col; + DWORD win_langid; + int32_t count; + DataIndex * data; + Func fn; + + union { // to save sapce + uint8_t icu_key[MAX_KEY_LENGTH]; + char posix_key[MAX_KEY_LENGTH]; + WCHAR win_key[MAX_KEY_LENGTH]; + }; +public: + CmdKeyGen(UErrorCode, UCollator * col,DWORD win_langid, int32_t count, DataIndex * data,Func fn,int32_t) + :col(col),win_langid(win_langid), count(count), data(data), fn(fn){} + + virtual long getOperationsPerIteration(){return count;} + + virtual void call(UErrorCode* status){ + for(int32_t i = 0; i< count; i++){ + (this->*fn)(i); + } + } + + void icu_key_null(int32_t i){ + ucol_getSortKey(col, data[i].icu_data, -1, icu_key, MAX_KEY_LENGTH); + } + + void icu_key_len(int32_t i){ + ucol_getSortKey(col, data[i].icu_data, data[i].icu_data_len, icu_key, MAX_KEY_LENGTH); + } + + // pre-generated in CollPerfTest::prepareData(), need not to check error here + void win_key_null(int32_t i){ + //LCMAP_SORTsk 0x00000400 // WC sort sk (normalize) + LCMapStringW(win_langid, LCMAP_SORTKEY, data[i].win_data, -1, win_key, MAX_KEY_LENGTH); + } + + void win_key_len(int32_t i){ + LCMapStringW(win_langid, LCMAP_SORTKEY, data[i].win_data, data[i].win_data_len, win_key, MAX_KEY_LENGTH); + } + + void posix_key_null(int32_t i){ + strxfrm(posix_key, data[i].posix_data, MAX_KEY_LENGTH); + } +}; + + +class CmdIter : public UPerfFunction { + typedef void (CmdIter::* Func)(UErrorCode* , int32_t ); + int32_t count; + CA_uchar * data; + Func fn; + UCollationElements *iter; + int32_t exec_count; +public: + CmdIter(UErrorCode & status, UCollator * col, int32_t count, CA_uchar *data, Func fn, int32_t,int32_t) + :count(count), data(data), fn(fn){ + exec_count = 0; + UChar dummytext[] = {0, 0}; + iter = ucol_openElements(col, NULL, 0, &status); + ucol_setText(iter, dummytext, 1, &status); + } + ~CmdIter(){ + ucol_closeElements(iter); + } + + virtual long getOperationsPerIteration(){return exec_count ? exec_count : 1;} + + virtual void call(UErrorCode* status){ + exec_count = 0; + for(int32_t i = 0; i< count; i++){ + (this->*fn)(status, i); + } + } + + void icu_forward_null(UErrorCode* status, int32_t i){ + ucol_setText(iter, data->dataOf(i), -1, status); + while (ucol_next(iter, status) != UCOL_NULLORDER) exec_count++; + } + + void icu_forward_len(UErrorCode* status, int32_t i){ + ucol_setText(iter, data->dataOf(i), data->lengthOf(i) , status); + while (ucol_next(iter, status) != UCOL_NULLORDER) exec_count++; + } + + void icu_backward_null(UErrorCode* status, int32_t i){ + ucol_setText(iter, data->dataOf(i), -1, status); + while (ucol_previous(iter, status) != UCOL_NULLORDER) exec_count++; + } + + void icu_backward_len(UErrorCode* status, int32_t i){ + ucol_setText(iter, data->dataOf(i), data->lengthOf(i) , status); + while (ucol_previous(iter, status) != UCOL_NULLORDER) exec_count++; + } +}; + +class CmdIterAll : public UPerfFunction { + typedef void (CmdIterAll::* Func)(UErrorCode* status); + int32_t count; + UChar * data; + Func fn; + UCollationElements *iter; + int32_t exec_count; + +public: + enum CALL {forward_null, forward_len, backward_null, backward_len}; + + ~CmdIterAll(){ + ucol_closeElements(iter); + } + CmdIterAll(UErrorCode & status, UCollator * col, int32_t count, UChar * data, CALL call,int32_t,int32_t) + :count(count),data(data){ + exec_count = 0; + if (call == forward_null || call == backward_null) { + iter = ucol_openElements(col, data, -1, &status); + } else { + iter = ucol_openElements(col, data, count, &status); + } + + if (call == forward_null || call == forward_len){ + fn = icu_forward_all; + } else { + fn = icu_backward_all; + } + } + virtual long getOperationsPerIteration(){return exec_count ? exec_count : 1;} + + virtual void call(UErrorCode* status){ + (this->*fn)(status); + } + + void icu_forward_all(UErrorCode* status){ + int strlen = count - 5; + int count5 = 5; + int strindex = 0; + ucol_setOffset(iter, strindex, status); + while (TRUE) { + if (ucol_next(iter, status) == UCOL_NULLORDER) { + break; + } + exec_count++; + count5 --; + if (count5 == 0) { + strindex += 10; + if (strindex > strlen) { + break; + } + ucol_setOffset(iter, strindex, status); + count5 = 5; + } + } + } + + void icu_backward_all(UErrorCode* status){ + int strlen = count; + int count5 = 5; + int strindex = 5; + ucol_setOffset(iter, strindex, status); + while (TRUE) { + if (ucol_previous(iter, status) == UCOL_NULLORDER) { + break; + } + exec_count++; + count5 --; + if (count5 == 0) { + strindex += 10; + if (strindex > strlen) { + break; + } + ucol_setOffset(iter, strindex, status); + count5 = 5; + } + } + } + +}; + +struct CmdQsort : public UPerfFunction{ + + static int q_random(const void * a, const void * b){ + uint8_t * key_a = ((DataIndex *)a)->icu_key; + uint8_t * key_b = ((DataIndex *)b)->icu_key; + + int val_a = 0; + int val_b = 0; + while (*key_a != 0) {val_a += val_a*37 + *key_a++;} + while (*key_b != 0) {val_b += val_b*37 + *key_b++;} + return val_a - val_b; + } + +#define QCAST() \ + DataIndex * da = (DataIndex *) a; \ + DataIndex * db = (DataIndex *) b; \ + ++exec_count + + static int icu_strcoll_null(const void *a, const void *b){ + QCAST(); + return ucol_strcoll(da->col, da->icu_data, -1, db->icu_data, -1) - UCOL_EQUAL; + } + + static int icu_strcoll_len(const void *a, const void *b){ + QCAST(); + return ucol_strcoll(da->col, da->icu_data, da->icu_data_len, db->icu_data, db->icu_data_len) - UCOL_EQUAL; + } + + static int icu_cmpkey (const void *a, const void *b){ + QCAST(); + return strcmp((char *) da->icu_key, (char *) db->icu_key); + } + + static int win_cmp_null(const void *a, const void *b) { + QCAST(); + //CSTR_LESS_THAN 1 + //CSTR_EQUAL 2 + //CSTR_GREATER_THAN 3 + int t = CompareStringW(da->win_langid, 0, da->win_data, -1, db->win_data, -1); + if (t == 0){ + fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError()); + exit(-1); + } else{ + return t - CSTR_EQUAL; + } + } + + static int win_cmp_len(const void *a, const void *b) { + QCAST(); + int t = CompareStringW(da->win_langid, 0, da->win_data, da->win_data_len, db->win_data, db->win_data_len); + if (t == 0){ + fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError()); + exit(-1); + } else{ + return t - CSTR_EQUAL; + } + } + +#define QFUNC(name, func, data) \ + static int name (const void *a, const void *b){ \ + QCAST(); \ + return func(da->data, db->data); \ + } + + QFUNC(posix_strcoll_null, strcoll, posix_data) + QFUNC(posix_cmpkey, strcmp, posix_key) + QFUNC(win_cmpkey, strcmp, win_key) + QFUNC(win_wcscmp, wcscmp, win_data) + QFUNC(icu_strcmp, u_strcmp, icu_data) + QFUNC(icu_cmpcpo, u_strcmpCodePointOrder, icu_data) + +private: + static int32_t exec_count; // potential muilt-thread problem + + typedef int (* Func)(const void *, const void *); + + Func fn; + void * base; //Start of target array. + int32_t num; //Array size in elements. + int32_t width; //Element size in bytes. + + void * backup; //copy source of base +public: + CmdQsort(UErrorCode & status,void *theBase, int32_t num, int32_t width, Func fn, int32_t,int32_t) + :backup(theBase),num(num),width(width),fn(fn){ + base = malloc(num * width); + time_empty(100, &status); // warm memory/cache + } + + ~CmdQsort(){ + free(base); + } + + void empty_call(){ + exec_count = 0; + memcpy(base, backup, num * width); + } + + double time_empty(int32_t n, UErrorCode* status) { + UTimer start, stop; + utimer_getTime(&start); + while (n-- > 0) { + empty_call(); + } + utimer_getTime(&stop); + return utimer_getDeltaSeconds(&start,&stop); // ms + } + + virtual void call(UErrorCode* status){ + exec_count = 0; + memcpy(base, backup, num * width); + qsort(base, num, width, fn); + } + virtual double time(int32_t n, UErrorCode* status) { + double t1 = time_empty(n,status); + double t2 = UPerfFunction::time(n, status); + return t2-t1;// < 0 ? t2 : t2-t1; + } + + virtual long getOperationsPerIteration(){ return exec_count?exec_count:1;} +}; +int32_t CmdQsort::exec_count; + + +class CmdBinSearch : public UPerfFunction{ +public: + typedef int (CmdBinSearch::* Func)(int, int); + + UCollator * col; + DWORD win_langid; + int32_t count; + DataIndex * rnd; + DataIndex * ord; + Func fn; + int32_t exec_count; + + CmdBinSearch(UErrorCode, UCollator * col,DWORD win_langid,int32_t count,DataIndex * rnd,DataIndex * ord,Func fn) + :col(col),win_langid(win_langid), count(count), rnd(rnd), ord(ord), fn(fn),exec_count(0){} + + + virtual void call(UErrorCode* status){ + exec_count = 0; + for(int32_t i = 0; i< count; i++){ // search all data + binary_search(i); + } + } + virtual long getOperationsPerIteration(){ return exec_count?exec_count:1;} + + void binary_search(int32_t random) { + int low = 0; + int high = count - 1; + int guess; + int last_guess = -1; + int r; + while (TRUE) { + guess = (high + low)/2; + if (last_guess == guess) break; // nothing to search + + r = (this->*fn)(random, guess); + exec_count++; + + if (r == 0) + return; // found, search end. + if (r < 0) { + high = guess; + } else { + low = guess; + } + last_guess = guess; + } + } + + int icu_strcoll_null(int32_t i, int32_t j){ + return ucol_strcoll(col, rnd[i].icu_data, -1, ord[j].icu_data,-1); + } + + int icu_strcoll_len(int32_t i, int32_t j){ + return ucol_strcoll(col, rnd[i].icu_data, rnd[i].icu_data_len, ord[j].icu_data, ord[j].icu_data_len); + } + + int icu_cmpkey(int32_t i, int32_t j) { + return strcmp( (char *) rnd[i].icu_key, (char *) ord[j].icu_key ); + } + + int win_cmp_null(int32_t i, int32_t j) { + int t = CompareStringW(win_langid, 0, rnd[i].win_data, -1, ord[j].win_data, -1); + if (t == 0){ + fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError()); + exit(-1); + } else{ + return t - CSTR_EQUAL; + } + } + + int win_cmp_len(int32_t i, int32_t j) { + int t = CompareStringW(win_langid, 0, rnd[i].win_data, rnd[i].win_data_len, ord[j].win_data, ord[j].win_data_len); + if (t == 0){ + fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError()); + exit(-1); + } else{ + return t - CSTR_EQUAL; + } + } + +#define BFUNC(name, func, data) \ + int name(int32_t i, int32_t j) { \ + return func(rnd[i].data, ord[j].data); \ + } + + BFUNC(posix_strcoll_null, strcoll, posix_data) + BFUNC(posix_cmpkey, strcmp, posix_key) + BFUNC(win_cmpkey, strcmp, win_key) + BFUNC(win_wcscmp, wcscmp, win_data) + BFUNC(icu_strcmp, u_strcmp, icu_data) + BFUNC(icu_cmpcpo, u_strcmpCodePointOrder, icu_data) +}; + +class CollPerfTest : public UPerfTest { +public: + UCollator * col; + DWORD win_langid; + + UChar * icu_data_all; + int32_t icu_data_all_len; + + int32_t count; + CA_uchar * icu_data; + CA_uint8 * icu_key; + CA_char * posix_data; + CA_char * posix_key; + CA_win_wchar * win_data; + CA_char * win_key; + + DataIndex * rnd_index; // random by icu key + DataIndex * ord_win_data; + DataIndex * ord_win_key; + DataIndex * ord_posix_data; + DataIndex * ord_posix_key; + DataIndex * ord_icu_data; + DataIndex * ord_icu_key; + DataIndex * ord_win_wcscmp; + DataIndex * ord_icu_strcmp; + DataIndex * ord_icu_cmpcpo; + + virtual ~CollPerfTest(){ + ucol_close(col); + delete [] icu_data_all; + delete icu_data; + delete icu_key; + delete posix_data; + delete posix_key; + delete win_data; + delete win_key; + delete[] rnd_index; + delete[] ord_win_data; + delete[] ord_win_key; + delete[] ord_posix_data; + delete[] ord_posix_key; + delete[] ord_icu_data; + delete[] ord_icu_key; + delete[] ord_win_wcscmp; + delete[] ord_icu_strcmp; + delete[] ord_icu_cmpcpo; + } + + CollPerfTest(int32_t argc, const char* argv[], UErrorCode& status):UPerfTest(argc, argv, status){ + col = NULL; + icu_data_all = NULL; + icu_data = NULL; + icu_key = NULL; + posix_data = NULL; + posix_key = NULL; + win_data =NULL; + win_key = NULL; + + rnd_index = NULL; + ord_win_data= NULL; + ord_win_key= NULL; + ord_posix_data= NULL; + ord_posix_key= NULL; + ord_icu_data= NULL; + ord_icu_key= NULL; + ord_win_wcscmp = NULL; + ord_icu_strcmp = NULL; + ord_icu_cmpcpo = NULL; + + if (U_FAILURE(status)){ + return; + } + + // Parse additional arguments + + UOption options[] = { + UOPTION_DEF("langid", 'i', UOPT_REQUIRES_ARG), // Windows Language ID number. + UOPTION_DEF("rulefile", 'r', UOPT_REQUIRES_ARG), // --rulefile <filename> + // Collation related arguments. All are optional. + // To simplify parsing, two choice arguments are disigned as NO_ARG. + // The default value is UPPER word in the comment + UOPTION_DEF("c_french", 'f', UOPT_NO_ARG), // --french <on | OFF> + UOPTION_DEF("c_alternate", 'a', UOPT_NO_ARG), // --alternate <NON_IGNORE | shifted> + UOPTION_DEF("c_casefirst", 'c', UOPT_REQUIRES_ARG), // --casefirst <lower | upper | OFF> + UOPTION_DEF("c_caselevel", 'l', UOPT_NO_ARG), // --caselevel <on | OFF> + UOPTION_DEF("c_normal", 'n', UOPT_NO_ARG), // --normal <on | OFF> + UOPTION_DEF("c_strength", 's', UOPT_REQUIRES_ARG), // --strength <1-5> + }; + int32_t opt_len = (sizeof(options)/sizeof(options[0])); + enum {i, r,f,a,c,l,n,s}; // The buffer between the option items' order and their references + + _remainingArgc = u_parseArgs(_remainingArgc, (char**)argv, opt_len, options); + + if (_remainingArgc < 0){ + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + + if (locale == NULL){ + locale = "en_US"; // set default locale + } + + //#ifdef U_WINDOWS + if (options[i].doesOccur) { + char *endp; + int tmp = strtol(options[i].value, &endp, 0); + if (endp == options[i].value) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + win_langid = MAKELCID(tmp, SORT_DEFAULT); + } else { + win_langid = uloc_getLCID(locale); + } + //#endif + + // Set up an ICU collator + if (options[r].doesOccur) { + // TODO: implement it + } else { + col = ucol_open(locale, &status); + if (U_FAILURE(status)) { + return; + } + } + + if (options[f].doesOccur) { + ucol_setAttribute(col, UCOL_FRENCH_COLLATION, UCOL_ON, &status); + } else { + ucol_setAttribute(col, UCOL_FRENCH_COLLATION, UCOL_OFF, &status); + } + + if (options[a].doesOccur) { + ucol_setAttribute(col, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status); + } + + if (options[c].doesOccur) { // strcmp() has i18n encoding problem + if (strcmp("lower", options[c].value) == 0){ + ucol_setAttribute(col, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, &status); + } else if (strcmp("upper", options[c].value) == 0) { + ucol_setAttribute(col, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, &status); + } else { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + } + + if (options[l].doesOccur){ + ucol_setAttribute(col, UCOL_CASE_LEVEL, UCOL_ON, &status); + } + + if (options[n].doesOccur){ + ucol_setAttribute(col, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); + } + + if (options[s].doesOccur) { + char *endp; + int tmp = strtol(options[l].value, &endp, 0); + if (endp == options[l].value) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + switch (tmp) { + case 1: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_PRIMARY, &status); break; + case 2: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_SECONDARY, &status); break; + case 3: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_TERTIARY, &status); break; + case 4: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_QUATERNARY, &status); break; + case 5: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_IDENTICAL, &status); break; + default: status = U_ILLEGAL_ARGUMENT_ERROR; return; + } + } + prepareData(status); + } + + //to avoid use the annoying 'id' in TESTCASE(id,test) macro or the like +#define TEST(testname, classname, arg1, arg2, arg3, arg4, arg5, arg6) \ + if(temp == index) {\ + name = #testname;\ + if (exec) {\ + UErrorCode status = U_ZERO_ERROR;\ + UPerfFunction * t = new classname(status,arg1, arg2, arg3, arg4, arg5, arg6);\ + if (U_FAILURE(status)) {\ + delete t;\ + return NULL;\ + } else {\ + return t;\ + }\ + } else {\ + return NULL;\ + }\ + }\ + temp++\ + + + virtual UPerfFunction* runIndexedTest( /*[in]*/int32_t index, /*[in]*/UBool exec, /*[out]*/const char* &name, /*[in]*/ char* par = NULL ){ + int temp = 0; + +#define TEST_KEYGEN(testname, func)\ + TEST(testname, CmdKeyGen, col, win_langid, count, rnd_index, CmdKeyGen::func, 0) + TEST_KEYGEN(TestIcu_KeyGen_null, icu_key_null); + TEST_KEYGEN(TestIcu_KeyGen_len, icu_key_len); + TEST_KEYGEN(TestPosix_KeyGen_null, posix_key_null); + TEST_KEYGEN(TestWin_KeyGen_null, win_key_null); + TEST_KEYGEN(TestWin_KeyGen_len, win_key_len); + +#define TEST_ITER(testname, func)\ + TEST(testname, CmdIter, col, count, icu_data, CmdIter::func,0,0) + TEST_ITER(TestIcu_ForwardIter_null, icu_forward_null); + TEST_ITER(TestIcu_ForwardIter_len, icu_forward_len); + TEST_ITER(TestIcu_BackwardIter_null, icu_backward_null); + TEST_ITER(TestIcu_BackwardIter_len, icu_backward_len); + +#define TEST_ITER_ALL(testname, func)\ + TEST(testname, CmdIterAll, col, icu_data_all_len, icu_data_all, CmdIterAll::func,0,0) + TEST_ITER_ALL(TestIcu_ForwardIter_all_null, forward_null); + TEST_ITER_ALL(TestIcu_ForwardIter_all_len, forward_len); + TEST_ITER_ALL(TestIcu_BackwardIter_all_null, backward_null); + TEST_ITER_ALL(TestIcu_BackwardIter_all_len, backward_len); + +#define TEST_QSORT(testname, func)\ + TEST(testname, CmdQsort, rnd_index, count, sizeof(DataIndex), CmdQsort::func,0,0) + TEST_QSORT(TestIcu_qsort_strcoll_null, icu_strcoll_null); + TEST_QSORT(TestIcu_qsort_strcoll_len, icu_strcoll_len); + TEST_QSORT(TestIcu_qsort_usekey, icu_cmpkey); + TEST_QSORT(TestPosix_qsort_strcoll_null, posix_strcoll_null); + TEST_QSORT(TestPosix_qsort_usekey, posix_cmpkey); + TEST_QSORT(TestWin_qsort_CompareStringW_null, win_cmp_null); + TEST_QSORT(TestWin_qsort_CompareStringW_len, win_cmp_len); + TEST_QSORT(TestWin_qsort_usekey, win_cmpkey); + +#define TEST_BIN(testname, func)\ + TEST(testname, CmdBinSearch, col, win_langid, count, rnd_index, ord_icu_key,CmdBinSearch::func) + TEST_BIN(TestIcu_BinarySearch_strcoll_null, icu_strcoll_null); + TEST_BIN(TestIcu_BinarySearch_strcoll_len, icu_strcoll_len); + TEST_BIN(TestIcu_BinarySearch_usekey, icu_cmpkey); + TEST_BIN(TestIcu_BinarySearch_strcmp, icu_strcmp); + TEST_BIN(TestIcu_BinarySearch_cmpCPO, icu_cmpcpo); + TEST_BIN(TestPosix_BinarySearch_strcoll_null, posix_strcoll_null); + TEST_BIN(TestPosix_BinarySearch_usekey, posix_cmpkey); + TEST_BIN(TestWin_BinarySearch_CompareStringW_null, win_cmp_null); + TEST_BIN(TestWin_BinarySearch_CompareStringW_len, win_cmp_len); + TEST_BIN(TestWin_BinarySearch_usekey, win_cmpkey); + TEST_BIN(TestWin_BinarySearch_wcscmp, win_wcscmp); + + name=""; + return NULL; + } + + + + void prepareData(UErrorCode& status){ + if(U_FAILURE(status)) return; + if (icu_data) return; // prepared + + icu_data = new CA_uchar(); + + // Following code is borrowed from UPerfTest::getLines(); + const UChar* line=NULL; + int32_t len =0; + for (;;) { + line = ucbuf_readline(ucharBuf,&len,&status); + if(line == NULL || U_FAILURE(status)){break;} + + // Refer to the source code of ucbuf_readline() + // 1. 'len' includs the line terminal symbols + // 2. The length of the line terminal symbols is only one character + // 3. The Windows CR LF line terminal symbols will be converted to CR + + if (len == 1) { + continue; //skip empty line + } else { + icu_data->append_one(len); + memcpy(icu_data->last(), line, len * sizeof(UChar)); + icu_data->last()[len -1] = NULL; + } + } + if(U_FAILURE(status)) return; + + // UTF-16 -> UTF-8 conversion. + UConverter *conv = ucnv_open("utf-8", &status); // just UTF-8 for now. + if (U_FAILURE(status)) return; + + count = icu_data->count; + + icu_data_all_len = icu_data->index[count]; // includes all NULLs + icu_data_all_len -= count; // excludes all NULLs + icu_data_all_len += 1; // the terminal NULL + icu_data_all = new UChar[icu_data_all_len]; + icu_data_all[icu_data_all_len - 1] = 0; //the terminal NULL + + icu_key = new CA_uint8; + win_data = new CA_win_wchar; + win_key = new CA_char; + posix_data = new CA_char; + posix_key = new CA_char; + rnd_index = new DataIndex[count]; + DataIndex::win_langid = win_langid; + DataIndex::col = col; + + + UChar * p = icu_data_all; + int32_t s; + int32_t t; + for (int i=0; i < count; i++) { + // ICU all data + s = sizeof(UChar) * icu_data->lengthOf(i); + memcpy(p, icu_data->dataOf(i), s); + p += icu_data->lengthOf(i); + + // ICU data + + // ICU key + s = ucol_getSortKey(col, icu_data->dataOf(i), -1,NULL, 0); + icu_key->append_one(s); + t = ucol_getSortKey(col, icu_data->dataOf(i), -1,icu_key->last(), s); + if (t != s) {status = U_INVALID_FORMAT_ERROR;return;} + + // POSIX data + s = ucnv_fromUChars(conv,NULL, 0, icu_data->dataOf(i), icu_data->lengthOf(i), &status); + if (status == U_BUFFER_OVERFLOW_ERROR || status == U_ZERO_ERROR){ + status = U_ZERO_ERROR; + } else { + return; + } + posix_data->append_one(s + 1); // plus terminal NULL + t = ucnv_fromUChars(conv,posix_data->last(), s, icu_data->dataOf(i), icu_data->lengthOf(i), &status); + if (U_FAILURE(status)) return; + if ( t != s){status = U_INVALID_FORMAT_ERROR;return;} + posix_data->last()[s] = 0; + + // POSIX key + s = strxfrm(NULL, posix_data->dataOf(i), 0); + if (s == INT_MAX){status = U_INVALID_FORMAT_ERROR;return;} + posix_key->append_one(s); + t = strxfrm(posix_key->last(), posix_data->dataOf(i), s); + if (t != s) {status = U_INVALID_FORMAT_ERROR;return;} + + // Win data + s = icu_data->lengthOf(i) + 1; // plus terminal NULL + win_data->append_one(s); + memcpy(win_data->last(), icu_data->dataOf(i), sizeof(WCHAR) * s); + + // Win key + s = LCMapStringW(win_langid, LCMAP_SORTKEY, win_data->dataOf(i), win_data->lengthOf(i), NULL,0); + if (s == 0) {status = U_INVALID_FORMAT_ERROR;return;} + win_key->append_one(s); + t = LCMapStringW(win_langid, LCMAP_SORTKEY, win_data->dataOf(i), win_data->lengthOf(i), (WCHAR *)(win_key->last()),s); + if (t != s) {status = U_INVALID_FORMAT_ERROR;return;} + + }; + + // append_one() will make points shifting, should not merge following code into previous iteration + for (int i=0; i < count; i++) { + rnd_index[i].icu_key = icu_key->dataOf(i); + rnd_index[i].icu_data = icu_data->dataOf(i); + rnd_index[i].icu_data_len = icu_data->lengthOf(i); + rnd_index[i].posix_key = posix_key->last(); + rnd_index[i].posix_data = posix_data->dataOf(i); + rnd_index[i].posix_data_len = posix_data->lengthOf(i); + rnd_index[i].win_key = win_key->dataOf(i); + rnd_index[i].win_data = win_data->dataOf(i); + rnd_index[i].win_data_len = win_data->lengthOf(i); + }; + + ucnv_close(conv); + qsort(rnd_index, count, sizeof(DataIndex), CmdQsort::q_random); + +#define SORT(data, func) \ + data = new DataIndex[count];\ + memcpy(data, rnd_index, count * sizeof(DataIndex));\ + qsort(data, count, sizeof(DataIndex), CmdQsort::func) + + SORT(ord_icu_data, icu_strcoll_len); + SORT(ord_icu_key, icu_cmpkey); + SORT(ord_posix_data, posix_strcoll_null); + SORT(ord_posix_key, posix_cmpkey); + SORT(ord_win_data, win_cmp_len); + SORT(ord_win_key, win_cmpkey); + SORT(ord_win_wcscmp, win_wcscmp); + SORT(ord_icu_strcmp, icu_strcmp); + SORT(ord_icu_cmpcpo, icu_cmpcpo); + } +}; + + +int main(int argc, const char *argv[]) +{ + + UErrorCode status = U_ZERO_ERROR; + CollPerfTest test(argc, argv, status); + + if (U_FAILURE(status)){ + printf("The error is %s\n", u_errorName(status)); + //TODO: print usage here + return status; + } + + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run please check the " + "arguments.\n"); + return -1; + } + return 0; +} + diff --git a/Build/source/libs/icu-xetex/test/perf/collperf/collperf.vcproj b/Build/source/libs/icu-xetex/test/perf/collperf/collperf.vcproj new file mode 100644 index 00000000000..79628389a82 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/collperf/collperf.vcproj @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="gb2312"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="collperf" + ProjectGUID="{01807B4A-E3B5-4B97-A7F3-207746DCD71E}" + SccProjectName="" + SccLocalPath=""> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + PrecompiledHeaderFile=".\Debug/collperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icuind.lib icutud.lib winmm.lib icutestd.lib " + OutputFile=".\Debug/collperf.exe" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\Debug/collperf.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/collperf.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="2" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="TRUE" + RuntimeLibrary="2" + EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile=".\Release/collperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icuin.lib ctestfw.lib icutu.lib winmm.lib" + OutputFile=".\Release/collperf.exe" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\..\lib\" + ProgramDatabaseFile=".\Release/collperf.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/collperf.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> + <File + RelativePath="collperf.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl"> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu-xetex/test/perf/normperf/.cvsignore b/Build/source/libs/icu-xetex/test/perf/normperf/.cvsignore new file mode 100644 index 00000000000..7c50ed227ed --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/normperf/.cvsignore @@ -0,0 +1,6 @@ +*.d +*.o +normperf +Debug +Release +Makefile diff --git a/Build/source/libs/icu-xetex/test/perf/normperf/Makefile.in b/Build/source/libs/icu-xetex/test/perf/normperf/Makefile.in index 90f555620dc..0fcc6760e1c 100644 --- a/Build/source/libs/icu-xetex/test/perf/normperf/Makefile.in +++ b/Build/source/libs/icu-xetex/test/perf/normperf/Makefile.in @@ -1,20 +1,17 @@ -## Makefile.in for ICU - test/collperf -## Copyright (c) 2001, International Business Machines Corporation and +## Makefile.in for ICU - test/perf/normperf +## Copyright (c) 2001-2006, International Business Machines Corporation and ## others. All Rights Reserved. ## Source directory information srcdir = @srcdir@ top_srcdir = @top_srcdir@ -top_builddir = ../.. +top_builddir = ../../.. include $(top_builddir)/icudefs.mk -## Platform-specific setup -include @platform_make_fragment@ - ## Build directory information -subdir = test/normperf +subdir = test/perf/normperf ## Extra files to remove for 'make clean' CLEANFILES = *~ $(DEPS) @@ -22,16 +19,8 @@ CLEANFILES = *~ $(DEPS) ## Target information TARGET = normperf -DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -CFLAGS = @CFLAGS@ -CXXFLAGS = @CXXFLAGS@ -ENABLE_RPATH = @ENABLE_RPATH@ -ifeq ($(ENABLE_RPATH),YES) -RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) -endif -LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) -LIBS = $(LIBICUI18N) $(LIBICUUC) @LIBS@ @LIB_M@ +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) OBJECTS = normperf.o diff --git a/Build/source/libs/icu-xetex/test/perf/normperf/normperf.h b/Build/source/libs/icu-xetex/test/perf/normperf/normperf.h index 0bc4e2b123c..6a43a7727be 100644 --- a/Build/source/libs/icu-xetex/test/perf/normperf/normperf.h +++ b/Build/source/libs/icu-xetex/test/perf/normperf/normperf.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2005, International Business Machines +* Copyright (c) 2002-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** ********************************************************************** @@ -102,7 +102,7 @@ private: ULine* lines; int32_t numLines; UChar dest[DEST_BUFFER_CAPACITY]; - UChar* pDest; + UChar* pDest; int32_t destLen; NormFn fn; int32_t retVal; @@ -149,7 +149,7 @@ public: numLines = srcNumLines; uselen = _uselen; destLen = DEST_BUFFER_CAPACITY; - pDest = dest; + pDest = dest; src = NULL; srcLen = 0; line_mode = TRUE; @@ -160,16 +160,16 @@ public: numLines = 0; uselen = _uselen; destLen = sourceLen*3; - pDest = (UChar*) malloc(destLen * U_SIZEOF_UCHAR); + pDest = (UChar*) malloc(destLen * U_SIZEOF_UCHAR); src = source; srcLen = sourceLen; line_mode = FALSE; } - ~NormPerfFunction(){ - if(dest != pDest){ - free(pDest); - } - } + ~NormPerfFunction(){ + if(dest != pDest){ + free(pDest); + } + } }; @@ -349,4 +349,5 @@ int32_t WinNormNFKC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLe #endif -#endif // NORMPERF_H
\ No newline at end of file +#endif // NORMPERF_H + diff --git a/Build/source/libs/icu-xetex/test/perf/perf.sln b/Build/source/libs/icu-xetex/test/perf/perf.sln index d046cde52ad..d5b1b2ed675 100644 --- a/Build/source/libs/icu-xetex/test/perf/perf.sln +++ b/Build/source/libs/icu-xetex/test/perf/perf.sln @@ -19,6 +19,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ubrkperf", "ubrkperf\ubrkpe ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utfperf", "utfperf\utfperf.vcproj", "{E7728E98-0469-43F4-AF37-4529A3D52C6B}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "collperf", "collperf\collperf.vcproj", "{01807B4A-E3B5-4B97-A7F3-207746DCD71E}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usetperf", "usetperf\usetperf.vcproj", "{EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -45,6 +57,18 @@ Global {7E280294-49BD-43D1-9903-CF29648D88CA}.Debug.Build.0 = Debug|Win32 {7E280294-49BD-43D1-9903-CF29648D88CA}.Release.ActiveCfg = Release|Win32 {7E280294-49BD-43D1-9903-CF29648D88CA}.Release.Build.0 = Release|Win32 + {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Debug.ActiveCfg = Debug|Win32 + {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Debug.Build.0 = Debug|Win32 + {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Release.ActiveCfg = Release|Win32 + {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Release.Build.0 = Release|Win32 + {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Debug.ActiveCfg = Debug|Win32 + {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Debug.Build.0 = Debug|Win32 + {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Release.ActiveCfg = Release|Win32 + {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Release.Build.0 = Release|Win32 + {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Debug.ActiveCfg = Debug|Win32 + {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Debug.Build.0 = Debug|Win32 + {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Release.ActiveCfg = Release|Win32 + {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/Build/source/libs/icu-xetex/test/perf/ubrkperf/.cvsignore b/Build/source/libs/icu-xetex/test/perf/ubrkperf/.cvsignore new file mode 100644 index 00000000000..67302129124 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/ubrkperf/.cvsignore @@ -0,0 +1,6 @@ +*.d +*.o +ubrkperf +Debug +Release +Makefile diff --git a/Build/source/libs/icu-xetex/test/perf/ubrkperf/Makefile.in b/Build/source/libs/icu-xetex/test/perf/ubrkperf/Makefile.in index 908e9fbe03e..33e6752fff6 100644 --- a/Build/source/libs/icu-xetex/test/perf/ubrkperf/Makefile.in +++ b/Build/source/libs/icu-xetex/test/perf/ubrkperf/Makefile.in @@ -1,20 +1,17 @@ -## Makefile.in for ICU - test/ubrkperf -## Copyright (c) 2001, International Business Machines Corporation and +## Makefile.in for ICU - test/perf/ubrkperf +## Copyright (c) 2001-2006, International Business Machines Corporation and ## others. All Rights Reserved. ## Source directory information srcdir = @srcdir@ top_srcdir = @top_srcdir@ -top_builddir = ../.. +top_builddir = ../../.. include $(top_builddir)/icudefs.mk -## Platform-specific setup -include @platform_make_fragment@ - ## Build directory information -subdir = test/ubrkperf +subdir = test/perf/ubrkperf ## Extra files to remove for 'make clean' CLEANFILES = *~ $(DEPS) @@ -22,16 +19,8 @@ CLEANFILES = *~ $(DEPS) ## Target information TARGET = ubrkperf -DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -CFLAGS = @CFLAGS@ -CXXFLAGS = @CXXFLAGS@ -ENABLE_RPATH = @ENABLE_RPATH@ -ifeq ($(ENABLE_RPATH),YES) -RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) -endif -LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) -LIBS = $(LIBICUI18N) $(LIBICUUC) @LIBS@ @LIB_M@ +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) OBJECTS = ubrkperf.o diff --git a/Build/source/libs/icu-xetex/test/perf/usetperf/.cvsignore b/Build/source/libs/icu-xetex/test/perf/usetperf/.cvsignore new file mode 100644 index 00000000000..3b1d3dd9798 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/usetperf/.cvsignore @@ -0,0 +1,6 @@ +*.d +*.o +usetperf +Debug +Release +Makefile diff --git a/Build/source/libs/icu-xetex/test/unalignedtest/Makefile.in b/Build/source/libs/icu-xetex/test/perf/usetperf/Makefile.in index d4fa022ee66..4b8cba5853c 100644 --- a/Build/source/libs/icu-xetex/test/unalignedtest/Makefile.in +++ b/Build/source/libs/icu-xetex/test/perf/usetperf/Makefile.in @@ -1,28 +1,28 @@ -## Makefile.in for ICU - test/unalignedtest -## Copyright (c) 2001, International Business Machines Corporation and +## Makefile.in for ICU - test/perf/usetperf +## Copyright (c) 2001-2006, International Business Machines Corporation and ## others. All Rights Reserved. ## Source directory information srcdir = @srcdir@ top_srcdir = @top_srcdir@ -top_builddir = ../.. +top_builddir = ../../.. include $(top_builddir)/icudefs.mk ## Build directory information -subdir = test/unalignedtest +subdir = test/perf/usetperf ## Extra files to remove for 'make clean' CLEANFILES = *~ $(DEPS) ## Target information -TARGET = unalignedtest +TARGET = usetperf -DEFS += -I$(top_builddir)/common -I$(top_srcdir)/common -LIBS = $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M) +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) -OBJECTS = unaligned.o +OBJECTS = usetperf.o bitset.o DEPS = $(OBJECTS:.o=.d) @@ -54,20 +54,14 @@ clean-local: distclean-local: clean-local $(RMV) Makefile -check-local: all-local check-cintltst check-intltest - -check-cintltst: - - $(INVOKE) ./$(TARGET) $(top_srcdir)/test/cintltst/cintltst -a - -check-intltest: - - $(INVOKE) ./$(TARGET) $(top_srcdir)/test/intltest/intltest -a +check-local: all-local Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status $(TARGET) : $(OBJECTS) - $(LINK.cc) -o $@ $^ + $(LINK.cc) -o $@ $^ $(LIBS) invoke: ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION) @@ -81,3 +75,4 @@ ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) endif endif endif + diff --git a/Build/source/libs/icu-xetex/test/perf/usetperf/UsetPerf.pl b/Build/source/libs/icu-xetex/test/perf/usetperf/UsetPerf.pl new file mode 100755 index 00000000000..8c493806e20 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/usetperf/UsetPerf.pl @@ -0,0 +1,45 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2005, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Uset performance: ICU", + "headers"=>"ICU", + "operationIs"=>"unicode string", + "passes"=>"1", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"../data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "debug/usetperf.exe "; + +my $tests = { + "titlecase_letter/add", ["$p titlecase_letter_add"], + "titlecase_letter/contains", ["$p titlecase_letter_contains"], + "titlecase_letter/iterator", ["$p titlecase_letter_iterator"], + "unassigned/add", ["$p unassigned_add"], + "unassigned/contains", ["$p unassigned_contains"], + "unassigned/iterator", ["$p unassigned_iterator"], + "pattern1", ["$p pattern1"], + "pattern2", ["$p pattern2"], + "pattern3", ["$p pattern3"], + }; + +my $dataFiles = { + }; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu-xetex/test/usetperf/bitset.cpp b/Build/source/libs/icu-xetex/test/perf/usetperf/bitset.cpp index d1356c0edba..ea5f11b8b2f 100644 --- a/Build/source/libs/icu-xetex/test/usetperf/bitset.cpp +++ b/Build/source/libs/icu-xetex/test/perf/usetperf/bitset.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2004, International Business Machines +* Copyright (c) 2002-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * 2002-09-20 aliu Created. diff --git a/Build/source/libs/icu-xetex/test/usetperf/bitset.h b/Build/source/libs/icu-xetex/test/perf/usetperf/bitset.h index 8b7122dfdec..3148b1d7070 100644 --- a/Build/source/libs/icu-xetex/test/usetperf/bitset.h +++ b/Build/source/libs/icu-xetex/test/perf/usetperf/bitset.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2004, International Business Machines +* Copyright (c) 2002-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * 2002-09-20 aliu Created. diff --git a/Build/source/libs/icu-xetex/test/perf/usetperf/usetperf.cpp b/Build/source/libs/icu-xetex/test/perf/usetperf/usetperf.cpp new file mode 100644 index 00000000000..7d5853e9b0c --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/usetperf/usetperf.cpp @@ -0,0 +1,143 @@ +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* 2005Nov22 Raymond Yang +* +* migrate old test created by aliu to perf test framework. +*/ + +#include <stdio.h> + +#include "unicode/utypes.h" +#include "unicode/uniset.h" +#include "unicode/uchar.h" +#include "unicode/usetiter.h" +#include "bitset.h" +#include "unicode/uperf.h" + +static const char* PAT[] = { + "['A-Za-z\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0\\u01CD-\\u01DC\\u01DE-\\u01E1\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u01FB\\u0200-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u212A-\\u212B]", + + "['.0-9A-Za-z~\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0\\u01CD-\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u0301\\u0303-\\u0304\\u0306-\\u0307\\u0310\\u0314-\\u0315\\u0323\\u0325\\u0331\\u0341\\u0344\\u0385-\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u0390\\u03AC-\\u03B0\\u03CC-\\u03CE\\u03D3\\u0403\\u040C\\u040E\\u0419\\u0439\\u0453\\u045C\\u045E\\u04C1-\\u04C2\\u04D0-\\u04D1\\u04D6-\\u04D7\\u04E2-\\u04E3\\u04EE-\\u04EF\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u1F01\\u1F03-\\u1F05\\u1F07\\u1F09\\u1F0B-\\u1F0D\\u1F0F\\u1F11\\u1F13-\\u1F15\\u1F19\\u1F1B-\\u1F1D\\u1F21\\u1F23-\\u1F25\\u1F27\\u1F29\\u1F2B-\\u1F2D\\u1F2F\\u1F31\\u1F33-\\u1F35\\u1F37\\u1F39\\u1F3B-\\u1F3D\\u1F3F\\u1F41\\u1F43-\\u1F45\\u1F49\\u1F4B-\\u1F4D\\u1F51\\u1F53-\\u1F55\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F61\\u1F63-\\u1F65\\u1F67\\u1F69\\u1F6B-\\u1F6D\\u1F6F\\u1F71\\u1F73\\u1F75\\u1F77\\u1F79\\u1F7B\\u1F7D\\u1F81\\u1F83-\\u1F85\\u1F87\\u1F89\\u1F8B-\\u1F8D\\u1F8F\\u1F91\\u1F93-\\u1F95\\u1F97\\u1F99\\u1F9B-\\u1F9D\\u1F9F\\u1FA1\\u1FA3-\\u1FA5\\u1FA7\\u1FA9\\u1FAB-\\u1FAD\\u1FAF-\\u1FB1\\u1FB4\\u1FB8-\\u1FB9\\u1FBB\\u1FC4\\u1FC9\\u1FCB\\u1FCE\\u1FD0-\\u1FD1\\u1FD3\\u1FD8-\\u1FD9\\u1FDB\\u1FDE\\u1FE0-\\u1FE1\\u1FE3\\u1FE5\\u1FE8-\\u1FE9\\u1FEB-\\u1FEC\\u1FEE\\u1FF4\\u1FF9\\u1FFB\\u212A-\\u212B\\uE04D\\uE064]", + + "[\\u0901-\\u0903\\u0905-\\u0939\\u093C-\\u094D\\u0950-\\u0954\\u0958-\\u096F]", +}; + +class CmdPattern : public UPerfFunction { +private: + UnicodeString pat; + UnicodeSet set; +public: + CmdPattern(const char * pattern):pat(pattern,""){ + } + virtual long getOperationsPerIteration(){ + return 1; + } + virtual void call(UErrorCode* pErrorCode){ + set.applyPattern(pat, *pErrorCode); + } +}; + +class CmdOp : public UPerfFunction { +private: + UnicodeSet us; + BitSet bs; + int32_t total; + void (CmdOp::*op) (); +public: + CmdOp(UCharCategory prop, void (CmdOp::*op)()):op(op){ + total = 0; + bs.clearAll(); + for (UChar32 cp=0; cp<0x110000; ++cp) { + if (u_charType(cp) == prop) { + bs.set((int32_t) cp); + ++total; + } + } + } + virtual long getOperationsPerIteration(){ + return total; + } + + virtual void call(UErrorCode* pErrorCode){ + (this->*op)(); + } + void add (void){ + us.clear(); + for (UChar32 cp=0; cp<0x110000; ++cp) { + if (bs.get((int32_t) cp)) { + us.add(cp); + } + } + } + + void contains(void){ + int32_t temp = 0; + us.clear(); + for (UChar32 cp=0; cp<0x110000; ++cp) { + if (us.contains(cp)) { + temp += cp; + } + } + } + + void iterator(void){ + int32_t temp = 0; + UnicodeSetIterator uit(us); + while (uit.next()) { + temp += uit.getCodepoint(); + } + } +}; + +class UsetPerformanceTest : public UPerfTest{ +public: + UsetPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status) :UPerfTest(argc,argv,status){ + } + + virtual UPerfFunction* runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ){ + switch (index) { + case 0: name = "titlecase_letter_add"; + if (exec) return new CmdOp(U_TITLECASE_LETTER, CmdOp::add) ; break; + case 1: name = "titlecase_letter_contains"; + if (exec) return new CmdOp(U_TITLECASE_LETTER, CmdOp::contains) ; break; + case 2: name = "titlecase_letter_iterator"; + if (exec) return new CmdOp(U_TITLECASE_LETTER, CmdOp::iterator) ; break; + case 3: name = "unassigned_add"; + if (exec) return new CmdOp(U_UNASSIGNED, CmdOp::add) ; break; + case 4: name = "unassigned_contains"; + if (exec) return new CmdOp(U_UNASSIGNED, CmdOp::contains) ; break; + case 5: name = "unassigned_iterator"; + if (exec) return new CmdOp(U_UNASSIGNED, CmdOp::iterator) ; break; + case 6: name = "pattern1"; + if (exec) return new CmdPattern(PAT[0]) ; break; + case 7: name = "pattern2"; + if (exec) return new CmdPattern(PAT[1]) ; break; + case 8: name = "pattern3"; + if (exec) return new CmdPattern(PAT[2]) ; break; + default: name = ""; break; + } + return NULL; + } +}; + + +int main(int argc, const char *argv[]) +{ + UErrorCode status = U_ZERO_ERROR; + UsetPerformanceTest test(argc, argv, status); + + if (U_FAILURE(status)){ + printf("The error is %s\n", u_errorName(status)); + return status; + } + + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run please check the " + "arguments.\n"); + return -1; + } + return 0; +} diff --git a/Build/source/libs/icu-xetex/test/perf/usetperf/usetperf.vcproj b/Build/source/libs/icu-xetex/test/perf/usetperf/usetperf.vcproj new file mode 100644 index 00000000000..6d62331742d --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/usetperf/usetperf.vcproj @@ -0,0 +1,203 @@ +<?xml version="1.0" encoding="gb2312"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="usetperf" + ProjectGUID="{EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}" + SccProjectName="" + SccLocalPath=""> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="TRUE" + RuntimeLibrary="2" + EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile=".\Release/usetperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib winmm.lib icutest.lib" + OutputFile=".\Release/usetperf.exe" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\..\..\lib" + ProgramDatabaseFile=".\Release/usetperf.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/usetperf.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + PrecompiledHeaderFile=".\Debug/usetperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib winmm.lib icutestd.lib" + OutputFile=".\Debug/usetperf.exe" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\..\..\lib" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\Debug/usetperf.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/usetperf.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> + <File + RelativePath="bitset.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="..\..\common" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\common" + PreprocessorDefinitions="" + BasicRuntimeChecks="3"/> + </FileConfiguration> + </File> + <File + RelativePath="usetperf.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="..\..\common" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\common" + PreprocessorDefinitions="" + BasicRuntimeChecks="3"/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl"> + <File + RelativePath=".\bitset.h"> + </File> + <File + RelativePath=".\timer.h"> + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu-xetex/test/perf/ustrperf/.cvsignore b/Build/source/libs/icu-xetex/test/perf/ustrperf/.cvsignore new file mode 100644 index 00000000000..4c913730998 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/ustrperf/.cvsignore @@ -0,0 +1,6 @@ +*.d +*.o +charperf +Debug +Release +Makefile diff --git a/Build/source/libs/icu-xetex/test/perf/ustrperf/Makefile.in b/Build/source/libs/icu-xetex/test/perf/ustrperf/Makefile.in new file mode 100644 index 00000000000..6432ae793de --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/ustrperf/Makefile.in @@ -0,0 +1,78 @@ +## Makefile.in for ICU - test/perf/ustrperf +## Copyright (c) 2001-2006, International Business Machines Corporation and +## others. All Rights Reserved. + +## Source directory information +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ + +top_builddir = ../../.. + +include $(top_builddir)/icudefs.mk + +## Build directory information +subdir = test/perf/ustrperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = ustrperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = stringperf.o + +DEPS = $(OBJECTS:.o=.d) + +## List of phony targets +.PHONY : all all-local install install-local clean clean-local \ +distclean distclean-local dist dist-local check check-local + +## Clear suffix list +.SUFFIXES : + +## List of standard targets +all: all-local +install: install-local +clean: clean-local +distclean : distclean-local +dist: dist-local +check: all check-local + +all-local: $(TARGET) + +install-local: + +dist-local: + +clean-local: + test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) + $(RMV) $(OBJECTS) $(TARGET) + +distclean-local: clean-local + $(RMV) Makefile + +check-local: all-local + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(TARGET) : $(OBJECTS) + $(LINK.cc) -o $@ $^ $(LIBS) + +invoke: + ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION) + +ifeq (,$(MAKECMDGOALS)) +-include $(DEPS) +else +ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.cpp b/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.cpp index 653e1a0297b..342e060aa8c 100644 --- a/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.cpp +++ b/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (C) 2002-2004 International Business Machines Corporation + * Copyright (C) 2002-2006 International Business Machines Corporation * and others. All Rights Reserved. * ********************************************************************/ @@ -9,7 +9,7 @@ * * Modification History: * Name Description -* Doug Wang Second version +* Doug Wang Second version * Doug Wang First Version ****************************************************************************** */ @@ -28,55 +28,55 @@ int main(int argc, const char *argv[]) { UErrorCode status = U_ZERO_ERROR; - bCatenatePrealloc=TRUE; + bCatenatePrealloc=TRUE; StringPerformanceTest test(argc, argv, status); - if (U_FAILURE(status)){ + if (U_FAILURE(status)){ return status; } - - int loops = LOOPS; - if (bCatenatePrealloc) { - int to_alloc = loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN); - catICU = new UnicodeString(to_alloc,'a',0); - //catICU = new UnicodeString(); - - catStd = new stlstring(); - catStd -> reserve(loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN)); - //catStd -> reserve(110000000); - } else { - catICU = new UnicodeString(); - catStd = new stlstring(); - } + + int loops = LOOPS; + if (bCatenatePrealloc) { + int to_alloc = loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN); + catICU = new UnicodeString(to_alloc,'a',0); + //catICU = new UnicodeString(); + + catStd = new stlstring(); + catStd -> reserve(loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN)); + //catStd -> reserve(110000000); + } else { + catICU = new UnicodeString(); + catStd = new stlstring(); + } if (test.run() == FALSE){ fprintf(stderr, "FAILED: Tests could not be run please check the " - "arguments.\n"); + "arguments.\n"); return -1; } - delete catICU; - delete catStd; + delete catICU; + delete catStd; return 0; } StringPerformanceTest::StringPerformanceTest(int32_t argc, const char *argv[], - UErrorCode &status) - : UPerfTest(argc, argv, status) + UErrorCode &status) + : UPerfTest(argc, argv, status) { - filelines_=NULL; - StrBuffer=NULL; - StrBufferLen=0; + filelines_=NULL; + StrBuffer=NULL; + StrBufferLen=0; - int32_t len =0; + int32_t len =0; - if (status== U_ILLEGAL_ARGUMENT_ERROR){ - //fprintf(stderr,gUsageString, "stringperf"); - return; + if (status== U_ILLEGAL_ARGUMENT_ERROR){ + //fprintf(stderr,gUsageString, "stringperf"); + return; } if (U_FAILURE(status)){ fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", - u_errorName(status)); + u_errorName(status)); return; } @@ -87,15 +87,15 @@ StringPerformanceTest::StringPerformanceTest(int32_t argc, const char *argv[], fprintf(stderr, "FAILED to read lines from file and create UPerfTest object. Error: %s\n", u_errorName(status)); return; } - - filelines_ = new ULine[numLines]; - for (int i =0; i < numLines; i++) { - len = filelines[i].len; - filelines_[i].name = new UChar[len]; + + filelines_ = new ULine[numLines]; + for (int i =0; i < numLines; i++) { + len = filelines[i].len; + filelines_[i].name = new UChar[len]; filelines_[i].len = len; - memcpy(filelines_[i].name, filelines[i].name, len * U_SIZEOF_UCHAR); - } - + memcpy(filelines_[i].name, filelines[i].name, len * U_SIZEOF_UCHAR); + } + }else if(bulk_mode){ int32_t srcLen = 0; const UChar* src = getBuffer(srcLen,status); @@ -103,50 +103,50 @@ StringPerformanceTest::StringPerformanceTest(int32_t argc, const char *argv[], fprintf(stderr, "FAILED to read buffer from file and create UPerfTest object. Error: %s\n", u_errorName(status)); return; } - - StrBuffer = new UChar[srcLen]; - StrBufferLen = srcLen; - memcpy(StrBuffer, src, srcLen * U_SIZEOF_UCHAR); + + StrBuffer = new UChar[srcLen]; + StrBufferLen = srcLen; + memcpy(StrBuffer, src, srcLen * U_SIZEOF_UCHAR); } } StringPerformanceTest::~StringPerformanceTest() { - delete[] filelines_; - delete[] StrBuffer; + delete[] filelines_; + delete[] StrBuffer; } UPerfFunction* StringPerformanceTest::runIndexedTest(int32_t index, UBool exec, - const char *&name, - char* par) + const char *&name, + char* par) { switch (index) { TESTCASE(0, TestCtor); - TESTCASE(1, TestCtor1); - TESTCASE(2, TestCtor2); - TESTCASE(3, TestCtor3); - TESTCASE(4, TestAssign); - TESTCASE(5, TestAssign1); - TESTCASE(6, TestAssign2); - TESTCASE(7, TestGetch); - TESTCASE(8, TestCatenate); - TESTCASE(9, TestScan); - TESTCASE(10, TestScan1); - TESTCASE(11, TestScan2); - - TESTCASE(12, TestStdLibCtor); - TESTCASE(13, TestStdLibCtor1); - TESTCASE(14, TestStdLibCtor2); - TESTCASE(15, TestStdLibCtor3); - TESTCASE(16, TestStdLibAssign); - TESTCASE(17, TestStdLibAssign1); - TESTCASE(18, TestStdLibAssign2); - TESTCASE(19, TestStdLibGetch); - TESTCASE(20, TestStdLibCatenate); - TESTCASE(21, TestStdLibScan); - TESTCASE(22, TestStdLibScan1); - TESTCASE(23, TestStdLibScan2); + TESTCASE(1, TestCtor1); + TESTCASE(2, TestCtor2); + TESTCASE(3, TestCtor3); + TESTCASE(4, TestAssign); + TESTCASE(5, TestAssign1); + TESTCASE(6, TestAssign2); + TESTCASE(7, TestGetch); + TESTCASE(8, TestCatenate); + TESTCASE(9, TestScan); + TESTCASE(10, TestScan1); + TESTCASE(11, TestScan2); + + TESTCASE(12, TestStdLibCtor); + TESTCASE(13, TestStdLibCtor1); + TESTCASE(14, TestStdLibCtor2); + TESTCASE(15, TestStdLibCtor3); + TESTCASE(16, TestStdLibAssign); + TESTCASE(17, TestStdLibAssign1); + TESTCASE(18, TestStdLibAssign2); + TESTCASE(19, TestStdLibGetch); + TESTCASE(20, TestStdLibCatenate); + TESTCASE(21, TestStdLibScan); + TESTCASE(22, TestStdLibScan1); + TESTCASE(23, TestStdLibScan2); default: name = ""; @@ -157,219 +157,221 @@ UPerfFunction* StringPerformanceTest::runIndexedTest(int32_t index, UBool exec, UPerfFunction* StringPerformanceTest::TestCtor() { - if (line_mode) { - return new StringPerfFunction(ctor, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(ctor, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(ctor, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(ctor, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestCtor1() { - if (line_mode) { - return new StringPerfFunction(ctor1, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(ctor1, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(ctor1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(ctor1, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestCtor2() { - if (line_mode) { - return new StringPerfFunction(ctor2, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(ctor2, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(ctor2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(ctor2, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestCtor3() { - if (line_mode) { - return new StringPerfFunction(ctor3, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(ctor3, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(ctor3, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(ctor3, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestAssign() { - if (line_mode) { - return new StringPerfFunction(assign, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(assign, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(assign, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(assign, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestAssign1() { - if (line_mode) { - return new StringPerfFunction(assign1, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(assign1, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(assign1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(assign1, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestAssign2() { - if (line_mode) { - return new StringPerfFunction(assign2, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(assign2, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(assign2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(assign2, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestGetch() { - if (line_mode) { - return new StringPerfFunction(getch, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(getch, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(getch, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(getch, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestCatenate() { - if (line_mode) { - return new StringPerfFunction(catenate, filelines_, numLines, uselen); - } else { - //return new StringPerfFunction(catenate, buffer, bufferLen, uselen); - return new StringPerfFunction(catenate, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(catenate, filelines_, numLines, uselen); + } else { + //return new StringPerfFunction(catenate, buffer, bufferLen, uselen); + return new StringPerfFunction(catenate, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestScan() { - if (line_mode) { - return new StringPerfFunction(scan, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(scan, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(scan, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(scan, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestScan1() { - if (line_mode) { - return new StringPerfFunction(scan1, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(scan1, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(scan1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(scan1, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestScan2() { - if (line_mode) { - return new StringPerfFunction(scan2, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(scan2, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(scan2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(scan2, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibCtor() { - if (line_mode) { - return new StringPerfFunction(StdLibCtor, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibCtor, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibCtor, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibCtor, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibCtor1() { - if (line_mode) { - return new StringPerfFunction(StdLibCtor1, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibCtor1, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibCtor1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibCtor1, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibCtor2() { - if (line_mode) { - return new StringPerfFunction(StdLibCtor2, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibCtor2, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibCtor2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibCtor2, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibCtor3() { - if (line_mode) { - return new StringPerfFunction(StdLibCtor3, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibCtor3, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibCtor3, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibCtor3, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibAssign() { - if (line_mode) { - return new StringPerfFunction(StdLibAssign, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibAssign, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibAssign, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibAssign, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibAssign1() { - if (line_mode) { - return new StringPerfFunction(StdLibAssign1, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibAssign1, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibAssign1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibAssign1, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibAssign2() { - if (line_mode) { - return new StringPerfFunction(StdLibAssign2, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibAssign2, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibAssign2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibAssign2, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibGetch() { - if (line_mode) { - return new StringPerfFunction(StdLibGetch, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibGetch, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibGetch, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibGetch, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibCatenate() { - if (line_mode) { - return new StringPerfFunction(StdLibCatenate, filelines_, numLines, uselen); - } else { - //return new StringPerfFunction(StdLibCatenate, buffer, bufferLen, uselen); - return new StringPerfFunction(StdLibCatenate, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibCatenate, filelines_, numLines, uselen); + } else { + //return new StringPerfFunction(StdLibCatenate, buffer, bufferLen, uselen); + return new StringPerfFunction(StdLibCatenate, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibScan() { - if (line_mode) { - return new StringPerfFunction(StdLibScan, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibScan, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibScan, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibScan, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibScan1() { - if (line_mode) { - return new StringPerfFunction(StdLibScan1, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibScan1, StrBuffer, StrBufferLen, uselen); - } + if (line_mode) { + return new StringPerfFunction(StdLibScan1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibScan1, StrBuffer, StrBufferLen, uselen); + } } UPerfFunction* StringPerformanceTest::TestStdLibScan2() { - if (line_mode) { - return new StringPerfFunction(StdLibScan2, filelines_, numLines, uselen); - } else { - return new StringPerfFunction(StdLibScan2, StrBuffer, StrBufferLen, uselen); - } -}
\ No newline at end of file + if (line_mode) { + return new StringPerfFunction(StdLibScan2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibScan2, StrBuffer, StrBufferLen, uselen); + } +} + + diff --git a/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.h b/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.h index 5b6b47ba99a..84d6493a405 100644 --- a/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.h +++ b/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.h @@ -1,9 +1,8 @@ /* ********************************************************************** -* Copyright (c) 2002-2005, International Business Machines +* Copyright (c) 2002-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** -********************************************************************** */ #ifndef _STRINGPERF_H #define _STRINGPERF_H @@ -20,7 +19,7 @@ typedef std::wstring stlstring; /* Define all constants for test case operations */ #define MAXNUMLINES 40000 //Max number of lines in a test data file #define MAXSRCLEN 20 //Max length of one line. maybe a larger number, but it need more mem -#define LOOPS 100 //Iterations +#define LOOPS 100 //Iterations //#define LOOPS 10 #define catenate_STRLEN 2 @@ -62,385 +61,385 @@ class StringPerfFunction : public UPerfFunction { public: - virtual long getEventsPerIteration(){ - int loops = LOOPS; - if (catICU) { delete catICU;} - if (catStd) { delete catStd;} - - if (bCatenatePrealloc) { - - int to_alloc = loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN); - catICU = new UnicodeString(to_alloc,'a',0); - //catICU = new UnicodeString(); - - catStd = new stlstring(); - //catStd -> reserve(loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN)); - catStd -> reserve(110000000); - } else { - catICU = new UnicodeString(); - catStd = new stlstring(); - } - - return -1; + virtual long getEventsPerIteration(){ + int loops = LOOPS; + if (catICU) { delete catICU;} + if (catStd) { delete catStd;} + + if (bCatenatePrealloc) { + + int to_alloc = loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN); + catICU = new UnicodeString(to_alloc,'a',0); + //catICU = new UnicodeString(); + + catStd = new stlstring(); + //catStd -> reserve(loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN)); + catStd -> reserve(110000000); + } else { + catICU = new UnicodeString(); + catStd = new stlstring(); + } + + return -1; } - virtual void call(UErrorCode* status) - { + virtual void call(UErrorCode* status) + { if(line_mode_==TRUE){ if(uselen_){ for(int32_t i = 0; i< numLines_; i++){ - if (fnType_==Fn_ICU) { - (*fn1_)(lines_[i].name,lines_[i].len,uS0_[i]); - } else { - (*fn2_)(wlines_[i].name,wlines_[i].len,sS0_[i]); - } + if (fnType_==Fn_ICU) { + (*fn1_)(lines_[i].name,lines_[i].len,uS0_[i]); + } else { + (*fn2_)(wlines_[i].name,wlines_[i].len,sS0_[i]); + } } }else{ for(int32_t i = 0; i< numLines_; i++){ if (fnType_==Fn_ICU) { - (*fn1_)(lines_[i].name,-1,uS0_[i]); - } else { - (*fn2_)(wlines_[i].name,-1,sS0_[i]); - } + (*fn1_)(lines_[i].name,-1,uS0_[i]); + } else { + (*fn2_)(wlines_[i].name,-1,sS0_[i]); + } } } }else{ if(uselen_){ - if (fnType_==Fn_ICU) { - (*fn1_)(src_,srcLen_,*ubulk_); - } else { - (*fn2_)(wsrc_,wsrcLen_,*sbulk_); - } + if (fnType_==Fn_ICU) { + (*fn1_)(src_,srcLen_,*ubulk_); + } else { + (*fn2_)(wsrc_,wsrcLen_,*sbulk_); + } }else{ - if (fnType_==Fn_ICU) { - (*fn1_)(src_,-1,*ubulk_); - } else { - (*fn2_)(wsrc_,-1,*sbulk_); - } + if (fnType_==Fn_ICU) { + (*fn1_)(src_,-1,*ubulk_); + } else { + (*fn2_)(wsrc_,-1,*sbulk_); + } } } - } + } - virtual long getOperationsPerIteration() - { + virtual long getOperationsPerIteration() + { if(line_mode_==TRUE){ return numLines_; }else{ return 1; } - } - - StringPerfFunction(ICUStringPerfFn func, ULine* srcLines, int32_t srcNumLines, UBool uselen) - { - - fn1_ = func; - lines_=srcLines; - wlines_=NULL; - numLines_=srcNumLines; - uselen_=uselen; - line_mode_=TRUE; + } + + StringPerfFunction(ICUStringPerfFn func, ULine* srcLines, int32_t srcNumLines, UBool uselen) + { + + fn1_ = func; + lines_=srcLines; + wlines_=NULL; + numLines_=srcNumLines; + uselen_=uselen; + line_mode_=TRUE; src_ = NULL; srcLen_ = 0; - wsrc_ = NULL; - wsrcLen_ = 0; - fnType_ = Fn_ICU; - - uS0_=new UnicodeString[numLines_]; - for(int32_t i=0; i<numLines_; i++) { - uS0_[i]=UnicodeString(lines_[i].name, lines_[i].len); - } - sS0_=NULL; - ubulk_=NULL; - sbulk_=NULL; - } - - StringPerfFunction(StdStringPerfFn func, ULine* srcLines, int32_t srcNumLines, UBool uselen) - { - - fn2_ = func; - lines_=srcLines; - wlines_=NULL; - numLines_=srcNumLines; - uselen_=uselen; - line_mode_=TRUE; + wsrc_ = NULL; + wsrcLen_ = 0; + fnType_ = Fn_ICU; + + uS0_=new UnicodeString[numLines_]; + for(int32_t i=0; i<numLines_; i++) { + uS0_[i]=UnicodeString(lines_[i].name, lines_[i].len); + } + sS0_=NULL; + ubulk_=NULL; + sbulk_=NULL; + } + + StringPerfFunction(StdStringPerfFn func, ULine* srcLines, int32_t srcNumLines, UBool uselen) + { + + fn2_ = func; + lines_=srcLines; + wlines_=NULL; + numLines_=srcNumLines; + uselen_=uselen; + line_mode_=TRUE; src_ = NULL; srcLen_ = 0; - wsrc_ = NULL; - wsrcLen_ = 0; - fnType_ = Fn_STD; - - uS0_=NULL; - ubulk_=NULL; - sbulk_=NULL; - - //fillin wlines_[], sS0_[] - prepareLinesForStd(); - } - - StringPerfFunction(ICUStringPerfFn func, UChar* source, int32_t sourceLen, UBool uselen) - { - - fn1_ = func; - lines_=NULL; - wlines_=NULL; - numLines_=0; - uselen_=uselen; - line_mode_=FALSE; - src_ = new UChar[sourceLen]; - memcpy(src_, source, sourceLen * U_SIZEOF_UCHAR); + wsrc_ = NULL; + wsrcLen_ = 0; + fnType_ = Fn_STD; + + uS0_=NULL; + ubulk_=NULL; + sbulk_=NULL; + + //fillin wlines_[], sS0_[] + prepareLinesForStd(); + } + + StringPerfFunction(ICUStringPerfFn func, UChar* source, int32_t sourceLen, UBool uselen) + { + + fn1_ = func; + lines_=NULL; + wlines_=NULL; + numLines_=0; + uselen_=uselen; + line_mode_=FALSE; + src_ = new UChar[sourceLen]; + memcpy(src_, source, sourceLen * U_SIZEOF_UCHAR); srcLen_ = sourceLen; - wsrc_ = NULL; - wsrcLen_ = 0; - fnType_ = Fn_ICU; - - uS0_=NULL; - sS0_=NULL; - ubulk_=new UnicodeString(src_,srcLen_); - sbulk_=NULL; - } - - StringPerfFunction(StdStringPerfFn func, UChar* source, int32_t sourceLen, UBool uselen) - { - - fn2_ = func; - lines_=NULL; - wlines_=NULL; - numLines_=0; - uselen_=uselen; - line_mode_=FALSE; - src_ = new UChar[sourceLen]; - memcpy(src_, source, sourceLen * U_SIZEOF_UCHAR); + wsrc_ = NULL; + wsrcLen_ = 0; + fnType_ = Fn_ICU; + + uS0_=NULL; + sS0_=NULL; + ubulk_=new UnicodeString(src_,srcLen_); + sbulk_=NULL; + } + + StringPerfFunction(StdStringPerfFn func, UChar* source, int32_t sourceLen, UBool uselen) + { + + fn2_ = func; + lines_=NULL; + wlines_=NULL; + numLines_=0; + uselen_=uselen; + line_mode_=FALSE; + src_ = new UChar[sourceLen]; + memcpy(src_, source, sourceLen * U_SIZEOF_UCHAR); srcLen_ = sourceLen; - fnType_ = Fn_STD; - - uS0_=NULL; - sS0_=NULL; - ubulk_=NULL; - - //fillin wsrc_, sbulk_ - prepareBulkForStd(); - - } - - ~StringPerfFunction() - { - //free(src_); - free(wsrc_); - delete[] src_; - delete ubulk_; - delete sbulk_; - delete[] uS0_; - delete[] sS0_; - delete[] wlines_; - } + fnType_ = Fn_STD; + + uS0_=NULL; + sS0_=NULL; + ubulk_=NULL; + + //fillin wsrc_, sbulk_ + prepareBulkForStd(); + + } + + ~StringPerfFunction() + { + //free(src_); + free(wsrc_); + delete[] src_; + delete ubulk_; + delete sbulk_; + delete[] uS0_; + delete[] sS0_; + delete[] wlines_; + } private: - void prepareLinesForStd(void) - { - UErrorCode err=U_ZERO_ERROR; - - wlines_=new WLine[numLines_]; + void prepareLinesForStd(void) + { + UErrorCode err=U_ZERO_ERROR; + + wlines_=new WLine[numLines_]; wchar_t ws[100]; int32_t wcap = sizeof(ws) / sizeof(*ws); int32_t wl; - wchar_t* wcs; - - sS0_=new stlstring[numLines_]; - for(int32_t i=0; i<numLines_; i++) { - if(uselen_) { - wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len, &err); - memcpy(wlines_[i].name, wcs, wl * sizeof(wchar_t)); - wlines_[i].len = wl; - sS0_[i]=stlstring(wlines_[i].name, wlines_[i].len); - } else { - wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len-1, &err); - memcpy(wlines_[i].name, wcs, wl*sizeof(wchar_t)); - wlines_[i].len = wl; - sS0_[i]=stlstring(wlines_[i].name, wlines_[i].len+1); - } - - if (U_FAILURE(err)) { - return; - } - } - - } - - void prepareBulkForStd(void) - { - UErrorCode err=U_ZERO_ERROR; - - const UChar* uSrc = src_; - int32_t uSrcLen = srcLen_; - wchar_t* wDest = NULL; - int32_t wDestLen = 0; - int32_t reqLen= 0 ; - - if(uselen_) { - /* pre-flight*/ - u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen,&err); - - if(err == U_BUFFER_OVERFLOW_ERROR){ - err=U_ZERO_ERROR; - wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen)); - wDestLen = reqLen; - u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen,&err); - } - - if (U_SUCCESS(err)) { - wsrc_ = wDest; - wsrcLen_ = wDestLen; - sbulk_=new stlstring(wsrc_,wsrcLen_); - } - - } else { - /* pre-flight*/ - u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err); - - if(err == U_BUFFER_OVERFLOW_ERROR){ - err=U_ZERO_ERROR; - wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen+1)); - wDestLen = reqLen+1; - u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err); - } - - if (U_SUCCESS(err)) { - wsrc_ = wDest; - wsrcLen_ = wDestLen; - sbulk_=new stlstring(wsrc_); - } - } - - //free(wDest); - } + wchar_t* wcs; + + sS0_=new stlstring[numLines_]; + for(int32_t i=0; i<numLines_; i++) { + if(uselen_) { + wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len, &err); + memcpy(wlines_[i].name, wcs, wl * sizeof(wchar_t)); + wlines_[i].len = wl; + sS0_[i]=stlstring(wlines_[i].name, wlines_[i].len); + } else { + wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len-1, &err); + memcpy(wlines_[i].name, wcs, wl*sizeof(wchar_t)); + wlines_[i].len = wl; + sS0_[i]=stlstring(wlines_[i].name, wlines_[i].len+1); + } + + if (U_FAILURE(err)) { + return; + } + } + + } + + void prepareBulkForStd(void) + { + UErrorCode err=U_ZERO_ERROR; + + const UChar* uSrc = src_; + int32_t uSrcLen = srcLen_; + wchar_t* wDest = NULL; + int32_t wDestLen = 0; + int32_t reqLen= 0 ; + + if(uselen_) { + /* pre-flight*/ + u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen,&err); + + if(err == U_BUFFER_OVERFLOW_ERROR){ + err=U_ZERO_ERROR; + wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen)); + wDestLen = reqLen; + u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen,&err); + } + + if (U_SUCCESS(err)) { + wsrc_ = wDest; + wsrcLen_ = wDestLen; + sbulk_=new stlstring(wsrc_,wsrcLen_); + } + + } else { + /* pre-flight*/ + u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err); + + if(err == U_BUFFER_OVERFLOW_ERROR){ + err=U_ZERO_ERROR; + wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen+1)); + wDestLen = reqLen+1; + u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err); + } + + if (U_SUCCESS(err)) { + wsrc_ = wDest; + wsrcLen_ = wDestLen; + sbulk_=new stlstring(wsrc_); + } + } + + //free(wDest); + } private: - ICUStringPerfFn fn1_; - StdStringPerfFn fn2_; - - ULine* lines_; - WLine* wlines_; - int32_t numLines_; - - UBool uselen_; - UChar* src_; - int32_t srcLen_; - wchar_t* wsrc_; - int32_t wsrcLen_; + ICUStringPerfFn fn1_; + StdStringPerfFn fn2_; + + ULine* lines_; + WLine* wlines_; + int32_t numLines_; + + UBool uselen_; + UChar* src_; + int32_t srcLen_; + wchar_t* wsrc_; + int32_t wsrcLen_; UBool line_mode_; - - //added for preparing testing data - UnicodeString* uS0_; - stlstring* sS0_; - UnicodeString* ubulk_; - stlstring* sbulk_; - FnType fnType_; -}; + + //added for preparing testing data + UnicodeString* uS0_; + stlstring* sS0_; + UnicodeString* ubulk_; + stlstring* sbulk_; + FnType fnType_; +}; class StringPerformanceTest : public UPerfTest { public: - StringPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status); - ~StringPerformanceTest(); - virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, - const char *&name, - char *par = NULL); - UPerfFunction* TestCtor(); - UPerfFunction* TestCtor1(); - UPerfFunction* TestCtor2(); - UPerfFunction* TestCtor3(); - UPerfFunction* TestAssign(); - UPerfFunction* TestAssign1(); - UPerfFunction* TestAssign2(); - UPerfFunction* TestGetch(); - UPerfFunction* TestCatenate(); - UPerfFunction* TestScan(); - UPerfFunction* TestScan1(); - UPerfFunction* TestScan2(); - - UPerfFunction* TestStdLibCtor(); - UPerfFunction* TestStdLibCtor1(); - UPerfFunction* TestStdLibCtor2(); - UPerfFunction* TestStdLibCtor3(); - UPerfFunction* TestStdLibAssign(); - UPerfFunction* TestStdLibAssign1(); - UPerfFunction* TestStdLibAssign2(); - UPerfFunction* TestStdLibGetch(); - UPerfFunction* TestStdLibCatenate(); - UPerfFunction* TestStdLibScan(); - UPerfFunction* TestStdLibScan1(); - UPerfFunction* TestStdLibScan2(); + StringPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status); + ~StringPerformanceTest(); + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, + const char *&name, + char *par = NULL); + UPerfFunction* TestCtor(); + UPerfFunction* TestCtor1(); + UPerfFunction* TestCtor2(); + UPerfFunction* TestCtor3(); + UPerfFunction* TestAssign(); + UPerfFunction* TestAssign1(); + UPerfFunction* TestAssign2(); + UPerfFunction* TestGetch(); + UPerfFunction* TestCatenate(); + UPerfFunction* TestScan(); + UPerfFunction* TestScan1(); + UPerfFunction* TestScan2(); + + UPerfFunction* TestStdLibCtor(); + UPerfFunction* TestStdLibCtor1(); + UPerfFunction* TestStdLibCtor2(); + UPerfFunction* TestStdLibCtor3(); + UPerfFunction* TestStdLibAssign(); + UPerfFunction* TestStdLibAssign1(); + UPerfFunction* TestStdLibAssign2(); + UPerfFunction* TestStdLibGetch(); + UPerfFunction* TestStdLibCatenate(); + UPerfFunction* TestStdLibScan(); + UPerfFunction* TestStdLibScan1(); + UPerfFunction* TestStdLibScan2(); private: - long COUNT_; - ULine* filelines_; - UChar* StrBuffer; - int32_t StrBufferLen; + long COUNT_; + ULine* filelines_; + UChar* StrBuffer; + int32_t StrBufferLen; }; -inline void ctor(const UChar* src,int32_t srcLen, UnicodeString s0) +inline void ctor(const UChar* src,int32_t srcLen, UnicodeString s0) { - UnicodeString a; + UnicodeString a; } -inline void ctor1(const UChar* src,int32_t srcLen, UnicodeString s0) +inline void ctor1(const UChar* src,int32_t srcLen, UnicodeString s0) { - UnicodeString b(uTESTCHAR1); + UnicodeString b(uTESTCHAR1); } -inline void ctor2(const UChar* src,int32_t srcLen, UnicodeString s0) +inline void ctor2(const UChar* src,int32_t srcLen, UnicodeString s0) { - UnicodeString c(uEMPTY); + UnicodeString c(uEMPTY); } -inline void ctor3(const UChar* src,int32_t srcLen, UnicodeString s0) +inline void ctor3(const UChar* src,int32_t srcLen, UnicodeString s0) { - UnicodeString d(src,srcLen); + UnicodeString d(src,srcLen); } inline UnicodeString icu_assign_helper(const UChar* src,int32_t srcLen) { - if (srcLen==-1) { return src;} - else { return UnicodeString(src, srcLen);} + if (srcLen==-1) { return src;} + else { return UnicodeString(src, srcLen);} } -inline void assign(const UChar* src,int32_t srcLen, UnicodeString s0) +inline void assign(const UChar* src,int32_t srcLen, UnicodeString s0) { - unistr = icu_assign_helper(src,srcLen); + unistr = icu_assign_helper(src,srcLen); } -inline void assign1(const UChar* src,int32_t srcLen, UnicodeString s0) +inline void assign1(const UChar* src,int32_t srcLen, UnicodeString s0) { - unistr.setTo(src, srcLen); + unistr.setTo(src, srcLen); } -inline void assign2(const UChar* src,int32_t srcLen, UnicodeString s0) +inline void assign2(const UChar* src,int32_t srcLen, UnicodeString s0) { - unistr = s0; + unistr = s0; } inline void getch(const UChar* src,int32_t srcLen, UnicodeString s0) { - s0.charAt(0); + s0.charAt(0); } inline void catenate(const UChar* src,int32_t srcLen, UnicodeString s0) { - UTimer mystart, mystop; - utimer_getTime(&mystart); - - *catICU += s0; - - utimer_getTime(&mystop); + UTimer mystart, mystop; + utimer_getTime(&mystart); + + *catICU += s0; + + utimer_getTime(&mystop); double mytime = utimer_getDeltaSeconds(&mystart,&mystop); - printf("\nmytime=%f \n", mytime); + printf("\nmytime=%f \n", mytime); - *catICU += uCatenate_STR; + *catICU += uCatenate_STR; } volatile int scan_idx; @@ -448,103 +447,103 @@ U_STRING_DECL(SCAN1, "123", 3); inline void scan(const UChar* src,int32_t srcLen, UnicodeString s0) { - UChar c='.'; - scan_idx = uScan_STRING.indexOf(c); + UChar c='.'; + scan_idx = uScan_STRING.indexOf(c); } inline void scan1(const UChar* src,int32_t srcLen, UnicodeString s0) { - scan_idx = uScan_STRING.indexOf(SCAN1,3); + scan_idx = uScan_STRING.indexOf(SCAN1,3); } inline void scan2(const UChar* src,int32_t srcLen, UnicodeString s0) { - UChar c1='s'; - UChar c2='m'; - scan_idx = uScan_STRING.indexOf(c1); - scan_idx = uScan_STRING.indexOf(c2); + UChar c1='s'; + UChar c2='m'; + scan_idx = uScan_STRING.indexOf(c1); + scan_idx = uScan_STRING.indexOf(c2); } inline void StdLibCtor(const wchar_t* src,int32_t srcLen, stlstring s0) { - stlstring a; + stlstring a; } inline void StdLibCtor1(const wchar_t* src,int32_t srcLen, stlstring s0) { - - stlstring b(simulate); + stlstring b(simulate); } inline void StdLibCtor2(const wchar_t* src,int32_t srcLen, stlstring s0) { - stlstring c(sEMPTY); + stlstring c(sEMPTY); } inline void StdLibCtor3(const wchar_t* src,int32_t srcLen, stlstring s0) { - if (srcLen==-1) { - stlstring d(src); - }else { - stlstring d(src, srcLen); - } + if (srcLen==-1) { + stlstring d(src); + }else { + stlstring d(src, srcLen); + } } inline stlstring stl_assign_helper(const wchar_t* src,int32_t srcLen) { - if (srcLen==-1) { return src;} - else { return stlstring(src, srcLen);} + if (srcLen==-1) { return src;} + else { return stlstring(src, srcLen);} } -inline void StdLibAssign(const wchar_t* src,int32_t srcLen, stlstring s0) +inline void StdLibAssign(const wchar_t* src,int32_t srcLen, stlstring s0) { - stlstr = stl_assign_helper(src,srcLen); + stlstr = stl_assign_helper(src,srcLen); } -inline void StdLibAssign1(const wchar_t* src,int32_t srcLen, stlstring s0) +inline void StdLibAssign1(const wchar_t* src,int32_t srcLen, stlstring s0) { - if (srcLen==-1) { stlstr=src;} - else { stlstr.assign(src, srcLen);} + if (srcLen==-1) { stlstr=src;} + else { stlstr.assign(src, srcLen);} } -inline void StdLibAssign2(const wchar_t* src,int32_t srcLen, stlstring s0) +inline void StdLibAssign2(const wchar_t* src,int32_t srcLen, stlstring s0) { - stlstr=s0; + stlstr=s0; } inline void StdLibGetch(const wchar_t* src,int32_t srcLen, stlstring s0) { - s0.at(0); + s0.at(0); } inline void StdLibCatenate(const wchar_t* src,int32_t srcLen, stlstring s0) { - UTimer mystart, mystop; - utimer_getTime(&mystart); + UTimer mystart, mystop; + utimer_getTime(&mystart); *catStd += s0; - *catStd += sCatenate_STR; + *catStd += sCatenate_STR; - utimer_getTime(&mystop); + utimer_getTime(&mystop); double mytime = utimer_getDeltaSeconds(&mystart,&mystop); - printf("\nmytime=%f \n", mytime); - + printf("\nmytime=%f \n", mytime); + } inline void StdLibScan(const wchar_t* src,int32_t srcLen, stlstring s0) { - scan_idx = (int) sScan_STRING.find('.'); + scan_idx = (int) sScan_STRING.find('.'); } inline void StdLibScan1(const wchar_t* src,int32_t srcLen, stlstring s0) { - scan_idx = (int) sScan_STRING.find(L"123"); + scan_idx = (int) sScan_STRING.find(L"123"); } inline void StdLibScan2(const wchar_t* src,int32_t srcLen, stlstring s0) { - scan_idx = (int) sScan_STRING.find_first_of(L"sm"); + scan_idx = (int) sScan_STRING.find_first_of(L"sm"); } -#endif // STRINGPERF_H
\ No newline at end of file +#endif // STRINGPERF_H + diff --git a/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.vcproj b/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.vcproj index 2e11d087da8..340d1047c84 100644 --- a/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.vcproj +++ b/Build/source/libs/icu-xetex/test/perf/ustrperf/stringperf.vcproj @@ -102,7 +102,7 @@ Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" - AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib" + AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib" OutputFile=".\Debug/stringperf.exe" LinkIncremental="1" SuppressStartupBanner="TRUE" diff --git a/Build/source/libs/icu-xetex/test/perf/utfperf/.cvsignore b/Build/source/libs/icu-xetex/test/perf/utfperf/.cvsignore new file mode 100644 index 00000000000..4d5fd3c4353 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/utfperf/.cvsignore @@ -0,0 +1,6 @@ +*.d +*.o +utfperf +Debug +Release +Makefile diff --git a/Build/source/libs/icu-xetex/test/perf/utfperf/Makefile.in b/Build/source/libs/icu-xetex/test/perf/utfperf/Makefile.in new file mode 100644 index 00000000000..51af2c683a6 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/utfperf/Makefile.in @@ -0,0 +1,78 @@ +## Makefile.in for ICU - test/perf/utfperf +## Copyright (c) 2001-2006, International Business Machines Corporation and +## others. All Rights Reserved. + +## Source directory information +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ + +top_builddir = ../../.. + +include $(top_builddir)/icudefs.mk + +## Build directory information +subdir = test/perf/utfperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = utfperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = utfperf.o + +DEPS = $(OBJECTS:.o=.d) + +## List of phony targets +.PHONY : all all-local install install-local clean clean-local \ +distclean distclean-local dist dist-local check check-local + +## Clear suffix list +.SUFFIXES : + +## List of standard targets +all: all-local +install: install-local +clean: clean-local +distclean : distclean-local +dist: dist-local +check: all check-local + +all-local: $(TARGET) + +install-local: + +dist-local: + +clean-local: + test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) + $(RMV) $(OBJECTS) $(TARGET) + +distclean-local: clean-local + $(RMV) Makefile + +check-local: all-local + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(TARGET) : $(OBJECTS) + $(LINK.cc) -o $@ $^ $(LIBS) + +invoke: + ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION) + +ifeq (,$(MAKECMDGOALS)) +-include $(DEPS) +else +ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu-xetex/test/perf/utfperf/UtfPerf.pl b/Build/source/libs/icu-xetex/test/perf/utfperf/UtfPerf.pl new file mode 100755 index 00000000000..0c7ff961a3a --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/utfperf/UtfPerf.pl @@ -0,0 +1,46 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2005, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Utf performance: ICU", + "headers"=>"ICU", + "operationIs"=>"gb18030 encoding string", + "passes"=>"1", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"../data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "debug/utfperf.exe -e gb18030"; + +my $tests = { + "UTF-8", ["$p UTF_8"], + "UTF-8 small buffer", ["$p UTF_8_SB"], + "SCSU", ["$p SCSU"], + "SCSU small buffer", ["$p SCSU_SB"], + "BOCU_1", ["$p BOCU_1"], + "BOCU_1 small buffer", ["$p BOCU_1_SB"], + }; + +my $dataFiles = { + "", + [ + "four.txt" + ] + }; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu-xetex/test/perf/utfperf/utfperf.cpp b/Build/source/libs/icu-xetex/test/perf/utfperf/utfperf.cpp new file mode 100644 index 00000000000..d83538bdbce --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/utfperf/utfperf.cpp @@ -0,0 +1,156 @@ +/* +********************************************************************** +* Copyright (C) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: utfperf.cpp +* encoding: US-ASCII +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2005Nov17 +* created by: Raymond Yang +* +* Ported from utfper.c created by Markus W. Scherer +* Performance test program for Unicode converters +*/ + +#include <stdio.h> +#include "unicode/uperf.h" + + +/* definitions and text buffers */ + +#define INPUT_CAPACITY (1024*1024) +#define INTERMEDIATE_CAPACITY 4096 +#define INTERMEDIATE_SMALL_CAPACITY 20 +#define OUTPUT_CAPACITY INPUT_CAPACITY + +static UChar input[INPUT_CAPACITY]; +static UChar output[OUTPUT_CAPACITY]; +static char intermediate[INTERMEDIATE_CAPACITY]; + +static int32_t inputLength, encodedLength, outputLength, countInputCodePoints; + + +class Command : public UPerfFunction { +private: + Command(const char * name, int32_t buf_cap):name(name),buf_cap(buf_cap){ + errorCode=U_ZERO_ERROR; + cnv=ucnv_open(name, &errorCode); + } +public: + static UPerfFunction* get(const char * name, int32_t buf_cap){ + Command * t = new Command(name, buf_cap); + if (U_SUCCESS(t->errorCode)){ + return t; + } else { + //fprintf(stderr, "error opening converter for \"%s\" - %s\n", name, u_errorName(errorCode)); + delete t; + return NULL; + } + } + virtual ~Command(){ + if(U_SUCCESS(errorCode)) { + ucnv_close(cnv); + } + } + virtual void call(UErrorCode* pErrorCode){ + const UChar *pIn, *pInLimit; + UChar *pOut, *pOutLimit; + char *pInter, *pInterLimit; + const char *p; + UBool flush; + + ucnv_reset(cnv); + + pIn=input; + pInLimit=input+inputLength; + + pOut=output; + pOutLimit=output+OUTPUT_CAPACITY; + + pInterLimit=intermediate+buf_cap; + + encodedLength=outputLength=0; + flush=FALSE; + + while(pIn<pInLimit || !flush) { + /* convert a block of [pIn..pInLimit[ to the encoding in intermediate[] */ + pInter=intermediate; + flush=(UBool)(pIn==pInLimit); + ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, flush, pErrorCode); + encodedLength+=(int32_t)(pInter-intermediate); + + if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { + /* in case flush was TRUE make sure that we convert once more to really flush */ + flush=FALSE; + *pErrorCode=U_ZERO_ERROR; + } else if(U_FAILURE(*pErrorCode)) { + return; + } + + /* convert the block [intermediate..pInter[ back to UTF-16 */ + p=intermediate; + ucnv_toUnicode(cnv, &pOut, pOutLimit,&p, pInter,NULL, flush,pErrorCode); + if(U_FAILURE(*pErrorCode)) { + return; + } + /* intermediate must have been consumed (p==pInter) because of the converter semantics */ + } + + outputLength=pOut-output; + if(inputLength!=outputLength) { + fprintf(stderr, "error: roundtrip failed, inputLength %d!=outputLength %d\n", inputLength, outputLength); + *pErrorCode=U_INTERNAL_PROGRAM_ERROR; + } + } + virtual long getOperationsPerIteration(){ + return countInputCodePoints; + } + const char * name; + int32_t buf_cap; + UErrorCode errorCode; + UConverter *cnv; +}; + +class UtfPerformanceTest : public UPerfTest{ +public: + UtfPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status) :UPerfTest(argc,argv,status){ + getBuffer(inputLength, status); + u_strncpy(input, buffer, inputLength); + countInputCodePoints = u_countChar32(input, inputLength); + } + + virtual UPerfFunction* runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ){ + switch (index) { + case 0: name = "UTF_8"; if (exec) return Command::get("UTF-8", INTERMEDIATE_CAPACITY); break; + case 1: name = "UTF_8_SB"; if (exec) return Command::get("UTF-8",INTERMEDIATE_SMALL_CAPACITY); break; + case 2: name = "SCSU"; if (exec) return Command::get("SCSU", INTERMEDIATE_CAPACITY); break; + case 3: name = "SCSU_SB"; if (exec) return Command::get("SCSU", INTERMEDIATE_SMALL_CAPACITY); break; + case 4: name = "BOCU_1"; if (exec) return Command::get("BOCU-1", INTERMEDIATE_CAPACITY); break; + case 5: name = "BOCU_1_SB"; if (exec) return Command::get("BOCU-1",INTERMEDIATE_SMALL_CAPACITY); break; + default: name = ""; break; + } + return NULL; + } +}; + + +int main(int argc, const char *argv[]) +{ + UErrorCode status = U_ZERO_ERROR; + UtfPerformanceTest test(argc, argv, status); + + if (U_FAILURE(status)){ + printf("The error is %s\n", u_errorName(status)); + return status; + } + + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run please check the " + "arguments.\n"); + return -1; + } + return 0; +} diff --git a/Build/source/libs/icu-xetex/test/perf/utfperf/utfperf.vcproj b/Build/source/libs/icu-xetex/test/perf/utfperf/utfperf.vcproj new file mode 100644 index 00000000000..7846addc619 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/perf/utfperf/utfperf.vcproj @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="gb2312"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="utfperf" + ProjectGUID="{E7728E98-0469-43F4-AF37-4529A3D52C6B}" + SccProjectName="" + SccLocalPath=""> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + PrecompiledHeaderFile=".\Debug/utfperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib winmm.lib icutestd.lib" + OutputFile=".\Debug/utfperf.exe" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\Debug/utfperf.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/utfperf.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="TRUE" + RuntimeLibrary="2" + EnableFunctionLevelLinking="TRUE" + PrecompiledHeaderFile=".\Release/utfperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib " + OutputFile=".\Release/utfperf.exe" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\..\..\lib\" + ProgramDatabaseFile=".\Release/utfperf.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/utfperf.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> + <File + RelativePath=".\utfperf.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl"> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu-xetex/test/testdata/CollationTest_NON_IGNORABLE_STUB.txt b/Build/source/libs/icu-xetex/test/testdata/CollationTest_NON_IGNORABLE_STUB.txt index 18000626770..e980f37b977 100644 --- a/Build/source/libs/icu-xetex/test/testdata/CollationTest_NON_IGNORABLE_STUB.txt +++ b/Build/source/libs/icu-xetex/test/testdata/CollationTest_NON_IGNORABLE_STUB.txt @@ -1,4103 +1,4335 @@ -0334 05A8; -0334 06E7; -0334 1D180; -059E 0334; -06D9 0334; -1D168 0334; -0332 0334; -0334 0308 0301; -0315 0334; -0324 0334; -033A 0334; -034E 0334; -035E 0334; -05B0 0334; -0334 FB1E; -0334 0659; -0334 0737; -0334 0746; -0334 10A0D; -0334 17DD; -0334 20D5; -20EB 0334; -0085 0062; -2001 003F; -2002 0041; -202F 0062; -0384 003F; -00AF 0061; -FE4C 0062; -1FED 003F; -1FCE 0334; -1FCE 0062; -1FFE 0062; -FF3F 0061; -309B 003F; -058A 003F; -FE32 0021; -2053 003F; -FF65 0061; -060C 003F; -FE51 0021; -037E 0021; -204F 003F; -0589 003F; -0707 003F; -1366 003F; -16EC 003F; -001A 0021; -0098 0021; -05A4 0021; -06DB 0021; -200B 0021; -FDD3 0021; -1D167 0021; -1D18A 0021; -BFFFF 0021; -E0038 0021; -E0056 0021; -E0074 0021; -E0112 0021; -E0130 0021; -E014E 0021; -E016C 0021; -E018A 0021; -E01A8 0021; -E01C6 0021; -E01E4 0021; -0344 0021; -0323 0021; -034A 0021; -0483 0021; -FE76 0021; -065B 0021; -0748 0021; -0C01 0021; -0ECD 0021; -302F 0021; -20E9 0021; -FF01 0062; -0011 003F; -008F 003F; -059B 003F; -0612 003F; -0F82 003F; -D801 003F; -FE73 003F; -1D17F 003F; -7FFFE 003F; -E002F 003F; -E004D 003F; -E006B 003F; -E0109 003F; -E0127 003F; -E0145 003F; -E0163 003F; -E0181 003F; -E019F 003F; -E01BD 003F; -E01DB 003F; -0341 003F; -031A 003F; -033C 003F; -0360 003F; -064B 003F; -FE7E 003F; -073F 003F; -0ABC 003F; -0E4A 003F; -17DD 003F; -20E0 003F; -003F 0061; -0709 0041; -FE52 0021; -2024 0041; -1362 0041; -3002 003F; -0965 0041; -17D5 0041; -1368 0041; -2059 0041; -2CFC 0041; -103D0 0041; -201B 0041; -201D 0041; -00AB 0041; -247E 003F; -2484 003F; -2477 003F; -0028 0041; -249E 0041; -24A4 0041; -24AA 0041; -24B0 0041; -3200 0041; -3203 0041; -3206 0041; -3208 0041; -3218 0041; -321B 0041; -3224 0041; -3238 0041; -322F 0041; -3231 0041; -3237 0041; -322E 0041; -208E 0062; -FF3D 0062; -007D 0061; -0F3D 0041; -29FD 0041; -2986 0062; -298C 0041; -2992 0041; -2998 0041; -2E0A 0041; -2329 0041; -300A 0062; -300D 003F; -300F 0062; -FE5D 0061; -3016 0062; -301B 0041; -00A9 0041; -FF0A 0061; -002F 0062; -FF06 0061; -FF03 0062; -2031 0041; -2027 0041; -2034 0062; -303D 0041; -2050 0041; -2E07 0041; -2E11 0041; -055A 0041; -05C6 0041; -070D 0041; -0E5B 0041; -0F09 0041; -0F0D 0041; -0F85 0041; -17D7 0041; -10A51 0041; -0374 003F; -02C4 0041; -02CA 0041; -02D2 0041; -02DE 0041; -02E9 0041; -02F0 0041; -02F6 0041; -02FC 0041; -1392 0041; -1398 0041; -A704 0041; -A70A 0041; -A710 0041; -A716 0041; -060F 0041; -0BF4 0041; -A828 0041; -0F02 0041; -0F1A 0041; -0F34 0041; -0FBF 0041; -0FC5 0041; -0FCC 0041; -19E4 0041; -19EA 0041; -19F0 0041; -19F6 0041; -19FC 0041; -2114 0041; -2125 0041; -2141 0041; -FFE9 0021; -219B 0062; -21AE 0041; -219C 0061; -21A2 0061; -21A8 0061; -21AF 0061; -21B5 0061; -21BB 0061; -21C1 0061; -21C7 0061; -21D0 0021; -21D3 0041; -21D8 003F; -21DE 003F; -21E4 003F; -21EA 003F; -21F0 003F; -21F6 003F; -21FC 003F; -1D6DB 0021; -2204 0334; -1D735 003F; -2209 0041; -220E 0021; -208A 0021; -00F7 0021; -FE64 0062; -FE66 0061; -226F 0061; -00A6 0061; -207B 0041; -2217 0062; -221D 0062; -2223 003F; -2229 0021; -222E 0021; -2234 0021; -223A 0021; -223E 0041; -2247 0334; -224A 0061; -224F 0021; -2255 0021; -225B 0021; -2262 003F; -2265 0061; -226A 0062; -2273 0041; -2280 0334; -227C 0041; -2284 0021; -2288 0041; -228D 0021; -2291 0062; -2296 003F; -229C 003F; -22AC 0334; -22A6 0062; -22AA 0021; -22EA 0021; -22EC 0041; -22B9 0021; -22BF 0021; -22C5 0021; -22CB 0021; -22D1 0021; -22D7 0021; -22DD 0021; -22E7 0021; -22F1 0021; -22F7 0021; -22FD 0021; -2303 0021; -2309 0021; -230F 0021; -2315 0021; -231B 0021; -2321 0021; -2327 0021; -232F 0021; -2335 0021; -233B 0021; -2341 0021; -2347 0021; -234D 0021; -2353 0021; -2359 0021; -235F 0021; -2365 0021; -236B 0021; -2371 0021; -2377 0021; -237D 0021; -2383 0021; -2389 0021; -238F 0021; -2395 0021; -239B 0021; -23A1 0021; -23A7 0021; -23AD 0021; -23B3 0021; -23B9 0021; -23BF 0021; -23C5 0021; -23CB 0021; -23D1 0021; -23D7 0021; -2401 0021; -2407 0021; -240D 0021; -2413 0021; -2419 0021; -241F 0021; -2425 0021; -2444 0021; -244A 0021; -2504 0021; -250A 0021; -2510 0021; -2516 0021; -251C 0021; -2522 0021; -2528 0021; -252E 0021; -2534 0021; -253A 0021; -2540 0021; -2546 0021; -254C 0021; -2552 0021; -2558 0021; -255E 0021; -2564 0021; -256A 0021; -2570 0021; -2576 0021; -257C 0021; -2582 0021; -2588 0021; -258E 0021; -2594 0021; -259A 0021; -25A0 0021; -25A5 0021; -25AB 0021; -25B1 0021; -25B7 0021; -25BD 0021; -25C3 0021; -25C9 0021; -25CE 0021; -25D4 0021; -25DA 0021; -25E0 0021; -25E6 0021; -25EC 0021; -25F2 0021; -25F8 0021; -25FE 0021; -2604 0021; -260A 0021; -2610 0021; -2616 0021; -261C 0021; -2622 0021; -2628 0021; -262E 0021; -263C 0021; -2642 0021; -2648 0021; -264E 0021; -2654 0021; -265A 0021; -2660 0021; -2666 0021; -266C 0021; -2675 0021; -267B 0021; -2681 0021; -2687 0021; -2693 0021; -2699 0021; -26A2 0021; -26A8 0021; -26AE 0021; -2703 0021; -270C 0021; -2712 0021; -2718 0021; -271E 0021; -2724 0021; -272B 0021; -2731 0021; -2737 0021; -273D 0021; -2743 0021; -2749 0021; -2751 0021; -275B 0021; -2763 0021; -2769 0021; -276F 0021; -2775 0021; -279C 0021; -27A2 0021; -27A8 0021; -27AE 0021; -27B5 0021; -27BB 0021; -27C2 0021; -27D1 0021; -27D7 0021; -27DD 0021; -27E3 0021; -27E9 0021; -27F3 0021; -27F9 0021; -27FF 0021; -2905 0021; -290B 0021; -2911 0021; -2917 0021; -291D 0021; -2923 0021; -2929 0021; -292F 0021; -2935 0021; -293B 0021; -2941 0021; -2947 0021; -294D 0021; -2953 0021; -2959 0021; -295F 0021; -2965 0021; -296B 0021; -2971 0021; -2977 0021; -297D 0021; -2999 0021; -299F 0021; -29A5 0021; -29AB 0021; -29B1 0021; -29B7 0021; -29BD 0021; -29C3 0021; -29C9 0021; -29CF 0021; -29D5 0021; -29DB 0021; -29E1 0021; -29E7 0021; -29ED 0021; -29F3 0021; -29F9 0021; -2A01 0021; -2A07 0021; -2A0E 0021; -2A14 0021; -2A1A 0021; -2A20 0021; -2A26 0021; -2A2C 0021; -2A32 0021; -2A38 0021; -2A3E 0021; -2A44 0021; -2A4A 0021; -2A50 0021; -2A56 0021; -2A5C 0021; -2A62 0021; -2A68 0021; -2A6E 0021; -2A77 0021; -2A7D 0021; -2A83 0021; -2A89 0021; -2A8F 0021; -2A95 0021; -2A9B 0021; -2AA1 0021; -2AA7 0021; -2AAD 0021; -2AB3 0021; -2AB9 0021; -2ABF 0021; -2AC5 0021; -2ACB 0021; -2AD1 0021; -2AD7 0021; -2ADC 003F; -2AE2 0041; -2AE8 0041; -2AEE 0041; -2AF4 0041; -2AFA 0041; -2B00 0041; -2B06 0041; -2B0C 0041; -2B12 0041; -2CE9 0041; -2804 0041; -280A 0041; -2810 0041; -2816 0041; -281C 0041; -2822 0041; -2828 0041; -282E 0041; -2834 0041; -283A 0041; -2840 0041; -2846 0041; -284C 0041; -2852 0041; -2858 0041; -285E 0041; -2864 0041; -286A 0041; -2870 0041; -2876 0041; -287C 0041; -2882 0041; -2888 0041; -288E 0041; -2894 0041; -289A 0041; -28A0 0041; -28A6 0041; -28AC 0041; -28B2 0041; -28B8 0041; -28BE 0041; -28C4 0041; -28CA 0041; -28D0 0041; -28D6 0041; -28DC 0041; -28E2 0041; -28E8 0041; -28EE 0041; -28F4 0041; -28FA 0041; -268A 0041; -2630 0041; -2636 0041; -4DC4 0041; -4DCA 0041; -4DD0 0041; -4DD6 0041; -4DDC 0041; -4DE2 0041; -4DE8 0041; -4DEE 0041; -4DF4 0041; -4DFA 0041; -1D300 0041; -1D306 0041; -1D30C 0041; -1D312 0041; -1D318 0041; -1D31E 0041; -1D324 0041; -1D32A 0041; -1D330 0041; -1D336 0041; -1D33C 0041; -1D342 0041; -1D348 0041; -1D34E 0041; -1D354 0041; -A493 0041; -A499 0041; -A49F 0041; -A4A5 0041; -A4AB 0041; -A4B1 0041; -A4B7 0041; -A4BD 0041; -A4C3 0041; -10139 0041; -1013F 0041; -1017E 0041; -10184 0041; -1D000 0041; -1D006 0041; -1D00C 0041; -1D012 0041; -1D018 0041; -1D01E 0041; -1D024 0041; -1D02A 0041; -1D030 0041; -1D036 0041; -1D03C 0041; -1D042 0041; -1D048 0041; -1D04E 0041; -1D054 0041; -1D05A 0041; -1D060 0041; -1D066 0041; -1D06C 0041; -1D072 0041; -1D078 0041; -1D07E 0041; -1D084 0041; -1D08A 0041; -1D090 0041; -1D096 0041; -1D09C 0041; -1D0A2 0041; -1D0A8 0041; -1D0AE 0041; -1D0B4 0041; -1D0BA 0041; -1D0C0 0041; -1D0C6 0041; -1D0CC 0041; -1D0D2 0041; -1D0D8 0041; -1D0DE 0041; -1D0E4 0041; -1D0EA 0041; -1D0F0 0041; -1D100 0041; -1D106 0041; -1D10C 0041; -1D112 0041; -1D118 0041; -1D11E 0041; -1D124 0041; -1D12A 0041; -1D130 0041; -1D136 0041; -1D13C 0041; -1D142 0041; -1D148 0041; -1D14E 0041; -1D154 0041; -1D158 1D165 0334; -1D163 003F; -1D15A 0061; -1D16C 0061; -1D18F 0061; -1D195 0061; -1D19B 0061; -1D1A1 0061; -1D1A7 0061; -1D1B1 0061; -1D1B7 0061; -1D1BF 0061; -1D1BE 0061; -1D1C5 0021; -1D1CB 0021; -1D1D1 0021; -1D1D7 0021; -1D1DD 0021; -1D205 0021; -1D20B 0021; -1D211 0021; -1D217 0021; -1D21D 0021; -1D223 0021; -1D229 0021; -1D22F 0021; -1D235 0021; -1D23B 0021; -1D241 0021; -2FF4 0021; -2FFA 0021; -31C4 0021; -31CA 0021; -3004 0021; -303E 0021; -FFFD 0021; -1372 0021; -1378 0021; -2181 0021; -10110 0021; -10116 0021; -1011C 0021; -10122 0021; -10128 0021; -1012E 0021; -10140 0021; -10149 0021; -10150 0021; -10156 0021; -10164 0021; -1016A 0021; -10170 0021; -10177 0021; -10A45 0021; -0EC6 0021; -3033 0041; -FF70 0041; -FFE0 0062; -00A5 0061; -0BF9 0062; -20A3 0062; -FFE6 0062; -20AF 0062; -20B5 0062; -1040 0021; -19D0 003F; -2070 0041; -19D0 0041; -2070 0062; -3358 0062; -19D1 0021; -00B9 003F; -10159 003F; -2155 0041; -2469 0061; -246A 0021; -246B 0021; -246C 0021; -2495 003F; -24EF 0061; -33EF 0021; -3369 0021; -2472 0021; -1D7D9 0061; -104A1 0041; -0F21 0041; -FF11 0062; +0334 05A9; +0334 06E8; +0334 1D181; +059F 0334; +06DA 0334; +1B71 0334; +1D18B 0334; +030A 0334; +030F 0334; +0320 0334; +0331 0334; +034A 0334; +035A 0334; +1DC5 0334; +0334 05B7; +064F 0334; +065E 0334; +073C 0334; +07EC 0334; +10A0D 0334; +17DD 0334; +20D5 0334; +20E5 0334; +0085 003F; +0020 003F; +205F 0061; +205F 0062; +FF40 0041; +FF3E 0061; +FE49 0041; +00A8 0021; +02DD 0021; +1FCE 0061; +1FFE 0061; +FF3F 003F; +2017 0041; +FF0D 0061; +2011 003F; +FE58 0061; +3030 0041; +FE50 0041; +066C 0041; +FF64 0041; +037E 0041; +FE13 0021; +0703 0041; +1361 0041; +1805 0041; +16ED 0041; +0080 0021; +009F 0021; +05AB 0021; +06E2 0021; +1B72 0021; +FDD1 0021; +1D165 0021; +1D188 0021; +AFFFF 0021; +E0036 0021; +E0054 0021; +E0072 0021; +E0110 0021; +E012E 0021; +E014C 0021; +E016A 0021; +E0188 0021; +E01A6 0021; +E01C4 0021; +E01E2 0021; +0342 0021; +0321 0021; +0348 0021; +1DC2 0021; +05BC 0021; +FC63 0021; +073C 0021; +0953 0021; +0D83 0021; +0F7F 0021; +309A 0021; +20EC 0021; +0021 0062; +0006 003F; +0089 003F; +0595 003F; +0600 003F; +06ED 003F; +202B 003F; +FE03 003F; +1D170 003F; +1D242 003F; +E0020 003F; +E003E 003F; +E005C 003F; +E007A 003F; +E0118 003F; +E0136 003F; +E0154 003F; +E0172 003F; +E0190 003F; +E01AE 003F; +E01CC 003F; +E01EA 003F; +0328 003F; +032B 003F; +0351 003F; +1DCA 003F; +064D 003F; +0657 003F; +0744 003F; +0A02 003F; +10A0D 003F; +17C9 003F; +20D6 003F; +2048 0021; +00BF 0062; +2CFA 0062; +FE19 0041; +06D4 0062; +166E 0062; +FE12 0062; +A877 0062; +17D5 0062; +07F7 0062; +1B5A 0062; +205A 0062; +2CFF 0062; +1091F 0062; +FF07 0062; +203A 0062; +201F 0062; +208D 0021; +2480 0061; +2486 0061; +2479 0061; +249C 0021; +24A0 0062; +24A6 0062; +24AC 0062; +24B2 0062; +3201 0062; +3204 0062; +3207 0062; +321C 0062; +3219 0062; +3226 0062; +323D 0062; +323F 0062; +3230 0062; +322B 0062; +3242 0062; +207E 003F; +FF3B 0041; +007B 0041; +FE38 0062; +169C 0062; +2984 0062; +2988 0062; +298E 0062; +2994 0062; +2E03 0062; +2E0D 0062; +3009 003F; +FE3E 0062; +FE42 0062; +FE3B 0062; +FE5E 003F; +FE18 0062; +FD3F 0062; +FF20 003F; +204E 0062; +FF3C 003F; +214B 0062; +FF05 0041; +2020 0062; +204C 0062; +2037 0021; +203B 0062; +2042 0062; +2E0B 0062; +2E13 0062; +055F 0062; +05F4 0062; +180A 0062; +0F05 0062; +0FD0 0062; +0F0F 0062; +104C 0062; +17D9 0062; +10A51 0062; +02B9 0061; +02C4 0062; +02CA 0062; +02D2 0062; +02DE 0062; +02E9 0062; +02F0 0062; +02F6 0062; +02FC 0062; +1392 0062; +1398 0062; +A704 0062; +A70A 0062; +A710 0062; +A716 0062; +A721 0062; +060F 0062; +0BF3 0062; +0BFA 0062; +A82B 0062; +0F15 0062; +0F1D 0062; +0F3E 0062; +0FC2 0062; +0FC9 0062; +19E1 0062; +19E7 0062; +19ED 0062; +19F3 0062; +19F9 0062; +19FF 0062; +1B66 0062; +1B75 0062; +1B7B 0062; +2118 0062; +2129 0062; +2144 0062; +2190 0062; +2193 0021; +2196 0041; +219E 0041; +21A4 0041; +21AA 0041; +21B1 0041; +21B7 0041; +21BD 0041; +21C3 0041; +21C9 0041; +21D1 003F; +21CE 0041; +21DA 0061; +21E0 0061; +21E6 0061; +21EC 0061; +21F2 0061; +21F8 0061; +21FE 0061; +2202 0061; +2205 0021; +1D6FB 0041; +220C 0021; +2210 003F; +FB29 0061; +226E 0334; +FF1D 003F; +207C 0062; +00AC 0041; +007E 0021; +2214 0021; +221A 0021; +2220 0021; +2226 0021; +222B 003F; +222F 0062; +2236 003F; +2241 0334; +2240 0062; +2246 0021; +224C 0041; +2251 003F; +2257 003F; +225D 003F; +2263 0062; +2267 0021; +2272 0338 0334; +2276 0061; +227B 0338 0334; +227D 0061; +2283 0021; +2289 0061; +228F 003F; +22E3 0041; +2298 0061; +229E 0061; +22A3 0021; +22AD 003F; +22AB 0061; +22B3 0021; +22ED 0061; +22BB 003F; +22C1 003F; +22C7 003F; +22CD 003F; +22D3 003F; +22D9 003F; +22DF 003F; +22E9 003F; +22F3 003F; +22F9 003F; +22FF 003F; +2305 003F; +230B 003F; +2311 003F; +2317 003F; +231D 003F; +2323 003F; +232B 003F; +2331 003F; +2337 003F; +233D 003F; +2343 003F; +2349 003F; +234F 003F; +2355 003F; +235B 003F; +2361 003F; +2367 003F; +236D 003F; +2373 003F; +2379 003F; +237F 003F; +2385 003F; +238B 003F; +2391 003F; +2397 003F; +239D 003F; +23A3 003F; +23A9 003F; +23AF 003F; +23B5 003F; +23BB 003F; +23C1 003F; +23C7 003F; +23CD 003F; +23D3 003F; +23D9 003F; +23DF 003F; +23E5 003F; +2403 003F; +2409 003F; +240F 003F; +2415 003F; +241B 003F; +2421 003F; +2440 003F; +2446 003F; +2501 003F; +2506 003F; +250C 003F; +2512 003F; +2518 003F; +251E 003F; +2524 003F; +252A 003F; +2530 003F; +2536 003F; +253C 003F; +2542 003F; +2548 003F; +254E 003F; +2554 003F; +255A 003F; +2560 003F; +2566 003F; +256C 003F; +2572 003F; +2578 003F; +257E 003F; +2584 003F; +258A 003F; +2590 003F; +2596 003F; +259C 003F; +25A1 003F; +25A7 003F; +25AD 003F; +25B3 003F; +25B9 003F; +25BF 003F; +25C5 003F; +FFEE 0021; +25D0 003F; +25D6 003F; +25DC 003F; +25E2 003F; +25E8 003F; +25EE 003F; +25F4 003F; +25FA 003F; +2600 003F; +2606 003F; +260C 003F; +2612 003F; +2618 003F; +261E 003F; +2624 003F; +262A 003F; +2638 003F; +263E 003F; +2644 003F; +264A 003F; +2650 003F; +2656 003F; +265C 003F; +2662 003F; +2668 003F; +2671 003F; +2677 003F; +267D 003F; +2683 003F; +2689 003F; +2695 003F; +269B 003F; +26A4 003F; +26AA 003F; +26B0 003F; +2704 003F; +270D 003F; +2713 003F; +2719 003F; +271F 003F; +2725 003F; +272C 003F; +2732 003F; +2738 003F; +273E 003F; +2744 003F; +274A 003F; +2752 003F; +275C 003F; +2764 003F; +276A 003F; +2770 003F; +2794 003F; +279D 003F; +27A3 003F; +27A9 003F; +27AF 003F; +27B6 003F; +27BC 003F; +27C3 003F; +27C9 003F; +27D4 003F; +27DA 003F; +27E0 003F; +27E6 003F; +27F0 003F; +27F6 003F; +27FC 003F; +2902 003F; +2908 003F; +290E 003F; +2914 003F; +291A 003F; +2920 003F; +2926 003F; +292C 003F; +2932 003F; +2938 003F; +293E 003F; +2944 003F; +294A 003F; +2950 003F; +2956 003F; +295C 003F; +2962 003F; +2968 003F; +296E 003F; +2974 003F; +297A 003F; +2980 003F; +299C 003F; +29A2 003F; +29A8 003F; +29AE 003F; +29B4 003F; +29BA 003F; +29C0 003F; +29C6 003F; +29CC 003F; +29D2 003F; +29D8 003F; +29DE 003F; +29E4 003F; +29EA 003F; +29F0 003F; +29F6 003F; +29FE 003F; +2A04 003F; +2A0A 003F; +2A11 003F; +2A17 003F; +2A1D 003F; +2A23 003F; +2A29 003F; +2A2F 003F; +2A35 003F; +2A3B 003F; +2A41 003F; +2A47 003F; +2A4D 003F; +2A53 003F; +2A59 003F; +2A5F 003F; +2A65 003F; +2A6B 003F; +2A71 003F; +2A7A 003F; +2A80 003F; +2A86 003F; +2A8C 003F; +2A92 003F; +2A98 003F; +2A9E 003F; +2AA4 003F; +2AAA 003F; +2AB0 003F; +2AB6 003F; +2ABC 003F; +2AC2 003F; +2AC8 003F; +2ACE 003F; +2AD4 003F; +2ADA 003F; +2ADF 0062; +2AE5 0062; +2AEB 0062; +2AF1 0062; +2AF7 0062; +2AFD 0062; +2B03 0062; +2B09 0062; +2B0F 0062; +2B15 0062; +2B20 0062; +2CE7 0062; +2802 0062; +2808 0062; +280E 0062; +2814 0062; +281A 0062; +2820 0062; +2826 0062; +282C 0062; +2832 0062; +2838 0062; +283E 0062; +2844 0062; +284A 0062; +2850 0062; +2856 0062; +285C 0062; +2862 0062; +2868 0062; +286E 0062; +2874 0062; +287A 0062; +2880 0062; +2886 0062; +288C 0062; +2892 0062; +2898 0062; +289E 0062; +28A4 0062; +28AA 0062; +28B0 0062; +28B6 0062; +28BC 0062; +28C2 0062; +28C8 0062; +28CE 0062; +28D4 0062; +28DA 0062; +28E0 0062; +28E6 0062; +28EC 0062; +28F2 0062; +28F8 0062; +28FE 0062; +268E 0062; +2634 0062; +4DC2 0062; +4DC8 0062; +4DCE 0062; +4DD4 0062; +4DDA 0062; +4DE0 0062; +4DE6 0062; +4DEC 0062; +4DF2 0062; +4DF8 0062; +4DFE 0062; +1D304 0062; +1D30A 0062; +1D310 0062; +1D316 0062; +1D31C 0062; +1D322 0062; +1D328 0062; +1D32E 0062; +1D334 0062; +1D33A 0062; +1D340 0062; +1D346 0062; +1D34C 0062; +1D352 0062; +A491 0062; +A497 0062; +A49D 0062; +A4A3 0062; +A4A9 0062; +A4AF 0062; +A4B5 0062; +A4BB 0062; +A4C1 0062; +10137 0062; +1013D 0062; +1017C 0062; +10182 0062; +10188 0062; +1D004 0062; +1D00A 0062; +1D010 0062; +1D016 0062; +1D01C 0062; +1D022 0062; +1D028 0062; +1D02E 0062; +1D034 0062; +1D03A 0062; +1D040 0062; +1D046 0062; +1D04C 0062; +1D052 0062; +1D058 0062; +1D05E 0062; +1D064 0062; +1D06A 0062; +1D070 0062; +1D076 0062; +1D07C 0062; +1D082 0062; +1D088 0062; +1D08E 0062; +1D094 0062; +1D09A 0062; +1D0A0 0062; +1D0A6 0062; +1D0AC 0062; +1D0B2 0062; +1D0B8 0062; +1D0BE 0062; +1D0C4 0062; +1D0CA 0062; +1D0D0 0062; +1D0D6 0062; +1D0DC 0062; +1D0E2 0062; +1D0E8 0062; +1D0EE 0062; +1D0F4 0062; +1D104 0062; +1D10A 0062; +1D110 0062; +1D116 0062; +1D11C 0062; +1D122 0062; +266E 0062; +1D12E 0062; +1D134 0062; +1D13A 0062; +1D140 0062; +1D146 0062; +1D14C 0062; +1D152 0062; +1D157 0041; +1D161 0021; +1D163 0062; +1D16A 0041; +1D18D 0041; +1D193 0041; +1D199 0041; +1D19F 0041; +1D1A5 0041; +1D1AF 0041; +1D1B5 0041; +1D1BD 0021; +1D1BC 0021; +1D1C3 003F; +1D1C9 003F; +1D1CF 003F; +1D1D5 003F; +1D1DB 003F; +1D203 003F; +1D209 003F; +1D20F 003F; +1D215 003F; +1D21B 003F; +1D221 003F; +1D227 003F; +1D22D 003F; +1D233 003F; +1D239 003F; +1D23F 003F; +2FF2 003F; +2FF8 003F; +31C2 003F; +31C8 003F; +31CE 003F; +3020 003F; +327F 003F; +0BF1 003F; +1376 003F; +137C 003F; +10323 003F; +10115 003F; +1011B 003F; +10121 003F; +10127 003F; +1012D 003F; +10133 003F; +10147 003F; +1014E 003F; +10155 003F; +10163 003F; +10169 003F; +1016F 003F; +10176 003F; +10917 003F; +10A47 003F; +1245B 003F; +12461 003F; +1D36D 003F; +02D1 003F; +3032 0061; +309D 0062; +00A2 0021; +00A3 0041; +0AF1 0021; +20A2 0021; +20A9 0021; +20AE 0021; +20B4 0021; +0BE6 0021; +07C0 003F; +1D7E2 0061; +0AE6 0061; +1B50 0061; +0CE6 0062; +2780 0021; +3021 0021; +2081 003F; +10158 003F; +2153 0062; +24FE 003F; +32C9 003F; +32CA 003F; +32CB 003F; +3365 003F; +24EF 0021; +2497 0061; +2470 0041; +33F1 003F; +336B 003F; +2081 0061; +0D67 0061; +10159 0061; +1D7CF 0062; 0ED1 0062; -3359 0062; -19D2 0021; -2082 003F; -1015E 003F; -24F4 0041; -3252 0061; -3254 0061; -33F9 0061; -33FC 0061; -2082 0041; -1948 0041; -1015E 0041; -0C68 0062; -32C1 0062; -0BE9 0021; -2083 003F; -248A 0061; -325B 0061; -32B1 0061; -1D7EF 0041; -0A69 0061; -17F3 0061; -09F6 0062; -32C2 0062; -0BEA 0021; -2084 003F; -248B 0061; -32B9 0061; -FF14 0061; -136C 0061; -0ED4 0061; -2783 0062; -10A43 0062; -0665 0021; -10321 0021; -0E55 003F; -215D 0062; -2075 0061; -194B 0061; -10148 0041; -0C6B 0062; -32C4 0062; -0C6C 0021; -06F6 003F; -0036 0041; -06F6 0041; -0ED6 0041; -2086 0062; -33E5 0062; -09ED 0021; -2786 003F; -248E 003F; -277C 0041; -0CED 0041; -1D7DF 0062; -1047 0062; -277D 0021; -0038 003F; -0ED8 003F; -277D 0061; -0BEE 0061; -1010E 0061; -19D8 0062; -1D7EB 0021; -17E9 0021; -0CEF 003F; -1D7EB 0041; -0A6F 0041; -17F9 0041; -0BEF 0062; -3361 0062; -0081 0061; -034F 0061; -05AC 0061; -06E3 0061; -202D 0061; -FE05 0061; -1D172 0061; -1D244 0061; -E0022 0061; -E0040 0061; -E005E 0061; -E007C 0061; -E011A 0061; -E0138 0061; -E0156 0061; -E0174 0061; -E0192 0061; -E01B0 0061; -E01CE 0061; -E01EC 0061; -001B 0041; -0099 0041; -05A5 0041; -06DC 0041; -200C 0041; -FDD4 0041; -1D168 0041; -1D18B 0041; -CFFFE 0041; -E0039 0041; -E0057 0041; -E0075 0041; -E0113 0041; -E0131 0041; -E014F 0041; -E016D 0041; -E018B 0041; -E01A9 0041; -E01C7 0041; -E01E5 0041; -00C0 0334; -0102 0334 0303; -00C2 0334 0340; -0061 030A 0301 0334; -0227 0334; -0061 030F 0334; -0041 0323 0334 0302; -030C 0061; -030E 0061; -031F 0061; -0330 0061; -0345 0061; -0355 0061; -0362 0061; -05B6 0061; -FE72 0061; -FCF2 0041; -0656 0061; -0734 0061; -0743 0061; -0954 0061; -0B3C 0061; -A80B 0061; -0EC8 0061; -17C8 0061; -302A 0061; -20D5 0061; -20E4 0061; -1D656 0021; -1EAE 0021; -0227 0021; -1D51E 003F; -00C1 003F; -00E4 003F; -33C2 0061; -1D552 0061; -1D4D0 0061; -1D2C 0061; -00E2 0061; -01FB 0061; -0100 0061; -0061 0062; -1D63C 0062; -1EA8 0062; -1EB7 0062; -01FD 003F; -1E9A 0021; -1D02 0041; -0252 0021; -0019 0062; -0097 0062; -05A3 0062; -06DA 0062; -180E 0062; -FDD2 0062; -1D166 0062; -1D189 0062; -BFFFE 0062; -E0037 0062; -E0055 0062; -E0073 0062; -E0111 0062; -E012F 0062; -E014D 0062; -E016B 0062; -E0189 0062; -E01A7 0062; -E01C5 0062; -E01E3 0062; -0062 0334 0331; -030E 0062; -0330 0062; -0356 0062; -05B7 0062; -FE7D 0062; -0735 0062; -09BC 0062; -10A0D 0062; -17C9 0062; -20D6 0062; -1D553 0021; -1E07 0021; -1D609 003F; -1D44F 0041; -1D671 0061; -1E06 0061; -1D505 0062; -0180 0041; -0253 0062; -0043 0334 030C; -1D484 0021; -0107 0021; -0043 003F; -2105 0021; -1D588 0061; -1D436 0061; -0106 0041; -1D41C 0062; -24B8 0062; -33A0 0062; -0187 0021; -1E0A 0334; -217E 0021; -1D60B 0021; -1D485 003F; -1D48 003F; -1D485 0061; -FF24 0041; -1D673 0041; -1E0E 0041; -1D5F1 0062; -1E10 0062; -3378 003F; -01F2 0061; -1D05 0041; -018A 003F; -00E9 0334; -0045 0334 0302 0341; -0045 030C 0334; -0115 0334 0327; -0112 0300 0334; -1EC7 0334; -1D58A 0021; -0115 0021; -1E15 0021; -1D626 003F; -00CA 003F; -1EBA 003F; -1D626 0061; -1D570 0061; -00C9 0041; -011B 0041; -0112 0041; -1E19 0041; -1D46C 0062; -011B 0062; -1E19 0062; -01DD 0061; -1D95 003F; -0258 003F; -1D4C 0061; -0066 0021; -1D675 0021; -1D571 003F; -1D4BB 0041; -1D405 0041; -1D4BB 0062; -FB00 0021; -02A9 0021; -0047 0334 0301; -0047 0327 0334; -1D4A2 0021; -1D420 003F; -1D33 003F; -1D65C 0061; -1D5DA 0061; -011E 0041; -1D454 0062; -01F5 0062; -33C9 003F; -01E4 0061; -0194 0021; -0068 030C 0334; -0068 032E 0334; -210B 0021; -1E96 0021; -1D573 003F; -FF48 0041; -24D7 0041; -1D677 0041; -1E24 0041; -1D5F5 0062; -1E22 0062; -3390 0062; -0267 0062; -0049 0306 0334; -0069 0334 0303; -0049 0334 030F; -1D48A 0021; -1D62 0021; -1ECA 0021; -1D470 003F; -012F 003F; -1D55A 0061; -2110 0061; -1D62 0061; -1E2E 0061; -1ECA 0061; -2111 0062; -0129 0062; -2162 003F; -2163 003F; -1DA6 003F; -0197 0062; -0196 0062; -1D65F 0021; -1D4BF 003F; -0134 003F; -1D5F7 0041; -1D575 0041; -1D5F7 0062; -0237 0061; -1DA1 0062; -1E33 0334; -FF2B 0021; -1D458 003F; -1D4F 003F; -1D458 0041; -1D612 0061; -0137 0061; -1D660 0062; -1E35 0062; -3398 0041; -33CF 0041; -0198 003F; -004C 0334 0327; -217C 0021; -1D647 0021; -1D529 003F; -013E 003F; -2113 0061; -004C 0061; -1D647 0041; -1E3C 0061; -216C 0062; -1E3A 0062; -33D2 0061; -1DAB 0041; -1D85 003F; -019B 0061; -006D 0021; -1D5E0 0021; -24DC 003F; -33A8 0061; -1D55E 0061; -1D440 0061; -1E3F 0061; -1D5FA 0062; -33D4 0021; -339C 0021; -33B7 0021; -1D6F 0021; -006E 0334 0340; -006E 0323 0334; -1D62F 0021; -1E45 0021; -1D441 003F; -1E49 003F; -1D663 0041; -1D5E1 0041; -0146 0061; -1D593 0062; -0147 0062; -01CC 0062; -0274 003F; -0272 0041; -1DAF 0041; -00D8 0341 0334; -006F 0302 0334 0341; -1ED4 0334; -004F 0303 0334; -004F 0307 0334; -014C 0334; -006F 0334 0311; -1EE1 0334; -1ECD 0334 0302; -1D4DE 0021; -01D2 0021; -1E53 0021; -1D428 003F; -1D52 003F; -1E4C 003F; -01A0 003F; -1D5FC 0061; -1D57A 0061; -00F3 0041; -1ED4 0041; -022D 0041; -014C 0041; -1EDD 0041; -1D4F8 0062; -00F3 0062; -022D 0062; -1EDD 0062; -1D0F 0041; -0186 0061; -1D16 0062; -0277 0041; -0070 0307 0334; -1D513 0021; -0050 003F; -FF50 0041; -0050 0041; -24C5 0041; -1D52D 0062; -1E56 0062; -33B0 0062; -1D71 0062; -1D492 0021; -1D42A 003F; -0071 0061; -24E0 0061; -1D64C 0041; -1D5B0 0062; -0072 0334 030C; -0072 0334 0323; -1D563 0021; -0158 0021; -1D69B 003F; -0210 003F; -1D493 0041; -211B 0041; -1E59 0041; -33AE 003F; -FF32 0062; -1E5B 0062; -1D72 0062; -027B 0061; -027F 0062; -0053 0302 0334; -0073 0334 0323; -1D564 0021; -015C 0021; -1D668 003F; -1E61 003F; -1D460 0041; -1D682 0061; -0161 0061; -1E9B 0061; -1D61A 0062; -2120 0041; -1D74 0041; -01A9 0061; -0286 0041; -0074 0334 0326; -1D5CD 0021; -0162 0021; -1D47B 003F; -0074 0041; -1D69D 0041; -1D61B 0041; -021A 0041; -1D47B 0062; -02A8 003F; -01BE 0041; -1D75 003F; -01AE 0061; -0075 0306 0334; -0075 0308 0334 0341; -00DC 0304 0334; -016B 0334; -0075 031B 0334; -0075 0309 031B 0334; -1E77 0334; -FF35 0021; -00FC 0021; -1EE9 0021; -1D602 003F; -00FB 003F; -0215 003F; -1D42E 0061; -FF35 0061; -1D58 0061; -00FC 0061; -1E78 0061; -1EE9 0061; -1E76 0061; -1D518 0062; -01DA 0062; -1EED 0062; -1D1D 0062; -1D99 0041; -019C 0061; -01B1 0061; -1D42F 0021; -24CB 0021; -1D47D 003F; -2174 0041; -0056 0041; -1D685 0041; -1D66B 0062; -2175 0061; -1D20 0062; -1DBA 0062; -0057 0334 0308; -0057 0021; -1E88 0021; -1D652 003F; -1D5D0 0061; -1D54E 0061; -1E81 0061; -1D568 0062; -0175 0062; -0078 0307 0334; -1D44B 0021; -1D59D 003F; -0078 0061; -1D605 0041; -1D51B 0041; -1D501 0062; -1E8C 0062; -0079 0334 0341; -0079 0334 0303; -FF59 0021; -24CE 0021; -1D59E 003F; -1E99 003F; -1D432 0041; -1D654 0061; -0176 0041; -1D466 0062; -00FD 0062; -01B3 0061; -007A 0323 0334; -2124 0021; -1D467 003F; -017A 003F; -1D467 0041; -1D689 0061; -017C 0061; -2124 0062; -018D 0041; -0224 003F; -0240 0041; -1DBE 0062; -0293 0061; -01F7 0041; -0185 003F; -0149 0061; -02C1 0061; -0296 0061; -0298 0061; -03B1 0343 0301 0334 0345; -1F0E 0334; -1F09 0301 0334; -1F09 0334 0342; -1FB3 0341 0334; -0391 0334 0304; -1F06 0021; -1FB0 0021; -1F06 003F; -1FB0 003F; -1D756 0041; -1F80 0061; -1F8F 0061; -1FB1 0061; -1F06 0062; -1FB0 0062; -0392 003F; -1D6E3 0041; -0393 0021; -1D738 0061; -1D6FE 0062; -1D5F 0021; -1D71F 0061; -1F18 0334; -1F19 0334 0341; -1D716 0021; -1FC8 0021; -1F1B 003F; -1D7C4 0041; -1F15 0041; -1D7C4 0062; -03DD 0041; -1D73B 003F; -1D721 0041; -0397 0343 0334 0301; -0397 0313 0342 0334; -1F29 0334 0301; -1F27 0334; -03B7 0341 0334 0345; -1D702 0021; -1F95 0021; -0397 003F; -1F93 003F; -1D776 0041; -1F92 0061; -1F2B 0061; -1FCA 0061; -1F22 0062; -1FC4 0062; -1D797 0021; -03D1 0061; -1D723 0061; -0398 0062; -1FBE 0313 0300 0334; -1F33 0334; -0399 0334 0340; -1FBE 0308 0342 0334; -1F3E 0021; -1D704 003F; -1F76 003F; -0399 0041; -1F39 0041; -1FD6 0041; -1D798 0062; -1FD2 0062; -1D6DE 003F; -1D6DE 0041; -1D78C 0062; -1D77A 003F; -1D760 0041; -1D761 0021; -039C 0041; -338C 003F; -33BC 003F; -1D6CE 0061; -1D6EE 0062; -1D6CF 0061; -1D6EF 0062; -1F41 0334; -03BF 0340 0334; -03CC 0021; -03CC 003F; -1F40 0061; -038C 0041; -03CC 0062; -1D6E1 003F; -1D7C9 0061; -1D6E1 0062; -03FA 0062; -1FEC 0334; -1D754 003F; -1D6E0 0041; -03F1 0062; -03FC 0062; -1D782 003F; -1D748 0041; -1D782 0062; -1D783 0021; -1D783 0041; -03C5 0313 0301 0334; -03A5 0314 0334 0340; -03A5 0340 0334; -03C5 0334 0308 0342; -1F5B 0021; -1D6BC 003F; -03B0 003F; -1D76A 0041; -038E 0061; -1FE1 0061; -1F7B 0062; -03A6 0021; -03D5 0061; -1D6F7 0041; -1D712 0021; -1D74C 0061; -03A7 0062; -1D76D 003F; -1D787 0062; -03C9 0343 0345 0301 0334; -2126 0343 0342 0334; -03A9 0314 0341 0334; -03A9 0314 0334 0342; -1F7D 0345 0334; -1D714 0021; -1F6D 0021; -1D7C2 003F; -1F63 003F; -1D714 0041; -1F62 0061; -1FAD 0061; -1FF4 0061; -1F68 0062; -1FA9 0062; -03F7 0041; -2C84 0041; -2CB6 0041; -2C8E 0041; -2C94 0041; -2C99 003F; -2CBD 003F; -2CA1 003F; -2CA7 003F; -2CAD 003F; -2CBF 003F; -2CC3 003F; -03E5 003F; -03E9 003F; -2CCF 003F; -2CD5 003F; -03ED 003F; -2CDD 003F; -2CB5 003F; -2CE3 003F; -0410 0306 0021; -0410 0308 0021; -04D9 0001 0308 0061; -04D9 0308 0062; -0412 0061; -0493 003F; -0434 003F; -0503 003F; -0433 0591 0301 0061; -0498 0061; -0435 0061; -0435 0306 003F; -0436 0306 0334; -04DD 0334; -0497 003F; -0437 0308 0334; -0455 0021; -0438 0300 0334; -045D 0061; -04E5 0334; -0456 003F; -0406 0308 0061; -0418 0306 0061; -041A 0001 0301 0061; -04A0 0061; -041B 0061; -0508 0021; -041D 0021; -04A2 0061; -040A 0061; -041E 0334 0308; -04E9 0061; -04E8 1D165 0308 0061; -0481 003F; -0441 003F; -0442 003F; -045B 003F; -043A 0591 0301 0061; -0443 0021; -0423 0306 0334; -0423 0334 0308; -0423 0334 030B; -04AF 0061; -0444 0061; -04BB 0061; -047D 0061; -04B5 0061; -0427 0308 003F; -04CC 003F; -04BF 003F; -0449 003F; -044B 0308 0334; -044C 0021; -044D 0021; -044D 0308 0041; -044F 0062; -046B 0062; -046F 0062; -0475 0001 030F 0061; -0475 030F 0062; -2C01 0021; -2C04 0021; -2C07 0021; -2C0A 0021; -2C0D 0021; -2C10 0021; -2C13 0021; -2C16 0021; -2C19 0021; -2C1C 0021; -2C1F 0021; -2C22 0021; -2C25 0021; -2C28 0021; -2C2B 0021; -2C2E 0021; -10A1 0021; -10A3 0021; -10A5 0021; -10C1 0021; -10A8 0021; -10AA 0021; -10FC 0061; -10DD 003F; -10DF 003F; -10E1 003F; -10F3 003F; -10E4 003F; -10E6 003F; -10E8 003F; -10EA 003F; -10EC 003F; -10EE 003F; -10EF 003F; -10F5 003F; -10F9 003F; -0533 0021; -0587 003F; -0538 0061; -053B 0061; -053E 0061; -0541 0061; -0544 0061; -0545 0061; -0548 0061; -054B 0061; -054E 0061; -0551 0021; -0554 0021; -0559 003F; -FB21 0041; -FB31 003F; -2137 0062; -FB34 0021; -FB35 0041; -05D7 0041; -FB1D 0041; -05DA 0021; -FB3C 0334; -FB26 0041; -05E1 0021; -05E3 0021; -05E6 003F; -FB48 0021; -05E9 0021; -05EA 0334 05BC; -FE80 0061; -0627 0653 0062; -0672 0061; -0648 0591 0654 0061; -FE88 0041; -064A 1D165 0654 0061; -FC00 003F; -FC65 0041; -FCE0 003F; -FBF2 003F; -FBF9 0021; -FC69 0062; -FE8E 0041; -FDF2 0062; -FE8F 0062; -FC9E 0061; -FC9F 0041; -FC6E 0061; -FB55 0061; -FB56 0041; -FB5A 0062; -0755 0062; -FE95 003F; -FD50 0062; -FD51 0062; -FDA1 0062; -FC0E 0062; -FC73 0062; -FC10 0062; -FC11 0062; -FC12 0062; -FC14 0062; -FB5E 0021; -067D 0062; -FE9D 0021; -FC15 0062; -FD59 0061; -FD1E 0061; -FB76 0062; -FB7A 0021; -FB7E 0021; -FEA1 003F; -FDBF 0062; -FCFF 0062; -FEA5 0041; -FC1B 0062; -0682 0062; -FEA9 0062; -FB89 0041; -FB85 0041; -FB87 0041; -075A 0062; -FDFC 0062; -FB8C 0062; -0697 0062; -075B 0062; -FEB1 0041; -FD5E 0062; -FD36 0041; -FCE7 003F; -FD63 0061; -FD18 0061; -FEB5 0062; -FD2E 003F; -FDAA 0062; -FD0D 0062; -FD6A 0062; -FCFD 0062; -06FA 0062; -FEB9 0041; -FDA9 0062; -FDF9 0062; -FD21 0061; -FEC0 0061; -FC23 0062; -FD6F 0062; -FD07 0062; -FEC1 0021; -FC26 0062; -FD73 0062; -FEC5 0021; -FD3B 0041; -FEC9 0041; -FDF7 0062; -FDB6 0062; -FECD 003F; -FCBD 0061; -FCF9 0062; -075E 0062; -FED1 0062; -FC2F 0062; -FC7C 0061; -06A3 0062; -06A5 0062; -0760 0062; -FED5 0041; -FC34 0062; -FC35 0062; -FED9 003F; -FCC4 0061; -FCC7 003F; -FC3C 0061; -FC3D 0062; -FB8E 0041; -FBD3 003F; -FB92 003F; -FB9A 003F; -FB96 003F; -0763 0062; -FEDD 0062; -FEF9 0062; -FD84 0062; -FDB5 0061; -FD86 0061; -FD88 0061; -FC87 0061; -076A 0062; -06FE 0062; -FD8D 0062; -FDF4 0062; -FDB9 0062; -FC4A 0062; -FEE5 0041; -FD98 0061; -FD95 0062; -FC8B 0062; -FD9A 0062; -FC8F 0061; -FBA0 003F; -06B9 0062; -FEEB 0061; -FCD8 0061; -FBAA 0021; -06C1 003F; -06FF 003F; -FEED 0021; -06C4 0061; -06C6 0062; -FBDB 0021; -06CA 0061; -0649 003F; -FEF3 0021; -0678 003F; -FDAE 003F; -FC93 003F; -FC94 003F; -FC5A 0061; -06CD 003F; -FBE6 0062; -06D3 0061; -0713 003F; -0717 0041; -071B 0062; -0721 0041; -0726 0062; -072C 0041; -0783 0041; -07A2 0041; -078B 0041; -078D 0041; -079E 0041; -0795 0041; -07A8 0041; -07AE 0041; -2D33 0041; -2D39 0041; -2D3F 0041; -2D45 0041; -2D4B 0041; -2D51 0041; -2D57 0041; -2D5D 0041; -2D62 0041; -1202 0041; -1208 0041; -120E 0041; -1213 0041; -1219 0041; -121F 0041; -1220 0041; -1226 0041; -122C 0041; -1231 0041; -1237 0041; -123C 0041; -1241 0041; -1247 0041; -1250 0041; -1256 0041; -1260 0041; -1266 0041; -2D85 0041; -126D 0041; -1273 0041; -1278 0041; -127E 0041; -1283 0041; -128A 0041; -1292 0041; -2D88 0041; -129D 0041; -12A2 0041; -2D8A 0041; -12AD 0041; -12B4 0041; -12BC 0041; -12C4 0041; -12CC 0041; -12D2 0041; -12D9 0041; -12DF 0041; -12E4 0041; -12EA 0041; -12F0 0041; -12F6 0041; -12FB 0041; -1300 0041; -1306 0041; -130B 0041; -1312 0041; -131A 0041; -2D93 0041; -1322 0041; -2D8F 0041; -132D 0041; -1332 0041; -2D91 0041; -133D 0041; -1343 0041; -1349 0041; -134F 0041; -1351 0041; -1357 0041; -1358 0041; -2DA3 0041; -2DAA 0041; -2DB1 0041; -2DB8 0041; -2DBE 0041; -2DC5 0041; -2DCC 0041; -2DD3 0041; -2DDA 0041; -0904 0041; -090A 0041; -090E 0041; -0914 0041; -095A 0334; -091B 0062; -0920 003F; -0923 0021; -0928 003F; -092C 0062; -0931 003F; -0936 0021; -093E 0021; -0944 0021; -0948 0021; -094D 0041; -098A 0041; -0990 0041; -0998 0041; -099E 0041; -09A2 003F; -09A6 0061; -09AD 0061; -09F0 0062; -09B9 0062; -09C2 0062; -09C7 0591 09D7 0061; -09CD 003F; -0A13 003F; -0A07 003F; -0A39 0041; -0A5A 0041; -0A1C 0061; -0A21 0062; -0A27 0062; -0A2D 003F; -0A32 0062; -0A41 0041; -0A4D 003F; -0A89 003F; -0A8D 003F; -0A95 003F; -0A9B 003F; -0AA1 003F; -0AA7 003F; -0AAE 003F; -0AB6 003F; -0ABF 003F; -0AE2 003F; -0ACB 003F; -0B07 0062; -0B0C 0062; -0B15 0062; -0B1B 0062; -0B5C 0021; -0B24 0041; -0B2B 0041; -0B30 0041; -0B37 0041; -0B40 0041; -0B47 1D165 0B57 0061; -0B4C 0062; -0B86 0061; -0B8F 0061; -0B94 0062; -0B9F 0062; -0BAE 0062; -0BB4 0062; -0BBE 0062; -0BC6 0591 0BD7 0061; -0BCB 0061; -0C05 0041; -0C0B 0041; -0C10 0041; -0C17 0041; -0C1D 0041; -0C23 0041; -0C2A 0041; -0C30 0041; -0C37 0041; -0C41 0041; -0C48 0334; -0C4D 0021; -0C87 003F; -0C8C 003F; -0C93 003F; -0C99 003F; -0C9F 003F; -0CA5 003F; -0CAC 003F; -0CB2 003F; -0CB3 003F; -0CC0 003F; -0CC6 0041; -0CC6 0CD6 0041; -0CCA 0CD5 0041; -0D05 0041; -0D0B 0041; -0D10 0041; -0D17 0041; -0D1D 0041; -0D23 0041; -0D2A 0041; -0D30 0041; -0D36 0041; -0D40 0041; -0D47 0061; -0D4B 0062; -0D86 0061; -0D8C 0061; -0D92 0061; -0D9B 0061; -0DA1 0061; -0DA7 0061; -0DAD 0061; -0DB4 0061; -0DBA 0061; -0DC3 0061; -0DD0 0021; -0DD8 0021; -0DDA 0061; -0DDC 0DCA 003F; -0DF2 0021; -A804 0021; -A809 0041; -A810 0041; -A816 0041; -A81C 0041; -A822 0041; -10A00 0041; -10A0C 0041; -10A16 0041; -10A1D 0041; -10A23 0041; -10A29 0041; -10A2F 0041; -0E01 003F; -0E02 003F; -0E03 003F; -0E04 003F; -0E05 003F; -0E06 003F; -0E07 003F; -0E08 003F; -0E09 003F; -0E0A 003F; -0E0B 003F; -0E0C 003F; -0E0D 003F; -0E0E 003F; -0E0F 003F; -0E10 003F; -0E11 003F; -0E12 003F; -0E13 003F; -0E14 003F; -0E15 003F; -0E16 003F; -0E17 003F; -0E18 003F; -0E19 003F; -0E1A 003F; -0E1B 003F; -0E1C 003F; -0E1D 003F; -0E1E 003F; -0E1F 003F; -0E20 003F; -0E21 003F; -0E22 003F; -0E23 003F; -0E24 003F; -0E25 003F; -0E26 003F; -0E27 003F; -0E28 003F; -0E29 003F; -0E2A 003F; -0E2B 003F; -0E2C 003F; -0E2D 003F; -0E2E 003F; -0E2F 003F; -0E33 0062; -0E39 0334; -0E40 0001 0E05 0061; -0E40 0001 0E0F 0061; -0E40 0001 0E19 0061; -0E40 0001 0E23 0061; -0E40 0001 0E2D 0061; -0E41 0591 0E07 0061; -0E41 0591 0E11 0061; -0E41 0591 0E1B 0061; -0E41 0591 0E25 0061; -0E42 003F; -0E42 1D165 0E09 0061; -0E42 1D165 0E13 0061; -0E42 1D165 0E1D 0061; -0E42 1D165 0E27 0061; -0E43 0001 0E02 0061; -0E43 0001 0E0C 0061; -0E43 0001 0E16 0061; -0E43 0001 0E20 0061; -0E43 0001 0E2A 0061; -0E44 0591 0E04 0061; -0E44 0591 0E0E 0061; -0E44 0591 0E18 0061; -0E44 0591 0E22 0061; -0E44 0591 0E2C 0061; -0EC2 0E81 0061; -0EC2 0E82 0061; -0EC2 0E84 0061; -0EC2 0E87 0061; -0EC2 0E88 0061; -0EC2 0E8A 0061; -0EC2 0E8D 0061; -0EC2 0E94 0061; -0EC2 0E95 0061; -0EC2 0E96 0061; -0EC2 0E97 0061; -0EC2 0E99 0061; -0EC2 0E9A 0061; -0EC2 0E9B 0061; -0EC2 0E9C 0061; -0EC2 0E9D 0061; -0EC2 0E9E 0061; -0EC2 0E9F 0061; -0EC2 0EA1 0061; -0EC2 0EA2 0061; -0EC2 0EA3 0061; -0EC2 0EA5 0061; -0EC2 0EA7 0061; -0EC2 0EAA 0061; -0EC1 0EDC 0061; -0EC1 0EDD 0061; -0EC2 0EAB 0061; -0EC2 0EAD 0061; -0EC2 0EAE 0061; -0EB2 0061; -0EB6 0062; -0EBD 0021; -0EC0 1D165 0E8D 0061; -0EC0 1D165 0E9E 0061; -0EC0 1D165 0EDD 0061; -0EC1 0001 0E8D 0061; -0EC1 0001 0E9E 0061; -0EC1 0001 0EDD 0061; -0EC2 0591 0E8A 0061; -0EC2 0591 0E9D 0061; -0EC2 0591 0EDC 0061; -0EC3 1D165 0E88 0061; -0EC3 1D165 0E9C 0061; -0EC3 1D165 0EAB 0061; -0EC4 0001 0E88 0061; -0EC4 0001 0E9C 0061; -0EC4 0001 0EAB 0061; -0FB9 0021; -0F93 0021; -0F96 0021; -0F9A 0021; -0F9D 0021; -0FA0 0021; -0FA3 0021; -0F57 0021; -0FA9 0021; -0FAC 0021; -0F5F 0021; -0FB1 0041; -0FB2 1D165 0F71 0061; -0F64 003F; -0F67 003F; -0F89 003F; -0F72 0062; -0F71 0F80 003F; -0F75 0041; -0FB2 0F81 0061; -0F79 0061; -0F7C 0334; -1902 0021; -1908 0021; -190E 0021; -1914 0021; -191A 0021; -1923 0021; -1929 0021; -1933 0021; -1700 0021; -1706 0021; -170C 0021; -1713 0021; -1723 0041; -1729 0041; -172F 0041; -1740 003F; -1746 003F; -174C 003F; -1752 003F; -1764 003F; -176A 003F; -1772 003F; -1A04 003F; -1A0A 003F; -1A10 003F; -1A16 003F; -1A1B 0061; -1005 0061; -100B 0061; -1011 0061; -1017 0061; -101D 0061; -1021 0061; -1026 0062; -1054 0062; -1030 0062; -1059 0062; -1784 0061; -178A 0061; -1790 0061; -1796 0061; -179C 0061; -17A2 0061; -17A7 0061; -17AD 0061; -17B3 0061; -17B9 0061; -17BF 0061; -17C5 0061; -1954 0021; -195A 0021; -1960 0021; -1966 0021; -196C 0021; -1974 0021; -1985 0021; -198B 0021; -1991 0021; -1997 0021; -19DE 0021; -19A1 0021; -19A7 0021; -19B3 0021; -19B9 0021; -19BF 0021; -19C5 0021; -1881 0021; -1843 0021; -1822 0021; -1823 0021; -1848 0021; -1829 0021; -184B 0021; -182D 0021; -184F 0021; -189D 0021; -1868 0021; -1871 0021; -1877 0021; -1838 0021; -1857 0021; -1854 0021; -183E 0021; -1842 0021; -188D 0021; -18A0 0021; -1894 0021; -18A6 0021; -13A2 0041; -13A8 0041; -13AE 0041; -13B4 0041; -13BA 0041; -13C0 0041; -13C6 0041; -13CC 0041; -13D2 0041; -13D8 0041; -13DE 0041; -13E4 0041; -13EA 0041; -13F0 0041; -1402 0041; -1408 0041; -140E 0041; -1414 0041; -141A 0041; -1420 0041; -1426 0041; -142C 0041; -1432 0041; -1438 0041; -143E 0041; -1444 0041; -144A 0041; -1450 0041; -1456 0041; -145C 0041; -1462 0041; -1468 0041; -146E 0041; -1474 0041; -147A 0041; -1480 0041; -1486 0041; -148C 0041; -1492 0041; -1498 0041; -149E 0041; -14A4 0041; -14AA 0041; -14B0 0041; -14B6 0041; -14BC 0041; -14C2 0041; -14C8 0041; -14CE 0041; -14D4 0041; -14DA 0041; -14E0 0041; -14E6 0041; -14EC 0041; -14F2 0041; -14F8 0041; -14FE 0041; -1504 0041; -150A 0041; -1510 0041; -1516 0041; -151C 0041; -1522 0041; -1528 0041; -152E 0041; -1534 0041; -153A 0041; -1540 0041; -1546 0041; -154C 0041; -1552 0041; -1558 0041; -155E 0041; -1564 0041; -156A 0041; -1570 0041; -1576 0041; -157D 0041; -1582 0041; -1588 0041; -1670 0041; -1593 0041; -1674 0041; -1599 0041; -159F 0041; -15A5 0041; -15AA 0041; -15B0 0041; -15B6 0041; -15BC 0041; -15C2 0041; -15C8 0041; -15CE 0041; -15D4 0041; -15DA 0041; -15E0 0041; -15E6 0041; -15EC 0041; -15F2 0041; -15F8 0041; -15FE 0041; -1604 0041; -160A 0041; -1610 0041; -1616 0041; -161C 0041; -1622 0041; -1628 0041; -162E 0041; -1634 0041; -163A 0041; -1640 0041; -1646 0041; -164C 0041; -1652 0041; -1658 0041; -165E 0041; -1664 0041; -166A 0041; -1684 0041; -168A 0041; -1690 0041; -1696 0041; -16A0 0062; -16F0 0041; -16AF 0041; -16B6 0061; -16BA 0061; -16C2 003F; -16EE 0041; -16EA 003F; -16D0 0061; -16D7 003F; -16DD 003F; -16A3 0041; -16E2 0041; -1100 0061; -AC00 1161 0021; -AC03 0062; -FFA2 0041; -3137 0021; -1104 0061; -3271 003F; -3142 0021; -1108 0061; -3274 003F; -3147 0041; -3148 0041; -FFB9 0041; -327C 003F; -314C 0021; -326C 003F; -314E 0041; -D788 1161 0021; -D7A0 0062; -3165 0062; -1119 0062; -316E 0062; -1120 0061; -3174 0062; -1127 0061; -112B 0061; -112E 0061; -1132 0061; -317E 0062; -113C 0062; -1141 0062; -1147 0061; -114C 0061; -1151 0062; -1157 0061; -115F 0062; -FFC2 0062; -FFC4 0062; -FFC6 0062; -FFCA 0062; -FFCC 0062; -FFCE 0062; -FFD2 0062; -FFD4 0062; -FFD6 0062; -FFDA 0062; -FFDC 0062; -117B 0062; -1181 0062; -3188 0062; -118A 0062; -1190 0062; -1194 0061; -1199 0062; -318D 0062; -11A8 0062; -3135 003F; -11AE 0062; -313B 0041; -313D 0041; -313F 0041; -11BA 0062; -11C0 0062; -11C6 0062; -11CA 0062; -316A 0062; -316B 0062; -11D8 0062; -11DD 0061; -11E1 0062; -11E7 0062; -11ED 0062; -11F2 0061; -11F7 0062; -3041 0061; -3301 0062; -FF72 0061; -FF69 0021; -3094 0041; -32D3 003F; -3307 0041; -30AA 0041; -30AC 0021; -32D5 0062; -304E 0334; -FF77 0062; -3315 003F; -FF78 003F; -3319 0021; -3051 003F; -30F6 0062; -3053 0041; -30B5 0334 3099; -32DA 0062; -32DB 003F; -3321 003F; -FF7D 0061; -32DD 003F; -3323 0062; -30BE 0041; -305F 0061; -3061 003F; -3063 0021; -32E1 0061; -32E2 003F; -30C8 3099 0334; -3068 0062; -FF85 0041; -FF86 0062; -32E7 0021; -FF89 0041; -30D0 0021; -31F5 0041; -3072 3099 0334; -3072 0041; -332E 0062; -30D5 0021; -3077 0061; -3335 0061; -30D9 003F; -30DA 0041; -333A 0021; -32ED 003F; -307D 0041; -3340 0041; -3344 0041; -307F 0061; -FF91 0021; -334D 0021; -32F2 0021; -32F3 003F; -FF94 0062; -3085 0062; -30E7 0061; -FF97 003F; -31FC 0041; -FF99 003F; -FF9A 0021; -3356 0041; -308E 0021; -30EE 0062; -30F0 0062; -30F2 0021; -3093 0061; -3107 003F; -310B 003F; -312B 003F; -3111 003F; -3116 003F; -31A9 0061; -31A5 0021; -31AF 0061; -3125 003F; -3127 0061; -A000 003F; -A006 003F; -A00C 003F; -A012 003F; -A018 003F; -A01E 003F; -A024 003F; -A02A 003F; -A030 003F; -A036 003F; -A03C 003F; -A042 003F; -A048 003F; -A04E 003F; -A054 003F; -A05A 003F; -A060 003F; -A066 003F; -A06C 003F; -A072 003F; -A078 003F; -A07E 003F; -A084 003F; -A08A 003F; -A090 003F; -A096 003F; -A09C 003F; -A0A2 003F; -A0A8 003F; -A0AE 003F; -A0B4 003F; -A0BA 003F; -A0C0 003F; -A0C6 003F; -A0CC 003F; -A0D2 003F; -A0D8 003F; -A0DE 003F; -A0E4 003F; -A0EA 003F; -A0F0 003F; -A0F6 003F; -A0FC 003F; -A102 003F; -A108 003F; -A10E 003F; -A114 003F; -A11A 003F; -A120 003F; -A126 003F; -A12C 003F; -A132 003F; -A138 003F; -A13E 003F; -A144 003F; -A14A 003F; -A150 003F; -A156 003F; -A15C 003F; -A162 003F; -A168 003F; -A16E 003F; -A174 003F; -A17A 003F; -A180 003F; -A186 003F; -A18C 003F; -A192 003F; -A198 003F; -A19E 003F; -A1A4 003F; -A1AA 003F; -A1B0 003F; -A1B6 003F; -A1BC 003F; -A1C2 003F; -A1C8 003F; -A1CE 003F; -A1D4 003F; -A1DA 003F; -A1E0 003F; -A1E6 003F; -A1EC 003F; -A1F2 003F; -A1F8 003F; -A1FE 003F; -A204 003F; -A20A 003F; -A210 003F; -A216 003F; -A21C 003F; -A222 003F; -A228 003F; -A22E 003F; -A234 003F; -A23A 003F; -A240 003F; -A246 003F; -A24C 003F; -A252 003F; -A258 003F; -A25E 003F; -A264 003F; -A26A 003F; -A270 003F; -A276 003F; -A27C 003F; -A282 003F; -A288 003F; -A28E 003F; -A294 003F; -A29A 003F; -A2A0 003F; -A2A6 003F; -A2AC 003F; -A2B2 003F; -A2B8 003F; -A2BE 003F; -A2C4 003F; -A2CA 003F; -A2D0 003F; -A2D6 003F; -A2DC 003F; -A2E2 003F; -A2E8 003F; -A2EE 003F; -A2F4 003F; -A2FA 003F; -A300 003F; -A306 003F; -A30C 003F; -A312 003F; -A318 003F; -A31E 003F; -A324 003F; -A32A 003F; -A330 003F; -A336 003F; -A33C 003F; -A342 003F; -A348 003F; -A34E 003F; -A354 003F; -A35A 003F; -A360 003F; -A366 003F; -A36C 003F; -A372 003F; -A378 003F; -A37E 003F; -A384 003F; -A38A 003F; -A390 003F; -A396 003F; -A39C 003F; -A3A2 003F; -A3A8 003F; -A3AE 003F; -A3B4 003F; -A3BA 003F; -A3C0 003F; -A3C6 003F; -A3CC 003F; -A3D2 003F; -A3D8 003F; -A3DE 003F; -A3E4 003F; -A3EA 003F; -A3F0 003F; -A3F6 003F; -A3FC 003F; -A402 003F; -A408 003F; -A40E 003F; -A414 003F; -A41A 003F; -A420 003F; -A426 003F; -A42C 003F; -A432 003F; -A438 003F; -A43E 003F; -A444 003F; -A44A 003F; -A450 003F; -A456 003F; -A45C 003F; -A462 003F; -A468 003F; -A46E 003F; -A474 003F; -A47A 003F; -A480 003F; -A486 003F; -A48C 003F; -10305 003F; -1030B 003F; -10311 003F; -10317 003F; -1031D 003F; -10334 003F; -1033A 003F; -10340 003F; -10346 003F; -10400 0061; -10403 0061; -10406 0061; -10409 0061; -1040C 0061; -1040F 0061; -10412 0061; -10415 0061; -10418 0061; -1041B 0061; -1041E 0061; -10421 0061; -10424 0061; -10427 0061; -10455 003F; -1045B 003F; -10461 003F; -10467 003F; -1046D 003F; -10473 003F; -10479 003F; -1047F 003F; -10485 003F; -1048B 003F; -10491 003F; -10497 003F; -1049D 003F; -10005 003F; -1000B 003F; -10012 003F; -10018 003F; -1001E 003F; -10024 003F; -1002B 003F; -10031 003F; -10037 003F; -1003F 003F; -10045 003F; -1004B 003F; -10053 003F; -10059 003F; -10081 003F; -10087 003F; -1008D 003F; -10093 003F; -10099 003F; -1009F 003F; -100A5 003F; -100AB 003F; -100B1 003F; -100B7 003F; -100BD 003F; -100C3 003F; -100C9 003F; -100CF 003F; -100D5 003F; -100DB 003F; -100E1 003F; -100E7 003F; -100ED 003F; -100F3 003F; -100F9 003F; -10804 003F; -1080D 003F; -10813 003F; -10819 003F; -1081F 003F; -10825 003F; -1082B 003F; -10831 003F; -10838 003F; -10383 003F; -10389 003F; -1038F 003F; -10395 003F; -1039B 003F; -103A3 003F; -103A9 003F; -103AF 003F; -103B5 003F; -103BB 003F; -103C1 003F; -103CB 003F; -3280 003F; -3286 0021; -3196 0021; -FA70 003F; -2E80 0021; -2F802 003F; -3288 003F; -3193 0041; -2E85 003F; -2F804 003F; -2F806 003F; -2F80B 003F; -FA0C 003F; -2F0A 003F; -3285 0021; -2F815 003F; -2F818 003F; -F979 003F; -2F10 0021; -2F850 0021; -2F821 003F; -F99D 003F; -FA33 0041; -2F13 003F; -2F82B 0021; -3038 0021; -2F82D 0021; -2E8B 0021; -2F832 0021; -F96B 003F; -2F839 003F; -F9ED 003F; -2F840 003F; -2F844 003F; -FA78 0021; -FA7B 003F; -2F1E 003F; -328F 0021; -2F854 003F; -F96C 003F; -2F20 003F; -2F22 003F; -337D 003F; -2F85F 003F; -2F863 003F; -FA81 003F; -FA04 003F; -2F86F 0041; -2E8C 0021; -2F875 0062; -F94B 003F; -2F2D 003F; -2F87F 003F; -2F881 003F; -2F884 003F; -337B 003F; -2F88B 003F; -FA82 003F; -2F36 0061; -2E95 0021; -FA84 003F; -FA85 003F; -F9A3 003F; -FA3D 0041; -2F8A6 003F; -FA3E 003F; -2F8AD 003F; -2F8B0 0041; -2F8B3 003F; -2F8B4 003F; -2F8BA 003F; -2F8BC 003F; -FA8E 003F; -F991 003F; -2F8C8 0021; -2F43 003F; -2E9B 003F; -337E 003F; -F9C5 003F; -2F48 003F; -2E9D 0041; -FA93 0041; -FA94 003F; -2F8DF 003F; -F97A 003F; -2F8E8 003F; -F94C 003F; -2F8EF 003F; -2F4D 0021; -FA96 0021; -2F50 003F; -328C 0061; -2F8FC 003F; -F915 003F; -2F902 0041; -2F905 003F; -2F908 003F; -FA99 0041; -F992 003F; -2F914 0021; -2EA3 003F; -F99F 003F; -2F91E 003F; -2F56 003F; -2F57 003F; -2EA7 0021; -2F5D 003F; -FA16 0041; -2F5F 003F; -F9E4 003F; -2F930 0021; -2F60 003F; -2F64 003F; -F9CD 003F; -2F67 003F; -F90E 003F; -FA17 0041; -2F940 0021; -FAAA 003F; -2F6E 003F; -FA4B 003F; -2EAC 0021; -FA4E 003F; -3297 0061; -2F956 0021; -3299 003F; -2F95B 003F; -2F95F 003F; -2F962 003F; -F9F9 003F; -2F968 003F; -F94F 003F; -FA57 0021; -FA59 003F; -2EB5 0021; -F9E6 003F; -2EB8 003F; -2F7C 0021; -2F7D 003F; -2F97F 003F; -2EBC 0061; -F926 003F; -2EBD 0021; -2F87 003F; -FA5E 0021; -2F98F 003F; -F974 0041; -2F9A0 003F; -2F9A2 003F; -F96E 003F; -F9C2 003F; -FA20 003F; -2F9B4 0021; -2F9B7 003F; -FAB5 0041; -2F8E 003F; -2EC2 003F; -F912 003F; -2EC4 003F; -FA61 0041; -2F9CF 003F; -F941 003F; -F95D 0041; -F95A 003F; -F900 003F; -2F9D4 003F; -FAC1 0021; -2F9D7 003F; -2F9DC 003F; -F9D7 003F; -2F9F 003F; -2ECD 003F; -329C 003F; -2F9E2 003F; -2FA3 003F; -2FA5 0061; -2F9E7 003F; -F99B 003F; -2ED2 003F; -2ED4 003F; -FA09 003F; -2FAA 003F; -FA68 0041; -F938 003F; -2FAE 003F; -2ED9 003F; -32A0 003F; -FACC 0021; -2FB6 003F; -2FA02 003F; -2EE1 0021; -F91A 003F; -2FBC 003F; -2FC0 003F; -F9F2 003F; -F93A 003F; -2FC5 0061; -2FC7 0061; -2FCB 0021; -2FCD 003F; -2FD0 0061; -2EED 0061; -2EF0 003F; -FACE 0062; -9FA3 003F; -FA13 003F; -FA27 003F; -3403 003F; -3409 003F; -340F 003F; -3415 003F; -341B 003F; -3421 003F; -3427 003F; -342D 003F; -3433 003F; -3439 003F; -343F 003F; -3445 003F; -344B 003F; -3451 003F; -3457 003F; -345D 003F; -3463 003F; -3469 003F; -346F 003F; -3475 003F; -347B 003F; -3481 003F; -3487 003F; -348D 003F; -3493 003F; -3499 003F; -349E 0041; -34A4 003F; -34AA 003F; -34B0 003F; -34B6 003F; -2F9CA 0021; -34C0 003F; -34C6 003F; -34CC 003F; -34D2 003F; -34D8 003F; -34DE 003F; -34E3 003F; -34E9 003F; -34EF 003F; -34F5 003F; -34FB 003F; -3501 003F; -3507 003F; -350D 003F; -3513 003F; -3518 003F; -351E 003F; -3524 003F; -352A 003F; -3530 003F; -3536 003F; -353C 003F; -3542 003F; -3548 003F; -354E 003F; -3554 003F; -355A 003F; -3560 003F; -3566 003F; -356C 003F; -3572 003F; -3578 003F; -357E 003F; -3584 003F; -358A 003F; -3590 003F; -3596 003F; -359C 003F; -35A2 003F; -35A8 003F; -35AE 003F; -35B4 003F; -35BA 003F; -35C0 003F; -35C6 003F; -35CC 003F; -35D2 003F; -35D8 003F; -35DE 003F; -35E4 003F; -35EA 003F; -35F0 003F; -35F6 003F; -35FC 003F; -3602 003F; -3608 003F; -360E 003F; -3614 003F; -361A 003F; -3620 003F; -3626 003F; -362C 003F; -3632 003F; -3638 003F; -363E 003F; -3644 003F; -364A 003F; -3650 003F; -3656 003F; -365C 003F; -3662 003F; -3668 003F; -366E 003F; -3674 003F; -367A 003F; -3680 003F; -3686 003F; -368C 003F; -3692 003F; -3698 003F; -369E 003F; -36A4 003F; -36AA 003F; -36B0 003F; -36B6 003F; -36BC 003F; -36C2 003F; -36C8 003F; -36CE 003F; -36D4 003F; -36DA 003F; -36E0 003F; -36E6 003F; -36EC 003F; -36F1 003F; -36F7 003F; -36FC 0041; -3702 003F; -3708 003F; -370E 003F; -3714 003F; -371A 003F; -3720 003F; -3726 003F; -372C 003F; -3732 003F; -3738 003F; -373E 003F; -3744 003F; -374A 003F; -3750 003F; -3756 003F; -375C 003F; -3762 003F; -3768 003F; -376E 003F; -3774 003F; -377A 003F; -3780 003F; -3785 003F; -378B 003F; -3791 003F; -3797 003F; -379D 003F; -37A3 003F; -37A9 003F; -37AF 003F; -37B5 003F; -37BB 003F; -37C1 003F; -37C7 003F; -37CD 003F; -37D3 003F; -37D9 003F; -37DF 003F; -37E5 003F; -37EB 003F; -37F1 003F; -37F7 003F; -37FD 003F; -3803 003F; -3809 003F; -380F 003F; -3815 003F; -381B 003F; -3821 003F; -3827 003F; -382D 003F; -3832 003F; -3838 003F; -383E 003F; -3844 003F; -384A 003F; -3850 003F; -3856 003F; -385C 003F; -2F888 0021; -3867 003F; -386D 003F; -3873 003F; -3879 003F; -387E 003F; -3884 003F; -388A 003F; -3890 003F; -3896 003F; -389C 003F; -38A2 003F; -38A8 003F; -38AE 003F; -38B4 003F; -38BA 003F; -38C0 003F; -38C6 003F; -38CB 003F; -38D1 003F; -38D7 003F; -38DD 003F; -2F89B 0021; -38E8 003F; -38EE 003F; -38F4 003F; -38FA 003F; -3900 003F; -3906 003F; -390C 003F; -3912 003F; -3918 003F; -391D 003F; -3923 003F; -3929 003F; -392F 003F; -3935 003F; -393A 0041; -3940 003F; -3946 003F; -394C 003F; -3952 003F; -3958 003F; -395E 003F; -3964 003F; -396A 003F; -3970 003F; -3976 003F; -397C 003F; -3982 003F; -3988 003F; -398E 003F; -3994 003F; -399A 003F; -39A0 003F; -39A6 003F; -39AC 003F; -39B2 003F; -39B8 003F; -39BE 003F; -39C4 003F; -39CA 003F; -39D0 003F; -39D6 003F; -39DC 003F; -39E2 003F; -39E8 003F; -39EE 003F; -39F4 003F; -39FA 003F; -3A00 003F; -3A06 003F; -3A0C 003F; -3A12 003F; -3A18 003F; -3A1E 003F; -3A24 003F; -3A2A 003F; -3A2F 003F; -3A35 003F; -3A3B 003F; -3A41 003F; -3A47 003F; -3A4D 003F; -3A53 003F; -3A59 003F; -3A5F 003F; -3A65 003F; -3A6B 003F; -3A70 003F; -3A76 003F; -3A7C 003F; -3A82 003F; -3A88 003F; -3A8E 003F; -3A94 003F; -3A9A 003F; -3AA0 003F; -3AA6 003F; -3AAC 003F; -3AB2 003F; -3AB8 003F; -3ABE 003F; -3AC4 003F; -3ACA 003F; -3AD0 003F; -3AD6 003F; -3ADC 003F; -3AE2 003F; -3AE7 003F; -3AED 003F; -3AF3 003F; -3AF9 003F; -3AFF 003F; -3B05 003F; -3B0A 003F; -3B10 003F; -3B16 003F; -3B1B 003F; -3B21 003F; -3B27 003F; -3B2D 003F; -3B33 003F; -3B39 003F; -3B3F 003F; -3B45 003F; -3B4A 003F; -3B50 003F; -3B56 003F; -3B5C 003F; -3B62 003F; -3B68 003F; -3B6E 003F; -3B74 003F; -3B7A 003F; -3B80 003F; -3B86 003F; -3B8C 003F; -3B92 003F; -3B98 003F; -3B9D 0061; -3BA2 003F; -3BA8 003F; -3BAE 003F; -3BB4 003F; -3BBA 003F; -3BC0 003F; -3BC6 003F; -3BCC 003F; -3BD2 003F; -3BD8 003F; -3BDE 003F; -3BE4 003F; -3BEA 003F; -3BF0 003F; -3BF6 003F; -3BFC 003F; -3C02 003F; -3C08 003F; -3C0E 003F; -3C14 003F; -3C19 003F; -3C1F 003F; -3C25 003F; -3C2B 003F; -3C31 003F; -3C37 003F; -3C3D 003F; -3C43 003F; -3C49 003F; -3C4E 0041; -3C54 003F; -3C5A 003F; -3C60 003F; -3C66 003F; -3C6C 003F; -3C72 003F; -3C78 003F; -3C7E 003F; -3C84 003F; -3C8A 003F; -3C90 003F; -3C96 003F; -3C9C 003F; -3CA2 003F; -3CA8 003F; -3CAE 003F; -3CB4 003F; -3CBA 003F; -3CC0 003F; -3CC6 003F; -3CCC 003F; -3CD2 003F; -3CD8 003F; -3CDE 003F; -3CE4 003F; -3CEA 003F; -3CF0 003F; -3CF6 003F; -3CFC 003F; -3D02 003F; -3D08 003F; -3D0E 003F; -3D14 003F; -3D1A 003F; -3D20 003F; -3D26 003F; -3D2C 003F; -3D32 003F; -3D37 003F; -3D3D 003F; -3D43 003F; -3D49 003F; -3D4F 003F; -3D55 003F; -3D5B 003F; -3D61 003F; -3D67 003F; -3D6D 003F; -3D73 003F; -3D79 003F; -3D7F 003F; -3D85 003F; -3D8B 003F; -3D91 003F; -3D96 0041; -3D9C 003F; -3DA2 003F; -3DA8 003F; -3DAE 003F; -3DB4 003F; -3DBA 003F; -3DC0 003F; -3DC6 003F; -3DCC 003F; -3DD2 003F; -3DD8 003F; -3DDE 003F; -3DE4 003F; -3DEA 003F; -3DF0 003F; -3DF6 003F; -3DFC 003F; -3E02 003F; -3E08 003F; -3E0E 003F; -3E14 003F; -3E1A 003F; -3E20 003F; -3E26 003F; -3E2C 003F; -3E32 003F; -3E38 003F; -3E3E 003F; -3E44 003F; -3E4A 003F; -3E50 003F; -3E56 003F; -3E5C 003F; -3E62 003F; -3E68 003F; -3E6E 003F; -3E74 003F; -3E7A 003F; -3E80 003F; -3E86 003F; -3E8C 003F; -3E92 003F; -3E98 003F; -3E9E 003F; -3EA4 003F; -3EAA 003F; -3EAF 003F; -3EB5 003F; -3EB9 003F; -3EBF 003F; -3EC5 003F; -3ECB 003F; -3ED1 003F; -3ED7 003F; -3EDD 003F; -3EE3 003F; -3EE9 003F; -3EEF 003F; -3EF5 003F; -3EFB 003F; -3F01 003F; -3F07 003F; -3F0D 003F; -3F13 003F; -3F19 003F; -3F1E 003F; -3F24 003F; -3F2A 003F; -3F30 003F; -3F36 003F; -3F3C 003F; -3F42 003F; -3F48 003F; -3F4E 003F; -3F54 003F; -3F5A 003F; -3F60 003F; -3F66 003F; -3F6C 003F; -3F72 003F; -3F78 003F; -3F7E 003F; -3F84 003F; -3F8A 003F; -3F90 003F; -3F96 003F; -3F9C 003F; -3FA2 003F; -3FA8 003F; -3FAE 003F; -3FB4 003F; -3FBA 003F; -3FC0 003F; -3FC6 003F; -3FCC 003F; -3FD2 003F; -3FD8 003F; -3FDE 003F; -3FE4 003F; -3FEA 003F; -3FF0 003F; -3FF6 003F; -2F93E 0021; -4001 003F; -4007 003F; -400C 003F; -4012 003F; -FAD3 0021; -401D 003F; -4023 003F; -4029 003F; -402F 003F; -4035 003F; -2F949 0041; -403F 003F; -4045 003F; -404A 003F; -4050 003F; -4056 003F; -405C 003F; -4062 003F; -4068 003F; -406E 003F; -4074 003F; -407A 003F; -4080 003F; -4086 003F; -408C 003F; -4092 003F; -4097 003F; -409D 003F; -40A3 003F; -40A9 003F; -40AF 003F; -40B5 003F; -40BB 003F; -40C1 003F; -40C7 003F; -40CD 003F; -40D3 003F; -40D9 003F; -40DF 003F; -40E4 003F; -40EA 003F; -40F0 003F; -40F6 003F; -40FC 003F; -4102 003F; -4108 003F; -410E 003F; -4114 003F; -411A 003F; -4120 003F; -4126 003F; -412C 003F; -4131 003F; -4137 003F; -413D 003F; -4143 003F; -4149 003F; -414F 003F; -4155 003F; -415B 003F; -4161 003F; -4167 003F; -416D 003F; -4173 003F; -4179 003F; -417F 003F; -4185 003F; -418B 003F; -4191 003F; -4197 003F; -419D 003F; -41A3 003F; -41A9 003F; -41AF 003F; -41B5 003F; -41BB 003F; -41C1 003F; -41C7 003F; -41CD 003F; -41D3 003F; -41D9 003F; -41DF 003F; -41E5 003F; -41EB 003F; -41F1 003F; -41F7 003F; -41FD 003F; -4202 0041; -4208 003F; -420E 003F; -4214 003F; -421A 003F; -4220 003F; -4226 003F; -422B 003F; -4231 003F; -4237 003F; -423D 003F; -4243 003F; -4249 003F; -424F 003F; -4255 003F; -425B 003F; -4261 003F; -4267 003F; -426D 003F; -4273 003F; -4279 003F; -427F 003F; -4285 003F; -428B 003F; -4291 003F; -4297 003F; -429D 003F; -42A2 003F; -42A8 003F; -42AE 003F; -42B4 003F; -42BA 003F; -42C0 003F; -42C6 003F; -42CC 003F; -42D2 003F; -42D8 003F; -42DE 003F; -42E4 003F; -42EA 003F; -42F0 003F; -42F6 003F; -42FC 003F; -4301 0041; -4307 003F; -430D 003F; -4313 003F; -4319 003F; -431F 003F; -4325 003F; -432B 003F; -4331 003F; -4336 003F; -433C 003F; -4342 003F; -4348 003F; -434E 003F; -4354 003F; -4359 0041; -435F 003F; -4365 003F; -436B 003F; -4371 003F; -4377 003F; -437D 003F; -4383 003F; -4389 003F; -438F 003F; -4395 003F; -439B 003F; -43A1 003F; -43A7 003F; -43AD 003F; -43B3 003F; -43B9 003F; -43BF 003F; -43C5 003F; -43CB 003F; -43D1 003F; -43D6 003F; -43DB 003F; -43E1 003F; -43E7 003F; -43ED 003F; -43F3 003F; -43F9 003F; -43FF 003F; -4405 003F; -2F984 0021; -4410 003F; -4416 003F; -441C 003F; -4422 003F; -4428 003F; -442E 003F; -4434 003F; -443A 003F; -4440 003F; -4446 003F; -444C 003F; -4452 003F; -4458 003F; -445E 003F; -4464 003F; -446A 003F; -446F 003F; -4475 003F; -447B 003F; -4481 003F; -4487 003F; -448D 003F; -4493 003F; -4499 003F; -449F 003F; -44A5 003F; -44AB 003F; -44B1 003F; -44B7 003F; -44BD 003F; -44C3 003F; -44C9 003F; -44CF 003F; -44D5 003F; -44DB 003F; -44E1 003F; -44E7 003F; -44ED 003F; -44F3 003F; -44F9 003F; -44FF 003F; -4505 003F; -450B 003F; -4511 003F; -4517 003F; -451D 003F; -4523 003F; -4529 003F; -452E 003F; -4534 003F; -453A 003F; -4540 003F; -4546 003F; -454C 003F; -4552 003F; -4558 003F; -455D 0041; -4562 003F; -4568 003F; -456D 003F; -4573 003F; -4579 003F; -457F 003F; -4585 003F; -458B 003F; -4591 003F; -4597 003F; -459D 003F; -45A3 003F; -45A9 003F; -45AF 003F; -45B5 003F; -45BB 003F; -45C1 003F; -45C7 003F; -45CD 003F; -45D3 003F; -45D8 003F; -45DE 003F; -45E4 003F; -45EA 003F; -45F0 003F; -45F6 003F; -45FB 003F; -4601 003F; -4607 003F; -460D 003F; -4613 003F; -4619 003F; -461F 003F; -4625 003F; -462B 003F; -4631 003F; -4636 003F; -463C 003F; -4642 003F; -4648 003F; -464E 003F; -4654 003F; -465A 003F; -4660 003F; -4666 003F; -466C 003F; -4672 003F; -4678 003F; -467E 003F; -4684 003F; -468A 003F; -4690 003F; -4696 003F; -469C 003F; -46A2 003F; -46A8 003F; -46AE 003F; -46B4 003F; -46BA 003F; -46BF 003F; -46C5 003F; -46CA 003F; -46D0 003F; -46D6 003F; -46DC 003F; -46E2 003F; -46E8 003F; -46EE 003F; -46F4 003F; -46FA 003F; -4700 003F; -4706 003F; -470C 003F; -4712 003F; -4718 003F; -471E 003F; -4724 003F; -472A 003F; -4730 003F; -4736 003F; -473C 003F; -4742 003F; -4748 003F; -474E 003F; -4754 003F; -475A 003F; -4760 003F; -4766 003F; -476C 003F; -4772 003F; -4778 003F; -477E 003F; -4784 003F; -478A 003F; -4790 003F; -4796 003F; -479C 003F; -47A2 003F; -47A8 003F; -47AE 003F; -47B4 003F; -47BA 003F; -47C0 003F; -47C6 003F; -47CC 003F; -47D2 003F; -47D8 003F; -47DE 003F; -47E4 003F; -47EA 003F; -47F0 003F; -47F6 003F; -47FC 003F; -4802 003F; -4808 003F; -480E 003F; -4814 003F; -481A 003F; -4820 003F; -4826 003F; -482C 003F; -4832 003F; -4838 003F; -483E 003F; -4844 003F; -484A 003F; -4850 003F; -4856 003F; -485C 003F; -4862 003F; -4868 003F; -486E 003F; -4874 003F; -487A 003F; -4880 003F; -4886 003F; -488C 003F; -4892 003F; -4898 003F; -489E 003F; -48A4 003F; -48AA 003F; -48B0 003F; -48B6 003F; -48BC 003F; -48C2 003F; -48C8 003F; -48CE 003F; -48D4 003F; -48DA 003F; -48E0 003F; -48E6 003F; -48EC 003F; -48F2 003F; -48F8 003F; -48FE 003F; -4904 003F; -490A 003F; -4910 003F; -4916 003F; -491C 003F; -4922 003F; -4928 003F; -492E 003F; -4934 003F; -493A 003F; -4940 003F; -4946 003F; -494C 003F; -4952 003F; -4958 003F; -495E 003F; -4964 003F; -496A 003F; -4970 003F; -4976 003F; -497C 003F; -4982 003F; -4988 003F; -498E 003F; -4994 003F; -4999 003F; -499F 003F; -49A5 003F; -49AB 003F; -49B1 003F; -49B7 003F; -49BD 003F; -49C3 003F; -49C9 003F; -49CF 003F; -49D5 003F; -49DB 003F; -49E1 003F; -49E6 0041; -49EC 003F; -49F2 003F; -49F8 003F; -49FE 003F; -4A04 003F; -4A0A 003F; -4A10 003F; -4A16 003F; -4A1C 003F; -4A22 003F; -4A28 003F; -4A2E 003F; -4A34 003F; -4A3A 003F; -4A40 003F; -4A46 003F; -4A4C 003F; -4A52 003F; -4A58 003F; -4A5E 003F; -4A64 003F; -4A6A 003F; -4A6F 003F; -4A75 003F; -4A7A 003F; -4A80 003F; -4A86 003F; -4A8C 003F; -4A92 003F; -4A98 003F; -4A9E 003F; -4AA4 003F; -4AAA 003F; -4AB0 003F; -4AB5 003F; -4ABB 003F; -4AC1 003F; -4AC7 003F; -4ACD 003F; -4AD3 003F; -4AD9 003F; -4ADF 003F; -4AE5 003F; -4AEB 003F; -4AF1 003F; -4AF7 003F; -4AFD 003F; -4B03 003F; -4B09 003F; -4B0F 003F; -4B15 003F; -4B1B 003F; -4B21 003F; -4B27 003F; -4B2D 003F; -2FA03 0021; -4B38 003F; -4B3E 003F; -4B44 003F; -4B4A 003F; -4B50 003F; -4B56 003F; -4B5C 003F; -4B62 003F; -4B68 003F; -4B6E 003F; -4B74 003F; -4B7A 003F; -4B80 003F; -4B86 003F; -4B8C 003F; -4B92 003F; -4B98 003F; -4B9E 003F; -4BA4 003F; -4BAA 003F; -4BB0 003F; -4BB6 003F; -4BBC 003F; -4BC2 003F; -4BC8 003F; -2FA08 0021; -4BD3 003F; -4BD9 003F; -4BDF 003F; -4BE5 003F; -4BEB 003F; -4BF1 003F; -4BF7 003F; -4BFD 003F; -4C03 003F; -4C09 003F; -4C0F 003F; -4C15 003F; -4C1B 003F; -4C21 003F; -4C27 003F; -4C2D 003F; -4C33 003F; -4C39 003F; -4C3F 003F; -4C45 003F; -4C4B 003F; -4C51 003F; -4C57 003F; -4C5D 003F; -4C63 003F; -4C69 003F; -4C6F 003F; -4C75 003F; -4C7B 003F; -4C81 003F; -4C87 003F; -4C8D 003F; -4C93 003F; -4C99 003F; -4C9F 003F; -4CA5 003F; -4CAB 003F; -4CB1 003F; -4CB7 003F; -4CBD 003F; -4CC3 003F; -4CC9 003F; -4CCE 0041; -4CD4 003F; -4CDA 003F; -4CE0 003F; -4CE6 003F; -4CEC 003F; -4CF1 003F; -4CF7 003F; -4CFC 003F; -4D02 003F; -4D08 003F; -4D0E 003F; -4D14 003F; -4D1A 003F; -4D20 003F; -4D26 003F; -4D2C 003F; -4D32 003F; -4D38 003F; -4D3E 003F; -4D44 003F; -4D4A 003F; -4D50 003F; -2FA16 0021; -4D5B 003F; -4D61 003F; -4D67 003F; -4D6D 003F; -4D73 003F; -4D79 003F; -4D7F 003F; -4D85 003F; -4D8B 003F; -4D91 003F; -4D97 003F; -4D9D 003F; -4DA3 003F; -4DA9 003F; -4DAF 003F; -4DB5 003F; -20005 003F; -2F9D9 003F; -2F861 003F; -2F889 003F; -FACF 003F; -2F989 003F; -2F8F0 003F; -2F910 003F; -2F927 003F; -2F942 003F; -2F952 003F; -2F961 003F; -2F973 003F; -2F987 003F; -2F9AD 003F; -2F9CC 003F; -2F9E5 003F; -2F9FB 003F; -2FA13 003F; -2A6D3 003F; -E001 003F; -F8FB 003F; -C0000 003F; -E0005 003F; -F0005 003F; -F00FD 003F; -FFF05 003F; -FFFFD 003F; -100005 003F; -1000FD 003F; -10FF05 003F; -10FFFD 003F; +32C0 0021; +09E8 0021; +12423 0021; +0A68 003F; +12435 003F; +2473 0061; +336D 0062; +336F 0062; +3256 0062; +3259 0062; +00B2 0061; +0CE8 0061; +1015B 0061; +1D361 0061; +0D68 0062; +33E1 0021; +06F3 0021; +12420 0021; +136B 003F; +12425 003F; +215C 0062; +325D 0062; +32B4 0062; +0663 0041; +1949 0041; +12425 0061; +1D7DB 0062; +0F23 0062; +32C2 0021; +09EA 0021; +1243C 0021; +09F7 003F; +1243D 003F; +32B7 0061; +32BD 0061; +2783 0041; +0C6A 0061; +1010A 0061; +12452 0041; +0B6A 0062; +1244C 0062; +2784 0021; +1010B 0021; +278E 003F; +10143 003F; +215D 0061; +2784 0041; +0CEB 0061; +10143 0061; +12439 0041; +0BEB 0062; +12439 0062; +2785 0021; +1010C 0021; +0A6C 003F; +248D 0061; +2086 0041; +194C 0041; +12440 0061; +096C 0062; +33E5 0021; +06F7 0021; +12429 0021; +0C6D 003F; +215E 0021; +2077 0041; +0D6D 0041; +1241B 0061; +06F7 0062; +12429 0062; +2787 0021; +1010E 0021; +0A6E 003F; +248F 0061; +2088 0041; +194E 0041; +12444 0061; +096E 0062; +33E7 0021; +06F9 0021; +1242B 0021; +0BEF 003F; +2490 0041; +0669 0061; +19D9 0061; +12447 0061; +07C9 0062; +12446 0062; +000F 0061; +008D 0061; +0599 0061; +0610 0061; +0F35 0061; +2060 0061; +FE07 0061; +1D174 0061; +1FFFF 0061; +E0024 0061; +E0042 0061; +E0060 0061; +E007E 0061; +E011C 0061; +E013A 0061; +E0158 0061; +E0176 0061; +E0194 0061; +E01B2 0061; +E01D0 0061; +E01EE 0061; +001D 0041; +009B 0041; +05A7 0041; +06DE 0041; +1B6E 0041; +D804 0041; +FFFA 0041; +1D182 0041; +8FFFF 0041; +E0032 0041; +E0050 0041; +E006E 0041; +E010C 0041; +E012A 0041; +E0148 0041; +E0166 0041; +E0184 0041; +E01A2 0041; +E01C0 0041; +E01DE 0041; +0061 0334 0300; +0061 0334 0306 0303; +0061 0302 0300 0334; +0061 030A 0334; +0061 0334 0303; +0100 0334; +0041 0334 0323 0306; +0340 0061; +0304 0041; +031B 0041; +032C 0041; +033C 0041; +0351 0041; +FE22 0061; +1DCA 0041; +05B8 0041; +064D 0041; +FE7D 0041; +0657 0041; +0735 0041; +0744 0041; +07F3 0041; +0A02 0041; +0C03 0041; +10A0D 0041; +0EC9 0041; +17C9 0041; +302B 0041; +20D6 0041; +20E5 0041; +1D552 0021; +00E0 0021; +00C4 0021; +1D41A 003F; +00AA 003F; +00E5 003F; +1EAC 003F; +1D44E 0061; +FF21 0041; +1D43 0061; +1EB4 0041; +00E5 0041; +0105 0041; +1EAC 0041; +1D538 0062; +1EA7 0062; +0200 0062; +01E3 0021; +3373 0021; +1D01 0021; +0251 0041; +000F 0062; +008D 0062; +0599 0062; +0610 0062; +0F35 0062; +2060 0062; +FE07 0062; +1D174 0062; +1FFFF 0062; +E0024 0062; +E0042 0062; +E0060 0062; +E007E 0062; +E011C 0062; +E013A 0062; +E0158 0062; +E0176 0062; +E0194 0062; +E01B2 0062; +E01D0 0062; +E01EE 0062; +0300 0062; +031B 0062; +033D 0062; +FE22 0062; +05C7 0062; +FC5E 0062; +0736 0062; +093C 0062; +0CBC 0062; +0ECA 0062; +302C 0062; +20E6 0062; +1D435 0021; +1D5BB 003F; +0062 0061; +24D1 0061; +1D63D 0041; +1D4B7 0062; +1E02 0062; +1D03 0021; +0183 0041; +010A 0334; +1D5F0 0021; +010A 0021; +1D46A 003F; +2106 0061; +1D450 0041; +1D60A 0061; +010C 0061; +1D588 0062; +010C 0062; +339D 0041; +0188 0062; +1E0B 0334; +0064 0021; +1D56F 0021; +2146 003F; +1D63F 003F; +2146 0061; +0044 0061; +1D5D7 0041; +1E0F 0061; +1D555 0062; +1E0B 0062; +3377 0021; +02A3 0061; +1D05 0021; +0257 0021; +0065 0301 0334; +0065 0302 0334 0341; +0065 030C 0334; +0065 0334 0306 0327; +0065 0334 0304 0300; +0065 0302 0334 0323; +1D4EE 0021; +00C9 0021; +0112 0021; +1D58A 003F; +0115 003F; +1E15 003F; +1D58A 0061; +1D4D4 0061; +00E9 0061; +1EC2 0061; +0113 0061; +1EC6 0061; +2130 0062; +1EC4 0062; +1EB8 0062; +0247 0062; +0259 0061; +2107 0041; +025C 0062; +029A 0041; +FF26 0021; +1D627 003F; +1D4BB 0061; +1D405 0061; +1E1F 0041; +1D4D5 0062; +FB01 0061; +0192 003F; +0047 0334 0306; +0047 0334 0304; +1D60E 0021; +1D5C0 003F; +01E7 003F; +1D524 0041; +1D4A2 0041; +01E6 0061; +1D5F4 0062; +01E6 0062; +1DA2 003F; +1D83 0041; +0194 0061; +0068 0334 0308; +0068 0334 0331; +1D573 0021; +210E 003F; +02B0 003F; +1D4F1 0061; +210D 0061; +0125 0061; +0127 0061; +210B 0062; +1E96 0062; +01F6 0021; +2C75 0021; +0049 0341 0334; +00EF 0334; +0049 0304 0334; +0049 0330 0334; +1D408 0021; +0128 0021; +1D5C2 003F; +012D 003F; +FF49 0041; +1D5C2 0041; +1D470 0041; +00EE 0041; +1EC9 0041; +1D526 0062; +00CD 0062; +2171 0021; +33CC 0021; +0131 0021; +0268 0021; +0269 0021; +FF4A 0021; +1D679 0021; +1D4D9 003F; +1D62B 0061; +1D575 0061; +01F0 0041; +1D611 0062; +0248 0061; +006B 0334 0341; +1E35 0334; +1D542 0021; +1D5C4 003F; +0136 003F; +1D5C4 0041; +1D4DA 0041; +1E32 0041; +1D43E 0062; +3389 0021; +33A2 003F; +33BE 0021; +2C6A 0021; +006C 0334 0327; +1E3A 0334; +1D5AB 0021; +1D48D 003F; +1D38 003F; +FF4C 0041; +1D695 0041; +1D5AB 0041; +1E38 0041; +24DB 0062; +1E3D 0062; +33D1 0062; +029F 0061; +2C60 0062; +026D 0061; +004D 0334 0301; +1D5C6 0021; +1E42 0021; +1D5AC 003F; +33A5 003F; +1D52A 0041; +1D40C 0041; +3383 0021; +1D4DC 0062; +338E 0061; +339C 0061; +33BD 003F; +0271 003F; +006E 0303 0334; +006E 0331 0334; +1D511 0021; +1D427 003F; +207F 003F; +1D55F 0061; +1D4A9 0061; +0143 0061; +1E49 0061; +1D475 0062; +1E48 0062; +2116 0062; +1D3B 0062; +019E 0061; +014A 003F; +00F2 0334; +004F 0334 0302 0340; +00D6 0334; +00F5 0308 0334; +006F 0334 0328; +014D 0340 0334; +006F 031B 0334 0301; +1EDE 0334; +1D45C 0021; +2092 0021; +1E4F 0021; +1EDB 0021; +24DE 003F; +1ED0 003F; +01FE 003F; +1ECC 003F; +1D5C8 0041; +1D546 0041; +00F4 0041; +022A 0041; +00F8 0041; +1ECE 0041; +1EE3 0041; +1D40E 0062; +1ED7 0062; +01ED 0062; +0153 0021; +1D14 0021; +1D12 0021; +0275 0021; +1D3D 0061; +1D4F9 0021; +1E57 0021; +1D617 003F; +1D665 0061; +1D5E3 0061; +1E56 0041; +1D40F 0062; +33D7 003F; +33BA 003F; +01A4 0021; +1D4FA 0021; +1D492 003F; +FF51 0061; +0051 0061; +24C6 0061; +1D618 0062; +0072 0334 0301; +0210 0334; +FF52 0021; +1D681 0021; +1D4FB 003F; +0154 003F; +1D597 0061; +1D479 0061; +0155 0041; +1E5C 0041; +1D597 0062; +1E59 0062; +1D19 003F; +1D1A 003F; +2C64 0021; +02B6 0061; +0053 0334 030C; +1E63 0307 0334; +24E2 0021; +015F 0021; +1D47A 003F; +1E68 003F; +1D5CC 0041; +1D54A 0041; +1E66 0041; +1D4C8 0062; +1E65 0062; +00DF 0021; +0282 0021; +1D8B 0021; +0164 0334; +1E71 0334; +FF34 0021; +1E6F 0021; +1D5E7 003F; +1D495 0061; +1D413 0061; +1D40 0061; +1E6E 0061; +1D5E7 0062; +2121 0041; +02A7 0041; +1D75 0041; +0288 0062; +016D 0334; +00FC 0334 0301; +0075 030B 0334; +0055 0334 0304; +01B0 0334; +0075 0334 031B 0309; +0055 0334 032D; +1D448 0021; +01D8 0021; +1EEB 0021; +1D66A 003F; +01D4 003F; +0217 003F; +1D496 0061; +1D414 0061; +1D64 0061; +00DC 0061; +0173 0061; +1EE8 0061; +1E75 0061; +1D580 0062; +01D6 0062; +1EF1 0062; +1D1E 0021; +1D99 0021; +1D5A 003F; +1DB7 003F; +FF56 0021; +1D61D 0021; +2164 003F; +036E 0061; +24E5 0061; +1D5E9 0041; +1D5CF 0062; +2165 0021; +1D20 003F; +0245 0021; +0077 0302 0334; +1D464 0021; +1D42 0021; +0057 003F; +1E88 003F; +1D6A0 0041; +1D61E 0041; +1E86 0041; +1D582 0062; +1D21 0041; +1D535 0021; +1E8B 0021; +1D583 003F; +1D605 0061; +1D51B 0061; +1E8C 0041; +1D4E7 0062; +217B 0061; +0059 0302 0334; +0079 0309 0334; +1D418 0021; +1EF7 0021; +1D5B8 003F; +1D432 0061; +FF39 0061; +02B8 0061; +0232 0061; +1D480 0062; +1EF5 0062; +017A 0334; +007A 0334 0331; +1D585 0021; +1D5D3 003F; +017B 003F; +1D5D3 0041; +1D4E9 0041; +1E92 0041; +1D585 0062; +01B6 0021; +0290 0021; +2C6C 0041; +01EE 0041; +01BA 0062; +01BF 0061; +01BC 0062; +02C0 0062; +02E4 0062; +02A1 0062; +01C3 0062; +03B1 0334 0313 0301; +0391 0345 0313 0334 0300; +1F09 0334; +0391 0345 0314 0334 0340; +1F71 0334; +03B1 0334 0345 0342; +1F04 0021; +03AC 0021; +1F04 003F; +03AC 003F; +1D6A8 0061; +1F06 0061; +1F8B 0061; +1FB0 0061; +1F04 0062; +03AC 0062; +1D66 0021; +0392 0061; +1D66 0062; +1D792 003F; +1D792 0041; +1D773 0021; +1D6FF 0041; +1D5F 0062; +1F19 0334; +0395 0334 0300; +1F1D 0021; +1F1C 003F; +1D6DC 0041; +1F12 0041; +1D6DC 0062; +1FC9 0062; +03DA 0041; +1D701 0061; +1D721 0062; +03B7 0334 0343 0340; +1FC3 0313 0334; +03B7 0314 0334 0340; +1FCC 0314 0342 0334; +03B7 0334 0340 0345; +1F24 0021; +03AE 0021; +1F22 003F; +1FC4 003F; +1D75C 0041; +1F90 0061; +1F9F 0061; +03B7 0062; +1F25 0062; +1D703 0021; +1D78B 003F; +1D6C9 0041; +1D75D 0041; +1DBF 0062; +0399 0343 0334 0342; +0399 0314 0342 0334; +1FD6 0334; +1D6CA 0021; +1FDB 0021; +1F34 003F; +1FD9 003F; +1F30 0041; +1F3F 0041; +1FD7 0041; +1F3D 0062; +1D6DE 0021; +1D725 003F; +1D6EB 0061; +03D7 0041; +1D740 0061; +1D760 0062; +1D727 003F; +3382 003F; +3395 0041; +1D6EE 0021; +1D6B4 0061; +1D6EF 0021; +1D6B5 0061; +03BF 0313 0301 0334; +03BF 0314 0340 0334; +039F 0021; +039F 003F; +1D7B8 0061; +1F41 0061; +039F 0062; +1D71B 0021; +1D6F1 003F; +03A0 0061; +1D6F1 0062; +03D8 0021; +1D7C8 0021; +1FE4 003F; +1D6F2 0061; +1D6B8 0062; +1D7BC 0021; +03C3 0041; +1D768 0061; +03FE 0021; +1D6D5 0021; +1D6D5 0041; +03C5 0334 0343; +03C5 0314 0334 0300; +03C5 0340 0334; +03CB 0340 0334; +1F55 0021; +1D7BE 003F; +03CB 003F; +1D6BC 0041; +1F7B 0061; +1FE2 0041; +1F57 0062; +1D78D 0021; +1D69 003F; +1D76B 0061; +1D69 0062; +03C7 0041; +1D74C 0062; +1D6BF 003F; +1D6D9 0062; +03A9 0343 0334 0341; +1F6E 0334; +1F61 0341 0334; +03C9 0314 0342 0334; +2126 0334 0341; +2126 0345 0334; +1F61 0021; +1D714 003F; +1F6D 003F; +1D788 0061; +1FA4 0041; +1F6D 0041; +1FFB 0061; +1D76E 0062; +1FA7 0062; +03F8 0061; +2C85 0061; +2CB7 0061; +2C8F 0061; +2C95 0061; +2C96 0062; +2CBA 0062; +2C9E 0062; +2CA4 0062; +2CAA 0062; +2CB0 0062; +03E2 0062; +2CC6 0062; +2CC8 0062; +2CCC 0062; +2CD2 0062; +2CD6 0062; +2CDA 0062; +2CB2 0062; +2CE0 0062; +04D0 0334; +04D2 0334; +04D9 0041; +04DA 0061; +0412 003F; +0490 0062; +0494 0062; +0500 0062; +0433 0341 0021; +0413 0341 0041; +0415 0334 0308; +0400 0062; +04D7 0062; +0416 0041; +04DD 0041; +0417 0001 0308 0061; +04DF 0021; +0405 0041; +0418 0340 0334; +0418 0001 0308 0061; +04E4 0021; +0406 0001 0308 0061; +0457 0062; +0439 0062; +049A 003F; +049E 003F; +1D2B 0041; +0459 0062; +04CE 0062; +04A2 003F; +040A 003F; +043E 0334 0308; +04E8 0021; +04EB 0041; +04A6 0062; +048E 0062; +04AA 0062; +04AC 0062; +041A 0341 003F; +0423 0304 0334; +0443 0334 0306; +0443 0334 0308; +0443 0334 030B; +04AE 0021; +0424 0021; +04FE 0021; +0460 0021; +047A 0021; +0427 0021; +04F5 0041; +04CB 0062; +04BE 0062; +0429 0062; +04F9 0021; +042C 0041; +042D 0041; +04EC 0041; +0465 0041; +0469 0041; +0471 0041; +0474 030F 0334; +04A8 003F; +2C01 003F; +2C04 003F; +2C07 003F; +2C0A 003F; +2C0D 003F; +2C10 003F; +2C13 003F; +2C16 003F; +2C19 003F; +2C1C 003F; +2C1F 003F; +2C22 003F; +2C25 003F; +2C28 003F; +2C2B 003F; +2C2E 003F; +10A1 003F; +10A3 003F; +10A5 003F; +10C1 003F; +10A8 003F; +10AA 003F; +10DC 0062; +10DD 0041; +10DF 0041; +10E1 0041; +10F3 0041; +10E4 0041; +10E6 0041; +10E8 0041; +10EA 0041; +10EC 0041; +10EE 0041; +10EF 0041; +10F5 0041; +10F9 0041; +0533 003F; +0587 0041; +0568 0062; +056B 0062; +056E 0062; +0571 0062; +0574 0062; +0575 0062; +0578 0062; +057B 0062; +057E 0062; +0551 003F; +0554 003F; +0559 0041; +FB2E 0041; +05D1 0061; +05D3 0334 05BC; +FB23 003F; +FB4B 0062; +05D8 0334 05BC; +FB39 0041; +FB3A 0021; +FB25 0021; +05DD 0041; +05E1 003F; +FB43 0021; +FB46 003F; +FB27 003F; +FB2A 0021; +FB4A 0334; +10902 0062; +10908 0062; +1090E 0062; +10914 0062; +0627 0653 0021; +FE84 003F; +FB51 0041; +FE85 0062; +0626 0334; +064A 0654 0062; +FC98 0041; +FCDF 0061; +FBED 0041; +FBF1 0041; +FC68 0041; +FBF6 0061; +FE8E 0062; +FE91 003F; +FC06 0021; +FC6A 003F; +FC6D 003F; +FC0A 0061; +FB58 0021; +FB5C 003F; +0752 003F; +0629 0061; +FE97 0062; +FC0C 0021; +FC0D 0061; +FCE3 0021; +FD57 003F; +FC0F 0021; +062B 0041; +FCE5 0021; +FC13 0021; +0679 0041; +FB5F 0061; +067F 0041; +FE9E 0061; +FDFB 003F; +FDA5 003F; +FB78 003F; +0684 0041; +FB7B 0061; +FB7F 0061; +FEA3 0062; +FD5B 003F; +FEA7 0021; +FC19 0061; +FD04 0021; +0758 003F; +FEAC 0041; +068A 003F; +068D 0061; +0690 003F; +FEAE 0041; +FEAF 0041; +0694 003F; +FB8A 0041; +FEB3 0021; +FCAD 0061; +FC1D 0041; +FDC6 003F; +FD61 003F; +FCE8 0061; +FEB7 003F; +FD37 0041; +FD2E 0062; +FD39 0041; +FCE9 0041; +FCEA 0021; +069A 003F; +FEBB 0021; +FC20 0061; +FD0F 0061; +FC21 0061; +FD06 0061; +FC22 0021; +FC24 0021; +FC25 0021; +069D 003F; +FEC2 0061; +FC27 0041; +FCF5 0061; +FEC6 0061; +FECB 0021; +FC29 0061; +FD76 0021; +FCF8 0021; +FECF 0062; +FD7B 003F; +06A0 003F; +FED3 003F; +FC2E 0021; +FC30 0021; +FC32 0061; +06A4 0041; +06A6 0041; +FED7 0021; +FC33 0061; +FD7F 003F; +06A7 003F; +FEDB 0062; +FC39 0061; +FCC7 0062; +FDBB 0061; +FB90 0021; +06AB 003F; +FBD5 0062; +FB94 0062; +FB9C 0062; +FB98 0062; +FEDF 003F; +FEF7 0021; +FC3F 0021; +FDAC 003F; +FD81 003F; +FC85 003F; +FCCD 003F; +06B6 003F; +06FE 003F; +FC45 0061; +FC46 0061; +FC47 0061; +FC48 0041; +FEE7 0021; +FC4B 0061; +FDC7 003F; +FC4D 0021; +FCEE 0041; +FCEF 0061; +06BA 0061; +FBA2 0062; +0769 003F; +FEEC 0062; +FD94 003F; +FBAB 0061; +FBA7 0061; +06C0 003F; +FEED 0041; +FBE1 0041; +FBD8 0041; +FBDB 0062; +FBDF 0041; +FBE9 0041; +06E6 0061; +FCDA 0062; +FCDC 0062; +FC93 0062; +FCDE 0062; +FBFD 003F; +FBE5 0021; +06D2 0021; +0710 0021; +0716 0021; +074D 0021; +071F 0021; +0723 0041; +0729 0021; +079A 0021; +0785 0021; +07A5 0021; +0798 0021; +078F 0021; +0792 0021; +07B1 0021; +07AB 0021; +07CA 0021; +07D0 0021; +07D6 0021; +07D9 0041; +07DF 0021; +07E5 0021; +2D31 0021; +2D37 0021; +2D3D 0021; +2D43 0021; +2D49 0021; +2D4F 0021; +2D55 0021; +2D5B 0021; +2D61 0021; +1200 0021; +1206 0021; +120C 0021; +1211 0021; +1217 0021; +121D 0021; +1383 0021; +1224 0021; +122A 0021; +2D82 0021; +1235 0021; +123A 0021; +2D84 0021; +1245 0021; +124C 0021; +1254 0021; +125C 0021; +1264 0021; +1386 0021; +126B 0021; +1271 0021; +1277 0021; +127C 0021; +1281 0021; +1287 0021; +1290 0021; +1296 0021; +129B 0021; +12A0 0021; +12A6 0021; +12AB 0021; +12B2 0021; +12BA 0021; +12C2 0021; +12CA 0021; +12D0 0021; +12D6 0021; +12DD 0021; +12E2 0021; +12E8 0021; +12EE 0021; +12F4 0021; +12F9 0021; +12FF 0021; +1304 0021; +1309 0021; +130F 0021; +1318 0021; +131E 0021; +1320 0021; +1326 0021; +132B 0021; +1330 0021; +1336 0021; +133B 0021; +1341 0021; +1347 0021; +134D 0021; +138B 0021; +1355 0021; +138F 0021; +2DA1 0021; +2DA8 0021; +2DAE 0021; +2DB5 0021; +2DBC 0021; +2DC3 0021; +2DCA 0021; +2DD1 0021; +2DD8 0021; +2DDE 0021; +0908 0021; +0961 0021; +0912 0021; +0959 0334; +0918 003F; +091C 0062; +0921 0021; +0923 0061; +0928 0061; +097F 003F; +0930 0021; +0935 0061; +097D 0061; +0943 0061; +0947 0061; +094D 0021; +098A 0021; +0990 0021; +0998 0021; +099E 0021; +09DD 0334; +09A5 0062; +09AC 0062; +09F0 003F; +09B9 003F; +09C2 003F; +09C7 0591 09BE 0061; +0334 09CD; +0A0A 0041; +0A72 0041; +0A39 0021; +0A17 0061; +0A5B 0021; +0A21 003F; +0A27 003F; +0A2C 0041; +0A32 0041; +0A41 0021; +0334 0A4D; +0A88 0041; +0AE1 0041; +0A94 0041; +0A9A 0041; +0AA0 0041; +0AA6 0041; +0AAD 0041; +0AB5 0041; +0ABE 0041; +0AC4 0041; +0AC9 0041; +0B07 003F; +0B0C 003F; +0B15 003F; +0B1B 003F; +0B21 0B3C 0334; +0B24 0021; +0B2B 0021; +0B30 0021; +0B37 0021; +0B40 0021; +0B47 1D165 0B56 0061; +0B47 0B57 0041; +0B85 0062; +0B8E 0062; +0B92 0BD7 0041; +0B9F 003F; +0BAE 003F; +0BB4 003F; +0BBE 003F; +0BC6 0591 0BBE 0061; +0BC7 0BBE 003F; +0C05 0021; +0C0B 0021; +0C10 0021; +0C17 0021; +0C1D 0021; +0C23 0021; +0C2A 0021; +0C30 0021; +0C37 0021; +0C41 0021; +0C47 0062; +0C4C 0062; +0C86 0041; +0CE0 0041; +0C92 0041; +0C98 0041; +0C9E 0041; +0CA4 0041; +0CAB 0041; +0CB1 0041; +0CB9 0041; +0CBF 0CD5 0021; +0CE2 0021; +0CC7 003F; +0CCA 0001 0CD5 0061; +0CD5 0021; +0D09 0021; +0D0E 0021; +0D15 0021; +0D1B 0021; +0D21 0021; +0D27 0021; +0D2E 0021; +0D34 0021; +0D3E 0021; +0D46 0021; +0D46 0D3E 0041; +0D4D 0334; +0D89 0062; +0D8F 0062; +0D95 0062; +0D9E 0062; +0DA4 0062; +0DAA 0062; +0DB0 0062; +0DB7 0062; +0DC0 0062; +0DC6 0062; +0DD3 0061; +0DD9 0001 0DDF 0061; +0DDC 0041; +0DD9 0DDF 003F; +A801 0061; +A807 0021; +A80E 0021; +A814 0021; +A81A 0021; +A820 0021; +A826 0021; +10A05 0021; +10A13 0021; +10A1B 0021; +10A21 0021; +10A27 0021; +10A2D 0021; +10A33 0021; +0E42 0E01 0041; +0E42 0E02 0041; +0E42 0E03 0041; +0E42 0E04 0041; +0E42 0E05 0041; +0E42 0E06 0041; +0E42 0E07 0041; +0E42 0E08 0041; +0E42 0E09 0041; +0E42 0E0A 0041; +0E42 0E0B 0041; +0E42 0E0C 0041; +0E42 0E0D 0041; +0E42 0E0E 0041; +0E42 0E0F 0041; +0E42 0E10 0041; +0E42 0E11 0041; +0E42 0E12 0041; +0E42 0E13 0041; +0E42 0E14 0041; +0E42 0E15 0041; +0E42 0E16 0041; +0E42 0E17 0041; +0E42 0E18 0041; +0E42 0E19 0041; +0E42 0E1A 0041; +0E42 0E1B 0041; +0E42 0E1C 0041; +0E42 0E1D 0041; +0E42 0E1E 0041; +0E42 0E1F 0041; +0E42 0E20 0041; +0E42 0E21 0041; +0E42 0E22 0041; +0E42 0E23 0041; +0E42 0E24 0041; +0E42 0E25 0041; +0E42 0E26 0041; +0E42 0E27 0041; +0E42 0E28 0041; +0E42 0E29 0041; +0E42 0E2A 0041; +0E42 0E2B 0041; +0E42 0E2C 0041; +0E42 0E2D 0041; +0E42 0E2E 0041; +0E32 0041; +0E37 0021; +0E40 0062; +0E40 1D165 0E0A 0061; +0E40 1D165 0E14 0061; +0E40 1D165 0E1E 0061; +0E40 1D165 0E28 0061; +0E41 0001 0E03 0061; +0E41 0001 0E0D 0061; +0E41 0001 0E17 0061; +0E41 0001 0E21 0061; +0E41 0001 0E2B 0061; +0E42 0591 0E05 0061; +0E42 0591 0E0F 0061; +0E42 0591 0E19 0061; +0E42 0591 0E23 0061; +0E42 0591 0E2D 0061; +0E43 1D165 0E07 0061; +0E43 1D165 0E11 0061; +0E43 1D165 0E1B 0061; +0E43 1D165 0E25 0061; +0E44 0061; +0E44 0001 0E0A 0061; +0E44 0001 0E14 0061; +0E44 0001 0E1E 0061; +0E44 0001 0E28 0061; +0E81 0062; +0E82 0062; +0E84 0062; +0E87 0062; +0E88 0062; +0E8A 0062; +0E8D 0062; +0E94 0062; +0E95 0062; +0E96 0062; +0E97 0062; +0E99 0062; +0E9A 0062; +0E9B 0062; +0E9C 0062; +0E9D 0062; +0E9E 0062; +0E9F 0062; +0EA1 0062; +0EA2 0062; +0EA3 0062; +0EA5 0062; +0EA7 0062; +0EAA 0062; +0EAB 0062; +0EC4 0EDC 0062; +0EC4 0EDD 0062; +0EAD 0062; +0EAE 0062; +0EAF 0062; +0EB4 003F; +0EB9 0061; +0EC0 0591 0E84 0061; +0EC0 0591 0E9A 0061; +0EC0 0591 0EA7 0061; +0EC1 1D165 0E82 0061; +0EC1 1D165 0E99 0061; +0EC1 1D165 0EA5 0061; +0EC2 0001 0E82 0061; +0EC2 0001 0E99 0061; +0EC2 0001 0EA5 0061; +0EC3 0591 0E81 0061; +0EC3 0591 0E97 0061; +0EC3 0591 0EA3 0061; +0EC4 0062; +0EC4 1D165 0E96 0061; +0EC4 1D165 0EA2 0061; +0F40 0061; +0F42 0061; +0F45 0061; +0F49 0061; +0F4C 0061; +0F4F 0061; +0FA1 0061; +0F55 0061; +0F58 0061; +0F5B 0061; +0FBA 0041; +0FB0 0061; +0FB2 003F; +0FB3 0F71 0021; +0FB5 0041; +0F00 0041; +0F71 003F; +0334 0F80; +0334 0F74 0F71; +0FB2 0F80 0062; +0FB3 0591 0F80 0061; +0F7A 0021; +0F84 0061; +A845 0061; +A86C 0061; +A84D 0061; +A853 0061; +A868 0061; +A85A 0061; +A85D 0061; +A85F 0061; +1901 0061; +1907 0061; +190D 0061; +1913 0061; +1919 0061; +1922 0061; +1928 0061; +1932 0061; +1938 0061; +1705 0061; +170B 0061; +1712 0061; +1723 0021; +1729 0021; +172F 0021; +1734 0041; +1745 0041; +174B 0041; +1751 0041; +1763 0041; +1769 0041; +1770 0041; +1A03 0041; +1A09 0041; +1A0F 0041; +1A15 0041; +1A1A 0062; +1004 0062; +100A 0062; +1010 0062; +1016 0062; +101C 0062; +1020 0062; +1025 102E 0041; +1054 003F; +1030 003F; +1059 003F; +1783 0062; +1789 0062; +178F 0062; +1795 0062; +179B 0062; +17A1 0062; +17A6 0062; +17AC 0062; +17B2 0062; +17B8 0062; +17BE 0062; +17C4 0062; +1953 0061; +1959 0061; +195F 0061; +1965 0061; +196B 0061; +1973 0061; +1984 0061; +198A 0061; +1990 0061; +1996 0061; +199C 0061; +19A0 0061; +19A6 0061; +19B2 0061; +19B8 0061; +19BE 0061; +19C4 0061; +1B05 0061; +1B07 1B35 0041; +1B0B 1B35 0021; +1B0F 0061; +1B13 0062; +1B17 0062; +1B1D 0062; +1B47 0062; +1B48 0062; +1B2D 0062; +1B32 0062; +1B37 0062; +1B3C 003F; +1B3F 0001 1B35 0061; +1B42 1D165 1B35 0061; +1882 0041; +1820 0041; +1845 0041; +1846 0041; +1826 0041; +184A 0041; +182B 0041; +184E 0041; +182F 0041; +18A2 0041; +1833 0041; +185C 0041; +1836 0041; +1856 0041; +1863 0041; +186E 0041; +1859 0041; +185A 0041; +188E 0041; +1891 0041; +18A3 0041; +18A7 0041; +13A4 003F; +13AA 003F; +13B0 003F; +13B6 003F; +13BC 003F; +13C2 003F; +13C8 003F; +13CE 003F; +13D4 003F; +13DA 003F; +13E0 003F; +13E6 003F; +13EC 003F; +13F2 003F; +1404 003F; +140A 003F; +1410 003F; +1416 003F; +141C 003F; +1422 003F; +1428 003F; +142E 003F; +1434 003F; +143A 003F; +1440 003F; +1446 003F; +144C 003F; +1452 003F; +1458 003F; +145E 003F; +1464 003F; +146A 003F; +1470 003F; +1476 003F; +147C 003F; +1482 003F; +1488 003F; +148E 003F; +1494 003F; +149A 003F; +14A0 003F; +14A6 003F; +14AC 003F; +14B2 003F; +14B8 003F; +14BE 003F; +14C4 003F; +14CA 003F; +14D0 003F; +14D6 003F; +14DC 003F; +14E2 003F; +14E8 003F; +14EE 003F; +14F4 003F; +14FA 003F; +1500 003F; +1506 003F; +150C 003F; +1512 003F; +1518 003F; +151E 003F; +1524 003F; +152A 003F; +1530 003F; +1536 003F; +153C 003F; +1542 003F; +1548 003F; +154E 003F; +1554 003F; +155A 003F; +1560 003F; +1566 003F; +156C 003F; +1572 003F; +1578 003F; +157E 003F; +1584 003F; +158A 003F; +158F 003F; +1595 003F; +1676 003F; +159B 003F; +15A1 003F; +157C 003F; +15AC 003F; +15B2 003F; +15B8 003F; +15BE 003F; +15C4 003F; +15CA 003F; +15D0 003F; +15D6 003F; +15DC 003F; +15E2 003F; +15E8 003F; +15EE 003F; +15F4 003F; +15FA 003F; +1600 003F; +1606 003F; +160C 003F; +1612 003F; +1618 003F; +161E 003F; +1624 003F; +162A 003F; +1630 003F; +1636 003F; +163C 003F; +1642 003F; +1648 003F; +164E 003F; +1654 003F; +165A 003F; +1660 003F; +1666 003F; +166C 003F; +1686 003F; +168C 003F; +1692 003F; +1698 003F; +16A2 0061; +16A9 003F; +16B1 003F; +16B7 003F; +16BA 0062; +16C4 0021; +16D5 0021; +16EA 0061; +16D3 0021; +16D9 0041; +16DE 003F; +16E3 003F; +16E7 0021; +1100 0062; +AC00 1175 0021; +AC05 0061; +1102 003F; +1103 0041; +FFA8 0062; +1106 003F; +1107 0041; +FFB3 0062; +3146 003F; +FFB7 0062; +FFB8 0062; +110E 003F; +110F 003F; +1110 0041; +FFBD 0061; +FFBE 0062; +D788 1175 0021; +D7A2 0061; +3166 0041; +111A 0041; +3171 0041; +FFB4 0021; +3175 0041; +1128 0061; +112C 003F; +112F 003F; +1133 0061; +1138 0061; +113E 0061; +1143 0061; +1148 0061; +114D 0061; +1153 0061; +1158 003F; +1160 0041; +1162 0041; +1164 0041; +1166 0041; +1168 0041; +116A 0041; +116C 0041; +116E 0041; +1170 0041; +1172 0041; +1174 0041; +1177 0061; +117D 0061; +1183 0061; +1187 0061; +118C 0061; +318A 0041; +1195 0061; +119B 0061; +11A0 0061; +FFA3 0021; +11AC 0062; +FFAA 0021; +FFAC 0021; +FFAE 0021; +11B6 0061; +11BC 0061; +11C2 0061; +3167 0041; +11CC 003F; +11D0 0061; +11D5 0061; +316D 0041; +11DE 0061; +11E3 0061; +11E9 0061; +11EF 0061; +11F3 0061; +11F9 0061; +30A2 0061; +30A3 0021; +30A4 0062; +30A5 003F; +FF73 0062; +3048 0061; +32D4 0021; +FF6B 0062; +30AC 003F; +330C 0021; +304E 0021; +3310 0062; +3316 0062; +30AF 0061; +331A 0041; +331C 003F; +3054 0334; +3054 0041; +30B6 0021; +3320 0021; +30B7 0041; +30B9 3099 0334; +3059 0062; +FF7E 0041; +30BD 0021; +305F 3099 0334; +3060 0061; +30C1 0061; +30C5 0021; +30C3 0062; +FF83 0041; +30C9 0021; +3326 003F; +3328 003F; +31F4 003F; +30CD 0041; +3329 003F; +3070 003F; +3070 0041; +30D2 0334 309A; +32EA 0041; +3330 0061; +31F7 003F; +32EB 0062; +30D9 0334; +333C 0021; +307A 0062; +30DB 0334 3099; +3341 0041; +307C 0062; +FF8F 003F; +3345 003F; +307F 0062; +3080 0041; +30E1 0041; +30E2 0041; +334F 0061; +32F4 0021; +3350 003F; +32F5 0061; +FF97 0061; +31FC 0062; +308B 0041; +308C 0041; +31FF 003F; +308F 003F; +3357 0041; +32FD 0021; +30FA 003F; +FF9D 0062; +3108 0062; +310C 0062; +31AD 0062; +3112 0062; +3117 0061; +311B 0061; +31A5 0062; +3121 0062; +31B0 0062; +31B3 0062; +A001 0062; +A007 0062; +A00D 0062; +A013 0062; +A019 0062; +A01F 0062; +A025 0062; +A02B 0062; +A031 0062; +A037 0062; +A03D 0062; +A043 0062; +A049 0062; +A04F 0062; +A055 0062; +A05B 0062; +A061 0062; +A067 0062; +A06D 0062; +A073 0062; +A079 0062; +A07F 0062; +A085 0062; +A08B 0062; +A091 0062; +A097 0062; +A09D 0062; +A0A3 0062; +A0A9 0062; +A0AF 0062; +A0B5 0062; +A0BB 0062; +A0C1 0062; +A0C7 0062; +A0CD 0062; +A0D3 0062; +A0D9 0062; +A0DF 0062; +A0E5 0062; +A0EB 0062; +A0F1 0062; +A0F7 0062; +A0FD 0062; +A103 0062; +A109 0062; +A10F 0062; +A115 0062; +A11B 0062; +A121 0062; +A127 0062; +A12D 0062; +A133 0062; +A139 0062; +A13F 0062; +A145 0062; +A14B 0062; +A151 0062; +A157 0062; +A15D 0062; +A163 0062; +A169 0062; +A16F 0062; +A175 0062; +A17B 0062; +A181 0062; +A187 0062; +A18D 0062; +A193 0062; +A199 0062; +A19F 0062; +A1A5 0062; +A1AB 0062; +A1B1 0062; +A1B7 0062; +A1BD 0062; +A1C3 0062; +A1C9 0062; +A1CF 0062; +A1D5 0062; +A1DB 0062; +A1E1 0062; +A1E7 0062; +A1ED 0062; +A1F3 0062; +A1F9 0062; +A1FF 0062; +A205 0062; +A20B 0062; +A211 0062; +A217 0062; +A21D 0062; +A223 0062; +A229 0062; +A22F 0062; +A235 0062; +A23B 0062; +A241 0062; +A247 0062; +A24D 0062; +A253 0062; +A259 0062; +A25F 0062; +A265 0062; +A26B 0062; +A271 0062; +A277 0062; +A27D 0062; +A283 0062; +A289 0062; +A28F 0062; +A295 0062; +A29B 0062; +A2A1 0062; +A2A7 0062; +A2AD 0062; +A2B3 0062; +A2B9 0062; +A2BF 0062; +A2C5 0062; +A2CB 0062; +A2D1 0062; +A2D7 0062; +A2DD 0062; +A2E3 0062; +A2E9 0062; +A2EF 0062; +A2F5 0062; +A2FB 0062; +A301 0062; +A307 0062; +A30D 0062; +A313 0062; +A319 0062; +A31F 0062; +A325 0062; +A32B 0062; +A331 0062; +A337 0062; +A33D 0062; +A343 0062; +A349 0062; +A34F 0062; +A355 0062; +A35B 0062; +A361 0062; +A367 0062; +A36D 0062; +A373 0062; +A379 0062; +A37F 0062; +A385 0062; +A38B 0062; +A391 0062; +A397 0062; +A39D 0062; +A3A3 0062; +A3A9 0062; +A3AF 0062; +A3B5 0062; +A3BB 0062; +A3C1 0062; +A3C7 0062; +A3CD 0062; +A3D3 0062; +A3D9 0062; +A3DF 0062; +A3E5 0062; +A3EB 0062; +A3F1 0062; +A3F7 0062; +A3FD 0062; +A403 0062; +A409 0062; +A40F 0062; +A415 0062; +A41B 0062; +A421 0062; +A427 0062; +A42D 0062; +A433 0062; +A439 0062; +A43F 0062; +A445 0062; +A44B 0062; +A451 0062; +A457 0062; +A45D 0062; +A463 0062; +A469 0062; +A46F 0062; +A475 0062; +A47B 0062; +A481 0062; +A487 0062; +10300 0062; +10306 0062; +1030C 0062; +10312 0062; +10318 0062; +1031E 0062; +10335 0062; +1033B 0062; +10341 0062; +10347 0062; +10429 0061; +1042C 0061; +1042F 0061; +10432 0061; +10435 0061; +10438 0061; +1043B 0061; +1043E 0061; +10441 0061; +10444 0061; +10447 0061; +1044A 0061; +1044D 0061; +10450 0062; +10456 0062; +1045C 0062; +10462 0062; +10468 0062; +1046E 0062; +10474 0062; +1047A 0062; +10480 0062; +10486 0062; +1048C 0062; +10492 0062; +10498 0062; +10000 0062; +10006 0062; +1000D 0062; +10013 0062; +10019 0062; +1001F 0062; +10025 0062; +1002C 0062; +10032 0062; +10038 0062; +10040 0062; +10046 0062; +1004C 0062; +10054 0062; +1005A 0062; +10082 0062; +10088 0062; +1008E 0062; +10094 0062; +1009A 0062; +100A0 0062; +100A6 0062; +100AC 0062; +100B2 0062; +100B8 0062; +100BE 0062; +100C4 0062; +100CA 0062; +100D0 0062; +100D6 0062; +100DC 0062; +100E2 0062; +100E8 0062; +100EE 0062; +100F4 0062; +100FA 0062; +10805 0062; +1080E 0062; +10814 0062; +1081A 0062; +10820 0062; +10826 0062; +1082C 0062; +10832 0062; +1083C 0062; +10384 0062; +1038A 0062; +10390 0062; +10396 0062; +1039C 0062; +103A4 0062; +103AA 0062; +103B0 0062; +103B6 0062; +103BC 0062; +103C2 0062; +103CC 0062; +12002 0062; +12008 0062; +1200E 0062; +12014 0062; +1201A 0062; +12020 0062; +12026 0062; +1202C 0062; +12032 0062; +12038 0062; +1203E 0062; +12044 0062; +1204A 0062; +12050 0062; +12056 0062; +1205C 0062; +12062 0062; +12068 0062; +1206E 0062; +12074 0062; +1207A 0062; +12080 0062; +12086 0062; +1208C 0062; +12092 0062; +12098 0062; +1209E 0062; +120A4 0062; +120AA 0062; +120B0 0062; +120B6 0062; +120BC 0062; +120C2 0062; +120C8 0062; +120CE 0062; +120D4 0062; +120DA 0062; +120E0 0062; +120E6 0062; +120EC 0062; +120F2 0062; +120F8 0062; +120FE 0062; +12104 0062; +1210A 0062; +12110 0062; +12116 0062; +1211C 0062; +12122 0062; +12128 0062; +1212E 0062; +12134 0062; +1213A 0062; +12140 0062; +12146 0062; +1214C 0062; +12152 0062; +12158 0062; +1215E 0062; +12164 0062; +1216A 0062; +12170 0062; +12176 0062; +1217C 0062; +12182 0062; +12188 0062; +1218E 0062; +12194 0062; +1219A 0062; +121A0 0062; +121A6 0062; +121AC 0062; +121B2 0062; +121B8 0062; +121BE 0062; +121C4 0062; +121CA 0062; +121D0 0062; +121D6 0062; +121DC 0062; +121E2 0062; +121E8 0062; +121EE 0062; +121F4 0062; +121FA 0062; +12200 0062; +12206 0062; +1220C 0062; +12212 0062; +12218 0062; +1221E 0062; +12224 0062; +1222A 0062; +12230 0062; +12236 0062; +1223C 0062; +12242 0062; +12248 0062; +1224E 0062; +12254 0062; +1225A 0062; +12260 0062; +12266 0062; +1226C 0062; +12272 0062; +12278 0062; +1227E 0062; +12284 0062; +1228A 0062; +12290 0062; +12296 0062; +1229C 0062; +122A2 0062; +122A8 0062; +122AE 0062; +122B4 0062; +122BA 0062; +122C0 0062; +122C6 0062; +122CC 0062; +122D2 0062; +122D8 0062; +122DE 0062; +122E4 0062; +122EA 0062; +122F0 0062; +122F6 0062; +122FC 0062; +12302 0062; +12308 0062; +1230E 0062; +12314 0062; +1231A 0062; +12320 0062; +12326 0062; +1232C 0062; +12332 0062; +12338 0062; +1233E 0062; +12344 0062; +1234A 0062; +12350 0062; +12356 0062; +1235C 0062; +12362 0062; +12368 0062; +1236E 0062; +319C 0062; +3282 0061; +F967 0062; +3197 0062; +2F800 0062; +2E83 0062; +3281 003F; +2F08 0061; +32AD 0062; +FA30 0061; +2F808 0062; +329D 0062; +2F80F 0062; +2F0B 0061; +2F0C 0061; +2F817 0062; +2F81B 0062; +2F0F 0061; +2E89 0062; +F9FF 0062; +F98A 0061; +2F825 0062; +2F827 0062; +2F82A 0062; +32A9 0062; +303A 0062; +2F18 0061; +F91C 0062; +2E81 0062; +2F1D 0062; +3294 0062; +2F83F 0062; +2F843 0062; +FA7A 0061; +FA0D 0062; +FA38 0062; +2F84B 0062; +2F852 0062; +FA10 0061; +F94A 0062; +2F21 0062; +2F85E 0062; +F909 0062; +2F865 0062; +2F986 0062; +32AB 0062; +F9AA 003F; +2F872 0062; +2F875 0041; +F9BD 0062; +2F878 0041; +2F87C 0062; +F9AB 0062; +2F30 0062; +2F887 0062; +2F34 0062; +F928 0061; +2F35 0062; +2F894 0061; +2F3A 0062; +2F89C 0062; +2F89D 0062; +2F8A0 0062; +FA88 0062; +2F8A8 0062; +2F8AB 0062; +FA8B 003F; +2F3D 0062; +2F3F 0062; +FA02 0062; +2F8BB 0062; +2F8C0 0062; +2F8C6 0062; +2F41 0062; +F969 0062; +F983 0062; +3290 0041; +FA12 0061; +FA06 0062; +328A 003F; +2F8D8 0062; +F9E1 0062; +F9F4 0062; +337F 0062; +F9E2 0062; +F914 0041; +F91D 0062; +2F8F3 0062; +F9A5 0062; +2F4F 0062; +2F53 0062; +2F8FE 0062; +329F 0062; +FA97 003F; +2F901 0062; +2F90E 0062; +2F90C 0062; +FA47 0061; +F984 0062; +2F55 0061; +F9FB 0062; +FA48 0061; +F91E 0062; +FA9E 0061; +2F922 0062; +2F924 0062; +F92B 0062; +F961 0061; +F9AD 0062; +2F92F 0062; +F9EF 0062; +2F63 0062; +FAA3 0062; +2F66 0061; +FAA5 0062; +2F6B 0062; +2F6C 0061; +2F946 0061; +FA9D 0062; +F93B 0061; +F964 0062; +FA4C 0061; +2F953 0062; +FA52 0062; +2F72 0062; +2F959 0062; +F9F7 0061; +FA56 0061; +2F76 0062; +2F969 0062; +F9CF 0062; +F957 0062; +FA58 0062; +FAB1 0062; +2EB4 0062; +2EB6 0041; +2F7B 0062; +FA5B 0041; +2F97D 0062; +2EBA 0062; +2F983 0062; +FA5C 0062; +2F98C 0062; +2F8A 0062; +2EC0 0062; +2F995 0062; +F9FE 0062; +F93E 0062; +F958 0062; +2F9A8 0062; +F9F0 0062; +2EC1 0062; +2F8D 0062; +2F9BD 0062; +2F9C1 0062; +2F9C4 0061; +2F9C7 0062; +F924 0062; +2F92 0062; +2EC7 0062; +FABB 0062; +FABA 0062; +FABF 0062; +2F95 0062; +2F99 0062; +F903 0062; +2F9A 0062; +2F9DA 0062; +2F9DE 0062; +F98D 0062; +2FA1 0062; +FA25 0061; +2FA2 0061; +2F9E4 0062; +2FA4 0062; +328E 0062; +2F9E9 0062; +2ED1 0061; +F986 0062; +F9C6 0062; +F9DC 0062; +F9EA 0062; +F949 0062; +FA1C 0061; +FAC9 0062; +FACA 0062; +F9B4 0062; +2FB5 0062; +2EDF 0061; +2FA04 0062; +2FBA 0062; +2FBB 0061; +2FBE 0062; +F939 0062; +2FA0F 0062; +2EE7 0062; +2EE8 0062; +F989 0062; +2EEA 0062; +2FCF 0062; +2EEC 0062; +2EEF 0062; +2FD4 0041; +9FA1 0062; +FA0F 0062; +FA23 0062; +3401 0062; +3407 0062; +340D 0062; +3413 0062; +3419 0062; +341F 0062; +3425 0062; +342B 0062; +3431 0062; +3437 0062; +343D 0062; +3443 0062; +3449 0062; +344F 0062; +3455 0062; +345B 0062; +3461 0062; +3467 0062; +346D 0062; +3473 0062; +3479 0062; +347F 0062; +3485 0062; +348B 0062; +3491 0062; +3497 0062; +349D 0062; +34A2 0062; +34A8 0062; +34AE 0062; +34B4 0062; +2F813 0062; +34BE 0062; +34C4 0062; +34CA 0062; +34D0 0062; +34D6 0062; +34DC 0062; +34E1 0062; +34E7 0062; +34ED 0062; +34F3 0062; +34F9 0062; +34FF 0062; +3505 0062; +350B 0062; +3511 0062; +3516 0062; +351C 0062; +3522 0062; +3528 0062; +352E 0062; +3534 0062; +353A 0062; +3540 0062; +3546 0062; +354C 0062; +3552 0062; +3558 0062; +355E 0062; +3564 0062; +356A 0062; +3570 0062; +3576 0062; +357C 0062; +3582 0062; +3588 0062; +358E 0062; +3594 0062; +359A 0062; +35A0 0062; +35A6 0062; +35AC 0062; +35B2 0062; +35B8 0062; +35BE 0062; +35C4 0062; +35CA 0062; +35D0 0062; +35D6 0062; +35DC 0062; +35E2 0062; +35E8 0062; +35EE 0062; +35F4 0062; +35FA 0062; +3600 0062; +3606 0062; +360C 0062; +3612 0062; +3618 0062; +361E 0062; +3624 0062; +362A 0062; +3630 0062; +3636 0062; +363C 0062; +3642 0062; +3648 0062; +364E 0062; +3654 0062; +365A 0062; +3660 0062; +3666 0062; +366C 0062; +3672 0062; +3678 0062; +367E 0062; +3684 0062; +368A 0062; +3690 0062; +3696 0062; +369C 0062; +36A2 0062; +36A8 0062; +36AE 0062; +36B4 0062; +36BA 0062; +36C0 0062; +36C6 0062; +36CC 0062; +36D2 0062; +36D8 0062; +36DE 0062; +36E4 0062; +36EA 0062; +36EF 0062; +36F5 0062; +36FB 0062; +3700 0062; +3706 0062; +370C 0062; +3712 0062; +3718 0062; +371E 0062; +3724 0062; +372A 0062; +3730 0062; +3736 0062; +373C 0062; +3742 0062; +3748 0062; +374E 0062; +3754 0062; +375A 0062; +3760 0062; +3766 0062; +376C 0062; +3772 0062; +3778 0062; +377E 0062; +3783 0062; +3789 0062; +378F 0062; +3795 0062; +379B 0062; +37A1 0062; +37A7 0062; +37AD 0062; +37B3 0062; +37B9 0062; +37BF 0062; +37C5 0062; +37CB 0062; +37D1 0062; +37D7 0062; +37DD 0062; +37E3 0062; +37E9 0062; +37EF 0062; +37F5 0062; +37FB 0062; +3801 0062; +3807 0062; +380D 0062; +3813 0062; +3819 0062; +381F 0062; +3825 0062; +382B 0062; +3830 0062; +3836 0062; +383C 0062; +3842 0062; +3848 0062; +384E 0062; +3854 0062; +385A 0062; +3860 0062; +3865 0062; +386B 0062; +3871 0062; +3877 0062; +2F88A 0062; +3882 0062; +3888 0062; +388E 0062; +3894 0062; +389A 0062; +38A0 0062; +38A6 0062; +38AC 0062; +38B2 0062; +38B8 0062; +38BE 0062; +38C4 0062; +38C9 0062; +38CF 0062; +38D5 0062; +38DB 0062; +38E1 0062; +38E6 0062; +38EC 0062; +38F2 0062; +38F8 0062; +38FE 0062; +3904 0062; +390A 0062; +3910 0062; +3916 0062; +391C 0061; +3921 0062; +3927 0062; +392D 0062; +3933 0062; +3939 0062; +393E 0062; +3944 0062; +394A 0062; +3950 0062; +3956 0062; +395C 0062; +3962 0062; +3968 0062; +396E 0062; +3974 0062; +397A 0062; +3980 0062; +3986 0062; +398C 0062; +3992 0062; +3998 0062; +399E 0062; +39A4 0062; +39AA 0062; +39B0 0062; +39B6 0062; +39BC 0062; +39C2 0062; +39C8 0062; +39CE 0062; +39D4 0062; +39DA 0062; +39E0 0062; +39E6 0062; +39EC 0062; +39F2 0062; +39F8 0062; +39FE 0062; +3A04 0062; +3A0A 0062; +3A10 0062; +3A16 0062; +3A1C 0062; +3A22 0062; +3A28 0062; +3A2E 0061; +3A33 0062; +3A39 0062; +3A3F 0062; +3A45 0062; +3A4B 0062; +3A51 0062; +3A57 0062; +3A5D 0062; +3A63 0062; +3A69 0062; +3A6E 0062; +3A74 0062; +3A7A 0062; +3A80 0062; +3A86 0062; +3A8C 0062; +3A92 0062; +3A98 0062; +3A9E 0062; +3AA4 0062; +3AAA 0062; +3AB0 0062; +3AB6 0062; +3ABC 0062; +3AC2 0062; +3AC8 0062; +3ACE 0062; +3AD4 0062; +3ADA 0062; +3AE0 0062; +3AE5 0062; +3AEB 0062; +3AF1 0062; +3AF7 0062; +3AFD 0062; +3B03 0062; +2F8D0 0062; +3B0E 0062; +3B14 0062; +2F8CE 0062; +3B1F 0062; +3B25 0062; +3B2B 0062; +3B31 0062; +3B37 0062; +3B3D 0062; +3B43 0062; +3B49 0061; +3B4E 0062; +3B54 0062; +3B5A 0062; +3B60 0062; +3B66 0062; +3B6C 0062; +3B72 0062; +3B78 0062; +3B7E 0062; +3B84 0062; +3B8A 0062; +3B90 0062; +3B96 0062; +3B9C 0062; +3BA0 0062; +3BA6 0062; +3BAC 0062; +3BB2 0062; +3BB8 0062; +3BBE 0062; +3BC4 0062; +3BCA 0062; +3BD0 0062; +3BD6 0062; +3BDC 0062; +3BE2 0062; +3BE8 0062; +3BEE 0062; +3BF4 0062; +3BFA 0062; +3C00 0062; +3C06 0062; +3C0C 0062; +3C12 0062; +3C18 0061; +3C1D 0062; +3C23 0062; +3C29 0062; +3C2F 0062; +3C35 0062; +3C3B 0062; +3C41 0062; +3C47 0062; +3C4D 0062; +3C52 0062; +3C58 0062; +3C5E 0062; +3C64 0062; +3C6A 0062; +3C70 0062; +3C76 0062; +3C7C 0062; +3C82 0062; +3C88 0062; +3C8E 0062; +3C94 0062; +3C9A 0062; +3CA0 0062; +3CA6 0062; +3CAC 0062; +3CB2 0062; +3CB8 0062; +3CBE 0062; +3CC4 0062; +3CCA 0062; +3CD0 0062; +3CD6 0062; +3CDC 0062; +3CE2 0062; +3CE8 0062; +3CEE 0062; +3CF4 0062; +3CFA 0062; +3D00 0062; +3D06 0062; +3D0C 0062; +3D12 0062; +3D18 0062; +3D1E 0062; +3D24 0062; +3D2A 0062; +3D30 0062; +3D35 0062; +3D3B 0062; +3D41 0062; +3D47 0062; +3D4D 0062; +3D53 0062; +3D59 0062; +3D5F 0062; +3D65 0062; +3D6B 0062; +3D71 0062; +3D77 0062; +3D7D 0062; +3D83 0062; +3D89 0062; +3D8F 0062; +3D95 0062; +3D9A 0062; +3DA0 0062; +3DA6 0062; +3DAC 0062; +3DB2 0062; +3DB8 0062; +3DBE 0062; +3DC4 0062; +3DCA 0062; +3DD0 0062; +3DD6 0062; +3DDC 0062; +3DE2 0062; +3DE8 0062; +3DEE 0062; +3DF4 0062; +3DFA 0062; +3E00 0062; +3E06 0062; +3E0C 0062; +3E12 0062; +3E18 0062; +3E1E 0062; +3E24 0062; +3E2A 0062; +3E30 0062; +3E36 0062; +3E3C 0062; +3E42 0062; +3E48 0062; +3E4E 0062; +3E54 0062; +3E5A 0062; +3E60 0062; +3E66 0062; +3E6C 0062; +3E72 0062; +3E78 0062; +3E7E 0062; +3E84 0062; +3E8A 0062; +3E90 0062; +3E96 0062; +3E9C 0062; +3EA2 0062; +3EA8 0062; +3EAD 0062; +3EB3 0062; +3EB8 0041; +3EBD 0062; +3EC3 0062; +3EC9 0062; +3ECF 0062; +3ED5 0062; +3EDB 0062; +3EE1 0062; +3EE7 0062; +3EED 0062; +3EF3 0062; +3EF9 0062; +3EFF 0062; +3F05 0062; +3F0B 0062; +3F11 0062; +3F17 0062; +3F1C 0062; +3F22 0062; +3F28 0062; +3F2E 0062; +3F34 0062; +3F3A 0062; +3F40 0062; +3F46 0062; +3F4C 0062; +3F52 0062; +3F58 0062; +3F5E 0062; +3F64 0062; +3F6A 0062; +3F70 0062; +3F76 0062; +3F7C 0062; +3F82 0062; +3F88 0062; +3F8E 0062; +3F94 0062; +3F9A 0062; +3FA0 0062; +3FA6 0062; +3FAC 0062; +3FB2 0062; +3FB8 0062; +3FBE 0062; +3FC4 0062; +3FCA 0062; +3FD0 0062; +3FD6 0062; +3FDC 0062; +3FE2 0062; +3FE8 0062; +3FEE 0062; +3FF4 0062; +3FFA 0062; +3FFF 0062; +4005 0062; +400A 0062; +4010 0062; +4016 0062; +401B 0062; +4021 0062; +4027 0062; +402D 0062; +4033 0062; +FAD4 003F; +403D 0062; +4043 0062; +4048 0062; +404E 0062; +4054 0062; +405A 0062; +4060 0062; +4066 0062; +406C 0062; +4072 0062; +4078 0062; +407E 0062; +4084 0062; +408A 0062; +4090 0062; +4096 0061; +409B 0062; +40A1 0062; +40A7 0062; +40AD 0062; +40B3 0062; +40B9 0062; +40BF 0062; +40C5 0062; +40CB 0062; +40D1 0062; +40D7 0062; +40DD 0062; +40E3 0061; +40E8 0062; +40EE 0062; +40F4 0062; +40FA 0062; +4100 0062; +4106 0062; +410C 0062; +4112 0062; +4118 0062; +411E 0062; +4124 0062; +412A 0062; +2F958 0062; +4135 0062; +413B 0062; +4141 0062; +4147 0062; +414D 0062; +4153 0062; +4159 0062; +415F 0062; +4165 0062; +416B 0062; +4171 0062; +4177 0062; +417D 0062; +4183 0062; +4189 0062; +418F 0062; +4195 0062; +419B 0062; +41A1 0062; +41A7 0062; +41AD 0062; +41B3 0062; +41B9 0062; +41BF 0062; +41C5 0062; +41CB 0062; +41D1 0062; +41D7 0062; +41DD 0062; +41E3 0062; +41E9 0062; +41EF 0062; +41F5 0062; +41FB 0062; +4201 0062; +4206 0062; +420C 0062; +4212 0062; +4218 0062; +421E 0062; +4224 0062; +4229 0062; +422F 0062; +4235 0062; +423B 0062; +4241 0062; +4247 0062; +424D 0062; +4253 0062; +4259 0062; +425F 0062; +4265 0062; +426B 0062; +4271 0062; +4277 0062; +427D 0062; +4283 0062; +4289 0062; +428F 0062; +4295 0062; +429B 0062; +2F967 0062; +42A6 0062; +42AC 0062; +42B2 0062; +42B8 0062; +42BE 0062; +42C4 0062; +42CA 0062; +42D0 0062; +42D6 0062; +42DC 0062; +42E2 0062; +42E8 0062; +42EE 0062; +42F4 0062; +42FA 0062; +4300 0062; +4305 0062; +430B 0062; +4311 0062; +4317 0062; +431D 0062; +4323 0062; +4329 0062; +432F 0062; +2F971 0062; +433A 0062; +4340 0062; +4346 0062; +434C 0062; +4352 0062; +4358 0062; +435D 0062; +4363 0062; +4369 0062; +436F 0062; +4375 0062; +437B 0062; +4381 0062; +4387 0062; +438D 0062; +4393 0062; +4399 0062; +439F 0062; +43A5 0062; +43AB 0062; +43B1 0062; +43B7 0062; +43BD 0062; +43C3 0062; +43C9 0062; +43CF 0062; +43D5 0061; +2F8D7 0062; +43DF 0062; +43E5 0062; +43EB 0062; +43F1 0062; +43F7 0062; +43FD 0062; +4403 0062; +4409 0062; +440E 0062; +4414 0062; +441A 0062; +4420 0062; +4426 0062; +442C 0062; +4432 0062; +4438 0062; +443E 0062; +4444 0062; +444A 0062; +4450 0062; +4456 0062; +445C 0062; +4462 0062; +4468 0062; +446D 0062; +4473 0062; +4479 0062; +447F 0062; +4485 0062; +448B 0062; +4491 0062; +4497 0062; +449D 0062; +44A3 0062; +44A9 0062; +44AF 0062; +44B5 0062; +44BB 0062; +44C1 0062; +44C7 0062; +44CD 0062; +44D3 0062; +44D9 0062; +44DF 0062; +44E5 0062; +44EB 0062; +44F1 0062; +44F7 0062; +44FD 0062; +4503 0062; +4509 0062; +450F 0062; +4515 0062; +451B 0062; +4521 0062; +4527 0062; +452C 0062; +4532 0062; +4538 0062; +453E 0062; +4544 0062; +454A 0062; +4550 0062; +4556 0062; +455C 0062; +4561 0061; +4566 0062; +2F9B2 0062; +4571 0062; +4577 0062; +457D 0062; +4583 0062; +4589 0062; +458F 0062; +4595 0062; +459B 0062; +45A1 0062; +45A7 0062; +45AD 0062; +45B3 0062; +45B9 0062; +45BF 0062; +45C5 0062; +45CB 0062; +45D1 0062; +45D7 0061; +45DC 0062; +45E2 0062; +45E8 0062; +45EE 0062; +45F4 0062; +2F9C2 0062; +45FF 0062; +4605 0062; +460B 0062; +4611 0062; +4617 0062; +461D 0062; +4623 0062; +4629 0062; +462F 0062; +4635 0061; +463A 0062; +4640 0062; +4646 0062; +464C 0062; +4652 0062; +4658 0062; +465E 0062; +4664 0062; +466A 0062; +4670 0062; +4676 0062; +467C 0062; +4682 0062; +4688 0062; +468E 0062; +4694 0062; +469A 0062; +46A0 0062; +46A6 0062; +46AC 0062; +46B2 0062; +46B8 0062; +46BE 0061; +46C3 0062; +46C8 0062; +46CE 0062; +46D4 0062; +46DA 0062; +46E0 0062; +46E6 0062; +46EC 0062; +46F2 0062; +46F8 0062; +46FE 0062; +4704 0062; +470A 0062; +4710 0062; +4716 0062; +471C 0062; +4722 0062; +4728 0062; +472E 0062; +4734 0062; +473A 0062; +4740 0062; +4746 0062; +474C 0062; +4752 0062; +4758 0062; +475E 0062; +4764 0062; +476A 0062; +4770 0062; +4776 0062; +477C 0062; +4782 0062; +4788 0062; +478E 0062; +4794 0062; +479A 0062; +47A0 0062; +47A6 0062; +47AC 0062; +47B2 0062; +47B8 0062; +47BE 0062; +47C4 0062; +47CA 0062; +47D0 0062; +47D6 0062; +47DC 0062; +47E2 0062; +47E8 0062; +47EE 0062; +47F4 0062; +47FA 0062; +4800 0062; +4806 0062; +480C 0062; +4812 0062; +4818 0062; +481E 0062; +4824 0062; +482A 0062; +4830 0062; +4836 0062; +483C 0062; +4842 0062; +4848 0062; +484E 0062; +4854 0062; +485A 0062; +4860 0062; +4866 0062; +486C 0062; +4872 0062; +4878 0062; +487E 0062; +4884 0062; +488A 0062; +4890 0062; +4896 0062; +489C 0062; +48A2 0062; +48A8 0062; +48AE 0062; +48B4 0062; +48BA 0062; +48C0 0062; +48C6 0062; +48CC 0062; +48D2 0062; +48D8 0062; +48DE 0062; +48E4 0062; +48EA 0062; +48F0 0062; +48F6 0062; +48FC 0062; +4902 0062; +4908 0062; +490E 0062; +4914 0062; +491A 0062; +4920 0062; +4926 0062; +492C 0062; +4932 0062; +4938 0062; +493E 0062; +4944 0062; +494A 0062; +4950 0062; +4956 0062; +495C 0062; +4962 0062; +4968 0062; +496E 0062; +4974 0062; +497A 0062; +4980 0062; +4986 0062; +498C 0062; +4992 0062; +4997 0062; +499D 0062; +49A3 0062; +49A9 0062; +49AF 0062; +49B5 0062; +49BB 0062; +49C1 0062; +49C7 0062; +49CD 0062; +49D3 0062; +49D9 0062; +49DF 0062; +49E5 0062; +49EA 0062; +49F0 0062; +49F6 0062; +49FC 0062; +4A02 0062; +4A08 0062; +4A0E 0062; +4A14 0062; +4A1A 0062; +4A20 0062; +4A26 0062; +4A2C 0062; +4A32 0062; +4A38 0062; +4A3E 0062; +4A44 0062; +4A4A 0062; +4A50 0062; +4A56 0062; +4A5C 0062; +4A62 0062; +4A68 0062; +4A6E 0061; +4A73 0062; +4A78 0062; +4A7E 0062; +4A84 0062; +4A8A 0062; +4A90 0062; +4A96 0062; +4A9C 0062; +4AA2 0062; +4AA8 0062; +4AAE 0062; +4AB3 0062; +4AB9 0062; +4ABF 0062; +4AC5 0062; +4ACB 0062; +4AD1 0062; +4AD7 0062; +4ADD 0062; +4AE3 0062; +4AE9 0062; +4AEF 0062; +4AF5 0062; +4AFB 0062; +4B01 0062; +4B07 0062; +4B0D 0062; +4B13 0062; +4B19 0062; +4B1F 0062; +4B25 0062; +4B2B 0062; +4B31 0062; +4B36 0062; +4B3C 0062; +4B42 0062; +4B48 0062; +4B4E 0062; +4B54 0062; +4B5A 0062; +4B60 0062; +4B66 0062; +4B6C 0062; +4B72 0062; +4B78 0062; +4B7E 0062; +4B84 0062; +4B8A 0062; +4B90 0062; +4B96 0062; +4B9C 0062; +4BA2 0062; +4BA8 0062; +4BAE 0062; +4BB4 0062; +4BBA 0062; +4BC0 0062; +4BC6 0062; +4BCC 0062; +4BD1 0062; +4BD7 0062; +4BDD 0062; +4BE3 0062; +4BE9 0062; +4BEF 0062; +4BF5 0062; +4BFB 0062; +4C01 0062; +4C07 0062; +4C0D 0062; +4C13 0062; +4C19 0062; +4C1F 0062; +4C25 0062; +4C2B 0062; +4C31 0062; +4C37 0062; +4C3D 0062; +4C43 0062; +4C49 0062; +4C4F 0062; +4C55 0062; +4C5B 0062; +4C61 0062; +4C67 0062; +4C6D 0062; +4C73 0062; +4C79 0062; +4C7F 0062; +4C85 0062; +4C8B 0062; +4C91 0062; +4C97 0062; +4C9D 0062; +4CA3 0062; +4CA9 0062; +4CAF 0062; +4CB5 0062; +4CBB 0062; +4CC1 0062; +4CC7 0062; +4CCD 0062; +4CD2 0062; +4CD8 0062; +4CDE 0062; +4CE4 0062; +4CEA 0062; +4CEF 0062; +4CF5 0062; +4CFA 0062; +4D00 0062; +4D06 0062; +4D0C 0062; +4D12 0062; +4D18 0062; +4D1E 0062; +4D24 0062; +4D2A 0062; +4D30 0062; +4D36 0062; +4D3C 0062; +4D42 0062; +4D48 0062; +4D4E 0062; +4D54 0062; +4D59 0062; +4D5F 0062; +4D65 0062; +4D6B 0062; +4D71 0062; +4D77 0062; +4D7D 0062; +4D83 0062; +4D89 0062; +4D8F 0062; +4D95 0062; +4D9B 0062; +4DA1 0062; +4DA7 0062; +4DAD 0062; +4DB3 0062; +20003 0062; +2F816 0062; +2F859 0062; +2F87B 0062; +2F8A4 0062; +2F897 0062; +2F8E3 0062; +2F906 0062; +2F923 0062; +2F93C 0062; +FAD5 0062; +2F95D 0061; +2F898 0062; +2F97C 0062; +2F9A6 0062; +2F9C5 0062; +2F9E0 0062; +2F81C 0062; +2FA10 0062; +2A6D1 0062; +0370 0062; +E005 0062; +F8FF 0062; +E0003 0062; +F0003 0062; +F00FB 0062; +FFF03 0062; +FFFFB 0062; +100003 0062; +1000FB 0062; +10FF03 0062; +10FFFB 0062; diff --git a/Build/source/libs/icu-xetex/test/testdata/CollationTest_SHIFTED_STUB.txt b/Build/source/libs/icu-xetex/test/testdata/CollationTest_SHIFTED_STUB.txt index 6dfe945aa46..9f9221c4be9 100644 --- a/Build/source/libs/icu-xetex/test/testdata/CollationTest_SHIFTED_STUB.txt +++ b/Build/source/libs/icu-xetex/test/testdata/CollationTest_SHIFTED_STUB.txt @@ -1,817 +1,858 @@ -2006 0021; -FF40 0021; -02D8 0021; -1FBF 0334 0300; -1FFE 0342 0334; -1FC0 003F; -FE31 0021; -055D 003F; -003B 003F; -0706 003F; -0001 0021; -0083 0021; -0489 0021; -05AE 0021; -06E7 0021; -2060 0021; -FE07 0021; -1D174 0021; -1FFFF 0021; -E0024 0021; -E0042 0021; -E0060 0021; -E007E 0021; -E011C 0021; -E013A 0021; -E0158 0021; -E0176 0021; -E0194 0021; -E01B2 0021; -E01D0 0021; -E01EE 0021; -0006 003F; -0089 003F; -0595 003F; -0600 003F; -06ED 003F; -206B 003F; -FE0C 003F; -1D179 003F; -4FFFE 003F; -E0029 003F; -E0047 003F; -E0065 003F; -E0103 003F; -E0121 003F; -E013F 003F; -E015D 003F; -E017B 003F; -E0199 003F; -E01B7 003F; -E01D5 003F; -10FFFF 003F; -203D 003F; -1809 003F; -17D4 003F; -205B 003F; -201A 003F; -207D 0021; -FE48 0021; -169B 003F; -298A 003F; -2E02 003F; -FE40 003F; -FE3B 0021; -3019 003F; -FF0A 003F; -FE5F 0021; -2043 003F; -2054 003F; -2E12 003F; -070B 003F; -0F0A 003F; -104E 003F; -0374 003F; -02CE 003F; -02EA 003F; -02FA 003F; -1399 003F; -A70E 003F; -09FA 003F; -0F02 003F; -0F3E 003F; -0FCC 003F; -19ED 003F; -19FC 003F; -212E 003F; -2192 003F; -219D 003F; -21AC 003F; -21BC 003F; -21CB 003F; -21D7 003F; -21E6 003F; -21F5 003F; -1D7C3 0021; -2209 0334; -FB29 0021; -2260 0021; -FF5C 003F; -2219 003F; -2226 003F; -2234 003F; -2242 003F; -226D 0021; -225B 003F; -2266 003F; -2278 003F; -22E1 003F; -228A 003F; -2295 003F; -22AC 003F; -22AF 003F; -22B6 003F; -22C5 003F; -22D4 003F; -22E7 003F; -22FA 003F; -2309 003F; -2318 003F; -2327 003F; -2338 003F; -2347 003F; -2356 003F; -2365 003F; -2374 003F; -2383 003F; -2392 003F; -23A1 003F; -23B0 003F; -23BF 003F; -23CE 003F; -2401 003F; -2410 003F; -241F 003F; -2447 003F; -250A 003F; -2519 003F; -2528 003F; -2537 003F; -2546 003F; -2555 003F; -2564 003F; -2573 003F; -2582 003F; -2591 003F; -FFED 0021; -25AE 003F; -25BD 003F; -FFEE 003F; -25DA 003F; -25E9 003F; -25F8 003F; -2607 003F; -2616 003F; -2625 003F; -263C 003F; -264B 003F; -265A 003F; -2669 003F; -267B 003F; -2690 003F; -26A2 003F; -26B1 003F; -2712 003F; -2721 003F; -2731 003F; -2740 003F; -2751 003F; -2766 003F; -2775 003F; -27A5 003F; -27B5 003F; -27C5 003F; -27DD 003F; -27F0 003F; -27FF 003F; -290E 003F; -291D 003F; -292C 003F; -293B 003F; -294A 003F; -2959 003F; -2968 003F; -2977 003F; -299C 003F; -29AB 003F; -29BA 003F; -29C9 003F; -29D8 003F; -29E7 003F; -29F6 003F; -2A07 003F; -2A17 003F; -2A26 003F; -2A35 003F; -2A44 003F; -2A53 003F; -2A62 003F; -2A71 003F; -2A83 003F; -2A92 003F; -2AA1 003F; -2AB0 003F; -2ABF 003F; -2ACE 003F; -2ADD 0021; -2AEB 003F; -2AFA 003F; -2B09 003F; -2CE9 003F; -280D 003F; -281C 003F; -282B 003F; -283A 003F; -2849 003F; -2858 003F; -2867 003F; -2876 003F; -2885 003F; -2894 003F; -28A3 003F; -28B2 003F; -28C1 003F; -28D0 003F; -28DF 003F; -28EE 003F; -28FD 003F; -2636 003F; -4DCD 003F; -4DDC 003F; -4DEB 003F; -4DFA 003F; -1D309 003F; -1D318 003F; -1D327 003F; -1D336 003F; -1D345 003F; -1D354 003F; -A49C 003F; -A4AB 003F; -A4BA 003F; -10139 003F; -10181 003F; -1D006 003F; -1D015 003F; -1D024 003F; -1D033 003F; -1D042 003F; -1D051 003F; -1D060 003F; -1D06F 003F; -1D07E 003F; -1D08D 003F; -1D09C 003F; -1D0AB 003F; -1D0BA 003F; -1D0C9 003F; -1D0D8 003F; -1D0E7 003F; -1D100 003F; -1D10F 003F; -1D11E 003F; -1D12D 003F; -1D13C 003F; -1D14B 003F; -1D158 0334 1D165; -1D158 003F; -1D18D 003F; -1D19C 003F; -1D1AF 003F; -1D1B9 0021; -1D1C2 003F; -1D1D1 003F; -1D202 003F; -1D211 003F; -1D220 003F; -1D22F 003F; -1D23E 003F; -2FFA 003F; -31CD 003F; -FFFD 003F; -137B 003F; -10116 003F; -10125 003F; -10140 003F; -10153 003F; -1016A 003F; -103D4 003F; -0302 003F; -030D 0021; -031E 0021; -032F 0021; -0334 05A7; -0334 06E4; -0334 1D17F; -059D 0334; -06D8 0334; -1D167 0334; -1D244 0334; -0334 0308; -0334 0311; -0334 0322; -0334 0339; -0334 034D; -0334 035D; -0334 0486; -05BC 0334; -0657 0334; -0735 0334; -0744 0334; -0B3C 0334; -1037 0334; -20D1 0334; -0339 0021; -034D 0021; -035D 0021; -0486 0021; -05BC 0021; -FE78 0021; -FC63 0021; -065E 0021; -073C 0021; -093C 0021; -0A03 0021; -0CBC 0021; -0E4E 003F; -0F7E 003F; -17CF 003F; -FF9E 003F; -20DA 003F; -20E8 0021; -3005 0021; -3035 0021; -30FD 0334 3099; -FE69 0021; -FFE5 0062; -0E3F 0062; -20A4 0062; -20AA 0062; -20B0 0062; -1D7CE 0021; -0AE6 0021; -1810 0021; -06F0 0061; -0F20 0061; -0966 0062; -2474 0021; -0661 0021; -19D1 0021; -10320 0021; -24FE 0041; -246A 0021; -3363 0062; -33EB 0062; -2153 0041; -246D 0061; -2155 003F; -246F 0021; -3368 0062; -3369 0062; -33F1 0062; -33F2 0062; -24F5 0041; -0BE7 0061; -10107 0061; -00B9 0062; -10158 0062; -1D7DA 0021; -104A2 003F; -0F22 003F; -2487 003F; -3251 0041; -2154 003F; -3370 0041; -3257 0041; -FF12 0041; -0662 0041; -19D2 0041; -103D2 0041; -0C68 0062; -32C1 0062; -24F7 003F; -0C69 0021; -10A42 0021; -325D 0041; -32B2 0041; -1D7D1 0041; -09E9 0041; -1043 0041; -06F3 0062; -33E2 0062; -24F8 0021; -0AEA 003F; -1814 003F; -32B9 0041; -32BE 0041; -2074 0061; -0D6A 0061; -2477 0062; -0E54 0062; -2478 0021; -06F5 0021; -0ED5 0021; -32BF 0021; -1D7E7 0041; -0A6B 0041; -17F5 0041; +2007 0021; +1FEF 0021; +FE4C 003F; +1FBF 0300 0334; +1FFE 0341 0334; +1FC0 0021; +2013 003F; +FE50 003F; +003B 0021; +0704 0021; +16EB 0021; +001D 0021; +009B 0021; +05A7 0021; +06DE 0021; +1B6E 0021; +D804 0021; +FFFA 0021; +1D182 0021; +8FFFF 0021; +E0032 0021; +E0050 0021; +E006E 0021; +E010C 0021; +E012A 0021; +E0148 0021; +E0166 0021; +E0184 0021; +E01A2 0021; +E01C0 0021; +E01DE 0021; +FE57 003F; +0017 003F; +0095 003F; +05A1 003F; +06D8 003F; +180C 003F; +206E 003F; +FE0F 003F; +1D17C 003F; +5FFFF 003F; +E002C 003F; +E004A 003F; +E0068 003F; +E0106 003F; +E0124 003F; +E0142 003F; +E0160 003F; +E017E 003F; +E019C 003F; +E01BA 003F; +E01D8 003F; +FE56 0021; +FE52 0021; +1B5C 0021; +104B 0021; +1B5B 0021; +1039F 0021; +0022 0021; +208D 003F; +FE5B 0021; +29FC 0021; +298E 0021; +2E09 0021; +300B 003F; +3014 0021; +FD3F 0021; +002F 0021; +FF05 0021; +2033 0021; +2042 0021; +2E16 0021; +180A 0021; +0F0B 003F; +17D9 0021; +02BA 0021; +02D2 0021; +02EC 0021; +02FC 0021; +A701 0021; +A710 0021; +060E 0021; +0CF2 0021; +0F1C 0021; +0FC4 0021; +19E6 0021; +19F5 0021; +1B65 0021; +2104 0021; +2143 0021; +2193 0021; +21A1 0021; +21B1 0021; +21C0 0021; +21CD 003F; +21DB 0021; +21EA 0021; +21F9 0021; +2203 0338 0334; +220B 0338 0334; +FE62 003F; +FE66 003F; +007E 0021; +221D 0021; +222A 0021; +2238 0021; +2245 0338 0334; +2250 0021; +225F 0021; +226A 0021; +227A 0338 0334; +2282 0021; +228E 0021; +2299 0021; +22A6 0021; +22B2 0021; +22BA 0021; +22C9 0021; +22D8 0021; +22EF 0021; +22FE 0021; +230D 0021; +231C 0021; +232D 0021; +233C 0021; +234B 0021; +235A 0021; +2369 0021; +2378 0021; +2387 0021; +2396 0021; +23A5 0021; +23B4 0021; +23C3 0021; +23D2 0021; +23E1 0021; +2408 0021; +2417 0021; +2426 0021; +2502 003F; +2511 0021; +2520 0021; +252F 0021; +253E 0021; +254D 0021; +255C 0021; +256B 0021; +257A 0021; +2589 0021; +2598 0021; +25A6 0021; +25B5 0021; +25C4 0021; +25D2 0021; +25E1 0021; +25F0 0021; +25FF 0021; +260E 0021; +261D 0021; +262C 0021; +2643 0021; +2652 0021; +2661 0021; +2673 0021; +2682 0021; +2697 0021; +26A9 0021; +2707 0021; +2718 0021; +2727 0021; +2737 0021; +2746 0021; +275B 0021; +276C 0021; +279C 0021; +27AB 0021; +27BB 0021; +27D0 0021; +27DF 0021; +27F2 0021; +2901 0021; +2910 0021; +291F 0021; +292E 0021; +293D 0021; +294C 0021; +295B 0021; +296A 0021; +2979 0021; +299E 0021; +29AD 0021; +29BC 0021; +29CB 0021; +29DA 0021; +29E9 0021; +29F8 0021; +2A09 0021; +2A19 0021; +2A28 0021; +2A37 0021; +2A46 0021; +2A55 0021; +2A64 0021; +2A73 0021; +2A85 0021; +2A94 0021; +2AA3 0021; +2AB2 0021; +2AC1 0021; +2AD0 0021; +2ADE 0021; +2AED 0021; +2AFC 0021; +2B0B 0021; +2B1A 0021; +2804 0021; +2813 0021; +2822 0021; +2831 0021; +2840 0021; +284F 0021; +285E 0021; +286D 0021; +287C 0021; +288B 0021; +289A 0021; +28A9 0021; +28B8 0021; +28C7 0021; +28D6 0021; +28E5 0021; +28F4 0021; +268D 0021; +4DC4 0021; +4DD3 0021; +4DE2 0021; +4DF1 0021; +1D300 0021; +1D30F 0021; +1D31E 0021; +1D32D 0021; +1D33C 0021; +1D34B 0021; +A493 0021; +A4A2 0021; +A4B1 0021; +A4C0 0021; +1013F 0021; +10187 0021; +1D00C 0021; +1D01B 0021; +1D02A 0021; +1D039 0021; +1D048 0021; +1D057 0021; +1D066 0021; +1D075 0021; +1D084 0021; +1D093 0021; +1D0A2 0021; +1D0B1 0021; +1D0C0 0021; +1D0CF 0021; +1D0DE 0021; +1D0ED 0021; +1D106 0021; +1D115 0021; +1D124 0021; +1D133 0021; +1D142 0021; +1D151 0021; +1D158 1D165 1D170 0334; +1D15B 0021; +1D193 0021; +1D1A2 0021; +1D1B5 0021; +1D1BA 1D165 0334 1D16F; +1D1C8 0021; +1D1D7 0021; +1D208 0021; +1D217 0021; +1D226 0021; +1D235 0021; +2FF1 0021; +31C4 0021; +3013 0021; +1372 0021; +10322 0021; +1011D 0021; +1012C 0021; +1014A 0021; +10162 0021; +10171 0021; +10A46 0021; +1D369 0021; +0300 0021; +0328 003F; +031A 003F; +032B 003F; +0334 05A0; +0334 06DB; +0334 1D170; +0596 0334; +0611 0334; +0F86 0334; +1D180 0334; +0341 0334; +0334 0328; +0334 031A; +0334 032B; +0334 0345; +0334 0355; +0334 0362; +05B1 0334; +0334 FB1E; +0334 0659; +0334 0737; +0334 0746; +09BC 0334; +0334 0ECA; +0334 3099; +20EE 0334; +0347 003F; +0357 003F; +1DC1 003F; +0486 003F; +05C1 003F; +FE79 003F; +FE7C 003F; +065D 003F; +073B 003F; +074A 003F; +0952 003F; +0A82 003F; +0D82 003F; +0E4E 0021; +0F7E 0021; +17CF 0021; +FF9E 0021; +20DA 0021; +20E7 003F; +0E46 003F; +3033 003F; +FF70 003F; +00A2 0041; +00A5 0021; +0BF9 0021; +20A3 0021; +20A9 0041; +20AF 0021; +20B5 0021; +06F0 003F; +0ED0 003F; +1D7E2 0041; +0BE6 0041; +3007 0041; +0ED0 0062; +1D7E3 003F; +0967 003F; +0F2A 003F; +12434 0021; +2491 0041; +3362 0021; +32CA 0021; +2493 0062; +2494 0061; +24EE 0021; +2496 0021; +3367 0021; +33EF 0021; +33F0 0021; +2499 0062; +24F3 0041; +1D7E3 0041; +0967 0041; +0F2A 0041; +12434 0061; +2081 0062; +10142 0062; +0032 0021; +2082 0021; +0D68 0021; +1015D 0021; +249B 0021; +3251 0021; +3253 0021; +3370 0021; +3257 0021; +0032 0061; +2082 0061; +0D68 0061; +1015D 0061; +0032 0062; +0D68 0062; +33E1 0021; +1D7E5 003F; +09F6 0021; +1043 003F; +12420 003F; +33FE 0021; +325F 0041; +0033 0061; +2083 0061; +0D69 0061; +12417 0061; +0033 0062; +0D69 0062; +33E2 0021; +1D7E6 003F; +09F7 0021; +1044 003F; +1240F 003F; +32B7 0041; +32BC 0041; +2463 0061; +0A6A 0061; +17F4 0061; +12426 0041; +0664 0062; +1240F 0062; +0035 0021; +2085 0021; +194B 0021; +10173 0021; +1D364 0021; +1D7D3 0041; +096B 0041; +1045 0041; +12427 0061; 277A 0062; -10143 0062; -1D7DE 0021; -104A6 003F; -0F2F 003F; -1D7FC 0041; -0AEC 0041; -1816 0041; -0BEC 0062; -335E 0062; -2077 003F; -194D 003F; -FF17 0061; -0667 0061; -0E57 0061; -24FB 0062; -1010D 0062; -1D7E0 003F; -0A6E 0021; -17F8 0021; -2791 0061; -0C6E 0061; -0038 0062; -19D8 0062; -247C 0021; -06F9 0021; -0ED9 0021; -1D7FF 0061; -09EF 0061; -17E9 0061; -096F 0062; -32C8 0062; -1680 0061; -1FCE 0061; -FE32 0061; -037E 0061; -16ED 0061; -2024 0061; +3025 0062; +335D 0021; +277B 003F; +0C6C 003F; +1010C 003F; +1D7D4 0041; +096C 0041; +1046 0041; +FF16 0062; +19D6 0062; +335E 0021; +277C 003F; +0C6D 003F; +1010D 003F; +247A 0041; +07C7 0061; +0ED7 0061; +12412 0041; +09ED 0062; +33E6 0021; +1D7EA 003F; +09EE 003F; +17E8 003F; +FF18 0041; +0668 0041; +19D8 0041; +12406 0041; +096E 0062; +33E7 0021; +1D7EB 003F; +09EF 003F; +17E9 003F; +1D368 003F; +2079 0041; +0D6F 0041; +1241D 0061; +2792 0062; +12407 0062; +0085 0061; +FF3E 0061; +FE34 0061; +30A0 0061; +FE13 0061; +00A1 0061; +0702 0061; 1360 0061; -201C 0061; -FF5B 0061; -2990 0061; -FE41 0061; -00B6 0061; -066A 0061; -2E01 0061; -0DF4 0061; -166D 0061; -02D6 0061; -1390 0061; -A714 0061; -0F1A 0061; -19E4 0061; -2114 0061; -2195 0061; -21B6 0061; -21D4 0061; -21F2 0061; -1D76F 0061; -207C 0061; -221C 0061; -2239 0061; -2256 0061; -2277 0061; -22E3 0061; -22B0 0061; -22CA 0061; -22F0 0061; -230E 0061; -232E 0061; -234C 0061; -236A 0061; -2388 0061; -23A6 0061; -23C4 0061; -2406 0061; -2424 0061; -250F 0061; -252D 0061; -254B 0061; -2569 0061; -2587 0061; -25A4 0061; -25C2 0061; -25DF 0061; -25FD 0061; -261B 0061; -2641 0061; -265F 0061; -2680 0061; -26A7 0061; -2717 0061; -2736 0061; -275A 0061; -279B 0061; -27BA 0061; -27E2 0061; -2904 0061; -2922 0061; -2940 0061; -295E 0061; -297C 0061; -29B0 0061; -29CE 0061; -29EC 0061; -2A0D 0061; -2A2B 0061; -2A49 0061; -2A67 0061; -2A88 0061; -2AA6 0061; -2AC4 0061; -2AE2 0061; -2B00 0061; -2804 0061; -2822 0061; -2840 0061; -285E 0061; -287C 0061; -289A 0061; -28B8 0061; -28D6 0061; -28F4 0061; -4DC4 0061; -4DE2 0061; -1D300 0061; -1D31E 0061; -1D33C 0061; -A493 0061; -A4B1 0061; -1013F 0061; -1D00C 0061; -1D02A 0061; -1D048 0061; -1D066 0061; -1D084 0061; -1D0A2 0061; -1D0C0 0061; -1D0DE 0061; -1D106 0061; -1D124 0061; -1D142 0061; -1D159 0061; -1D1A0 0061; -1D1C2 0061; -1D202 0061; -1D220 0061; -1D23E 0061; -31CD 0061; -137B 0061; -10125 0061; -10153 0061; -103D4 0061; -001D 0061; -009B 0061; -05A7 0061; -06DE 0061; -200E 0061; -FE00 0061; -1D16D 0061; -1D1AB 0061; -DFFFE 0061; -E003B 0061; -E0059 0061; -E0077 0061; -E0115 0061; -E0133 0061; -E0151 0061; -E016F 0061; -E018D 0061; -E01AB 0061; -E01C9 0061; -E01E7 0061; -1D5EE 0021; -2001 0041; -FE4C 0041; -309B 0041; -060C 0041; -0707 0041; -055E 0041; -0387 0041; -10102 0041; -208E 0041; -2985 0041; -2E1C 0041; -FE3A 0041; -FE68 0041; -2036 0041; -05BE 0041; -0F10 0041; -02C7 0041; -02F3 0041; -A707 0041; -0BFA 0041; -0FC4 0041; -19F5 0041; -214C 0041; -21A8 0041; -21C7 0041; -21E5 0041; -1D6DB 0041; -FB29 0041; -FF5E 0041; -222C 0041; -224A 0041; -2266 0041; -2288 0041; -22AC 0041; -22BD 0041; -22DB 0041; -2301 0041; -231F 0041; -233F 0041; -235D 0041; -237B 0041; -2399 0041; -23B7 0041; -23D5 0041; -2417 0041; -FFE8 0041; -2520 0041; -253E 0041; -255C 0041; -257A 0041; -2598 0041; -25B5 0041; -25D2 0041; -25F0 0041; -260E 0041; -262C 0041; -2652 0041; -2673 0041; -2697 0041; -2708 0041; -2729 0041; -2747 0041; -276D 0041; -27AC 0041; -27D5 0041; -27F7 0041; -2915 0041; -2933 0041; -2951 0041; -296F 0041; -29A3 0041; -29C1 0041; -29DF 0041; -29FF 0041; -2A1E 0041; -2A3C 0041; -2A5A 0041; -2A7B 0041; -2A99 0041; -2AB7 0041; -2AD5 0041; -2AF3 0041; -2B11 0041; -2815 0041; -2833 0041; -2851 0041; -286F 0041; -288D 0041; -28AB 0041; -28C9 0041; -28E7 0041; -268F 0041; -4DD5 0041; -4DF3 0041; -1D311 0041; -1D32F 0041; -1D34D 0041; -A4A4 0041; -A4C2 0041; -10189 0041; -1D01D 0041; -1D03B 0041; -1D059 0041; -1D077 0041; -1D095 0041; -1D0B3 0041; -1D0D1 0041; -1D0EF 0041; -1D117 0041; -1D135 0041; -1D153 0041; -1D193 0041; -1D1B5 0041; -1D1D3 0041; -1D213 0041; -1D231 0041; -31C0 0041; -09F9 0041; -10118 0041; -10144 0041; -1016C 0041; -0010 0041; -008E 0041; -059A 0041; -0611 0041; -0F37 0041; -D800 0041; -FE23 0041; -1D17E 0041; -6FFFF 0041; -E002E 0041; -E004C 0041; -E006A 0041; -E0108 0041; -E0126 0041; -E0144 0041; -E0162 0041; -E0180 0041; -E019E 0041; -E01BC 0041; -E01DA 0041; -1D400 0021; -00AA 003F; -1EB3 0021; -00C5 0021; -0104 0021; -1E01 0021; -0041 0306 0334 0301; -00E2 0334; -00E2 0309 0334; -0041 0308 0334; -0226 0334 0304; -0202 0334; -0332 0041; -030B 0041; -0315 0041; -0324 0041; -0335 0041; -034A 0041; -035A 0041; -0483 0041; -05BB 0041; -FE76 0041; -FC5F 0041; -065B 0041; -0739 0041; -0748 0041; -0A3C 0041; -0C01 0041; -10A39 0041; -0ECD 0041; -17CD 0041; -302F 0041; -20DA 0041; -20E9 0041; -1D4EA 0041; -1D468 0041; -0103 0041; -1EA6 0041; -01DE 0041; -0203 0041; -1D586 0062; -00C0 0062; -01DF 0062; -2100 0062; -00E6 0041; -2101 0021; +2019 0061; +FF3B 0061; +2989 0061; +3009 0061; +3018 0061; +204A 0061; +203F 0061; +070A 0061; +104D 0061; +02CB 0061; +02F7 0061; +A70B 0061; +0BF6 0061; +0FBF 0061; +19F0 0061; +1B78 0061; +FFEB 0061; +21AF 0061; +21CD 0061; +21EB 0061; +2204 0061; +003C 0061; +2215 0061; +2232 0061; +224F 0061; +226C 0061; +228D 0061; +22A8 0061; +22C3 0061; +22E5 0061; +2307 0061; +2325 0061; +2345 0061; +2363 0061; +2381 0061; +239F 0061; +23BD 0061; +23DB 0061; +2411 0061; +2448 0061; +251A 0061; +2538 0061; +2556 0061; +2574 0061; +2592 0061; +25AF 0061; +25CC 0061; +25EA 0061; +2608 0061; +2626 0061; +264C 0061; +266A 0061; +2691 0061; +26B2 0061; +2721 0061; +2740 0061; +2766 0061; +27A5 0061; +27C5 0061; +27E8 0061; +290A 0061; +2928 0061; +2946 0061; +2964 0061; +2982 0061; +29B6 0061; +29D4 0061; +29F2 0061; +2A13 0061; +2A31 0061; +2A4F 0061; +2A6D 0061; +2A8E 0061; +2AAC 0061; +2ACA 0061; +2AE8 0061; +2B06 0061; +2CEA 0061; +281D 0061; +283B 0061; +2859 0061; +2877 0061; +2895 0061; +28B3 0061; +28D1 0061; +28EF 0061; +2637 0061; +4DDD 0061; +4DFB 0061; +1D319 0061; +1D337 0061; +1D355 0061; +A4AC 0061; +1013A 0061; +1D007 0061; +1D025 0061; +1D043 0061; +1D061 0061; +1D07F 0061; +1D09D 0061; +1D0BB 0061; +1D0D9 0061; +1D101 0061; +1D11F 0061; +1D13D 0061; +1D160 0061; +1D19B 0061; +1D1BA 0061; +1D1DB 0061; +1D21B 0061; +1D239 0061; +31C8 0061; +1376 0061; +10121 0061; +1014E 0061; +10176 0061; +1D36D 0061; +001E 0061; +009C 0061; +05A8 0061; +06DF 0061; +1B6F 0061; +D805 0061; +FFFB 0061; +1D185 0061; +9FFFE 0061; +E0033 0061; +E0051 0061; +E006F 0061; +E010D 0061; +E012B 0061; +E0149 0061; +E0167 0061; +E0185 0061; +E01A3 0061; +E01C1 0061; +E01DF 0061; +1D44E 0021; +000C 0041; +02DC 0041; +005F 0041; +301C 0041; +2A74 0041; +FE57 0041; +06D4 0041; +07F7 0041; +FF07 0041; +005B 0041; +2987 0041; +FE3F 0041; +3017 0041; +FF06 0041; +2038 0041; +05F3 0041; +1940 0041; +02C9 0041; +02F5 0041; +A709 0041; +0BF4 0041; +0F3F 0041; +19EE 0041; +1B76 0041; +2192 0041; +21AC 0041; +21CB 0041; +21E9 0041; +1D7C3 0041; +00F7 0041; +2213 0041; +222E 0041; +226D 0041; +226A 0041; +228B 0041; +22A6 0041; +22C1 0041; +22DF 0041; +2305 0041; +2323 0041; +2343 0041; +2361 0041; +237F 0041; +239D 0041; +23BB 0041; +23D9 0041; +240F 0041; +2446 0041; +2518 0041; +2536 0041; +2554 0041; +2572 0041; +2590 0041; +25AD 0041; +25CB 0041; +25E8 0041; +2606 0041; +2624 0041; +264A 0041; +2668 0041; +2689 0041; +26B0 0041; +271F 0041; +273E 0041; +2764 0041; +27A3 0041; +27C3 0041; +27E6 0041; +2908 0041; +2926 0041; +2944 0041; +2962 0041; +2980 0041; +29B4 0041; +29D2 0041; +29F0 0041; +2A11 0041; +2A2F 0041; +2A4D 0041; +2A6B 0041; +2A8C 0041; +2AAA 0041; +2AC8 0041; +2AE6 0041; +2B04 0041; +2CE8 0041; +281B 0041; +2839 0041; +2857 0041; +2875 0041; +2893 0041; +28B1 0041; +28CF 0041; +28ED 0041; +2635 0041; +4DDB 0041; +4DF9 0041; +1D317 0041; +1D335 0041; +1D353 0041; +A4AA 0041; +10138 0041; +1D005 0041; +1D023 0041; +1D041 0041; +1D05F 0041; +1D07D 0041; +1D09B 0041; +1D0B9 0041; +1D0D7 0041; +1D0F5 0041; +1D11D 0041; +1D13B 0041; +1D158 0041; +1D199 0041; +1D1BD 0041; +1D1D9 0041; +1D219 0041; +1D237 0041; +31C6 0041; +1374 0041; +1011F 0041; +1014C 0041; +10174 0041; +1D36B 0041; +001C 0041; +009A 0041; +05A6 0041; +06DD 0041; +1B6D 0041; +D803 0041; +FFF9 0041; +1D181 0041; +8FFFE 0041; +E0031 0041; +E004F 0041; +E006D 0041; +E010B 0041; +E0129 0041; +E0147 0041; +E0165 0041; +E0183 0041; +E01A1 0041; +E01BF 0041; +E01DD 0041; +1D49C 0021; +2090 003F; +1EB2 003F; +212B 003F; +0101 003F; +1E00 003F; +1EAE 0334; +00C2 0334; +0041 0334 0302 0309; +0061 0308 0304 0334; +0105 0334; +1EA1 0334; +0313 0041; +0307 0061; +0317 0061; +0326 0061; +0337 0061; +034C 0061; +035C 0061; +1DC6 0061; +05B4 0061; +FE71 0061; +0651 0061; +0653 0061; +0731 0061; +0740 0061; +07EF 0061; +0982 0061; +0B03 0061; +1B02 0061; +0E4B 0061; +135F 0061; +1939 0061; +20D2 0061; +20E1 0061; +0061 0061; +1D5EE 0041; +1D56C 0041; +1EAE 0061; +1EA9 0061; +0227 0061; +1EA0 0061; +1D68A 0062; +1EB1 0062; +0226 0062; +1D2D 0021; +01FD 0061; +3373 0021; 1D01 0021; 0251 0041; 2000 0062; -FE4B 0062; -1FC0 0062; -055D 0062; -0706 0062; -00BF 0062; -00B7 0062; -10101 0062; -207E 0062; -2984 0062; -2E0D 0062; -3015 0062; -005C 0062; -2037 0062; -055F 0062; -0F0F 0062; -02C6 0062; -02F2 0062; -A706 0062; -0BF8 0062; -0FC3 0062; -19F4 0062; -214A 0062; -21A7 0062; -21C6 0062; -21E4 0062; -2202 0062; -208A 0062; -007E 0062; -222D 0062; -2249 0062; -2271 0062; -2286 0062; -22A2 0062; -22BC 0062; -22DA 0062; -2300 0062; -231E 0062; -233E 0062; -235C 0062; -237A 0062; -2398 0062; -23B6 0062; -23D4 0062; +FE4A 0062; +2017 0062; +FE50 0062; +0703 0062; +2047 0062; +1B5C 0062; +1B5B 0062; +0022 0062; +FE37 0062; +298E 0062; +FE3E 0062; +FD3F 0062; +FE6A 0062; +2042 0062; +180A 0062; +17D9 0062; +02D2 0062; +02FC 0062; +A710 0062; +0CF2 0062; +0FC4 0062; +19F5 0062; +2104 0062; +2194 0062; +21B4 0062; +21D3 0062; +21F0 0062; +1D6FB 0062; +2A75 0062; +221A 0062; +2237 0062; +2254 0062; +2276 0062; +22E2 0062; +22AB 0062; +22C8 0062; +22EE 0062; +230C 0062; +232C 0062; +234A 0062; +2368 0062; +2386 0062; +23A4 0062; +23C2 0062; +23E0 0062; 2416 0062; 2502 0062; 251F 0062; @@ -827,3277 +868,3468 @@ A706 0062; 2651 0062; 2672 0062; 2696 0062; -2707 0062; -2727 0062; -2746 0062; -276C 0062; -27AB 0062; -27D4 0062; -27F6 0062; -2914 0062; -2932 0062; -2950 0062; -296E 0062; -29A2 0062; -29C0 0062; -29DE 0062; -29FE 0062; -2A1D 0062; -2A3B 0062; -2A59 0062; -2A7A 0062; -2A98 0062; -2AB6 0062; -2AD4 0062; -2AF2 0062; -2B10 0062; -2814 0062; -2832 0062; -2850 0062; -286E 0062; -288C 0062; -28AA 0062; -28C8 0062; -28E6 0062; -268E 0062; -4DD4 0062; -4DF2 0062; -1D310 0062; -1D32E 0062; -1D34C 0062; -A4A3 0062; -A4C1 0062; -10188 0062; -1D01C 0062; -1D03A 0062; -1D058 0062; -1D076 0062; -1D094 0062; -1D0B2 0062; -1D0D0 0062; -1D0EE 0062; -1D116 0062; -1D134 0062; -1D152 0062; -1D192 0062; -1D1B4 0062; -1D1D2 0062; -1D212 0062; -1D230 0062; -2FFB 0062; -09F8 0062; -10117 0062; -10141 0062; -1016B 0062; -000F 0062; -008D 0062; -0599 0062; -0610 0062; -0F35 0062; -206F 0062; -FE21 0062; -1D17D 0062; -6FFFE 0062; -E002D 0062; -E004B 0062; -E0069 0062; -E0107 0062; -E0125 0062; -E0143 0062; -E0161 0062; -E017F 0062; -E019D 0062; -E01BB 0062; -E01D9 0062; -FF42 003F; -24D1 003F; -1D671 003F; -1E04 0334; -0309 0062; -032E 0062; -0354 0062; -05B5 0062; -FCF3 0062; -0733 0062; -0953 0062; -0D83 0062; -17C7 0062; -20D4 0062; -1D41B 0061; -FF22 0061; -1D47 0061; -1D553 0062; -1E07 0062; -1D6C 0041; -FF43 003F; -1D624 003F; -1D46A 003F; -00E7 003F; -0043 0307 0334; -1D450 0061; -FF23 0041; -1D672 0041; -3388 003F; -1D436 0062; -33C5 003F; -33C7 0061; -0187 0061; -1D521 0021; -2145 0021; -1D48 0021; -010F 0334; -1E0F 0334; -1D4B9 0061; -216E 0061; -24B9 0061; -1E0E 0061; -1D589 0062; -010E 0062; -3378 003F; -01F2 0061; -1D05 0041; -018A 003F; -FF45 003F; -1D626 003F; -1D5A4 003F; -1EBF 003F; -0116 003F; -0205 003F; -0045 0341 0334; -0065 0302 0334 0300; -0065 0334 0308; -1E1C 0334; -0065 0334 0309; -00CA 0334 0323; -1D556 0061; -1D46C 0061; -1D31 0041; -1EC3 0041; -0118 0041; -1EC7 0041; -0045 0062; -1EC0 0062; -0206 0062; -01DD 003F; -0259 0062; -1D93 003F; -1D08 003F; -0066 003F; -1D68F 003F; -1D5A5 003F; -1D523 0061; -1D405 0061; -1E1F 0041; -1D439 0062; -FB01 0021; -0192 0021; -1D420 003F; -1D676 0021; -011C 0021; -0047 0334 0306; -0047 0334 0304; -1D5F4 0041; -1D572 0041; -0120 0061; -1D690 0062; -0121 0062; -1DA2 0061; -0260 003F; -02E0 0041; -1D5C1 0021; -1D4D7 0021; -021F 0021; -0048 0334 0302; -0048 0334 0323; -1D4BD 0061; -210C 0061; -33CA 003F; -1E2A 0041; -0048 0062; -1E2B 0062; -029C 0062; -02BB 0062; -1D692 0021; -1D540 0021; -00CD 0021; -0130 0021; -0069 0301 0334; -01D0 0334; -0049 0328 0334; -0049 0323 0334; -1D58E 0061; -2111 0061; -1D62 0041; -1E2E 0041; -1ECA 0041; -2111 0062; -0129 0062; -2162 003F; -2163 003F; -1DA6 003F; -0197 0062; -0196 0062; -1D48B 003F; -1D409 003F; -0134 0334; -1D527 0041; -1D4A5 0041; -1D4F3 0062; -01F0 0062; -025F 0061; -1D424 003F; -1D5DE 0021; -01E8 003F; -0137 0334; -1D528 0061; -1D43E 0061; -3384 003F; -1D458 0062; -1D4F 0062; -3391 0041; -339E 0062; -1D0B 0041; -2113 0021; -004C 0021; -1D647 003F; -1E3C 0021; -004C 0334 0323; -006C 0061; -1D591 0041; -1D473 0041; -1E36 0061; -1D4C1 0062; -013A 0062; -01C9 0062; -33D3 0061; -023D 0041; -1DA9 0041; -217F 0021; -24DC 003F; -1D614 003F; -006D 0334 0307; -24A8 0041; -24DC 0041; -1D614 0041; -217F 0062; -1D67C 0062; -33D5 0021; -33AB 0021; -33BD 0021; -0271 0021; -1D45B 003F; -1D67D 0021; -0147 0021; -004E 0301 0334; -006E 0327 0334; -1D427 0061; -FF2E 0061; -207F 0061; -1E47 0061; -1D697 0062; -0146 0062; -339A 0061; -1DB0 0041; -0272 0062; -0235 0061; -1D4F8 0021; -1D476 0021; -2092 0021; -1ED6 0021; -1E4F 0021; -00D8 0334 0341; -020F 0021; -1ECC 0021; -00F4 0334; -00F4 0309 0334; -004F 0334 030B; -00D5 0334 0304; -006F 0304 0334; -020D 0334; -004F 0334 0340 031B; -004F 0334 0323; -1D630 0061; -1D5AE 0061; -00D3 0061; -01D2 0061; -022C 0061; -1E53 0061; -1EDC 0061; -1D4F8 0062; -00F3 0062; -022D 0062; -1EDD 0062; -1D0F 0041; -0186 0061; -1D16 0062; -0277 0041; -1D491 0021; -2119 0021; -1D3E 0021; -1D429 0061; -FF30 0061; -1D56 0061; -1D52D 0062; -1E56 0062; -33DA 0062; -1D7D 0062; -1DB2 0062; -1D632 003F; -1D5B0 003F; -1D4FA 0041; -1D444 0041; -0051 0062; -0138 0062; -1D5CB 003F; -1D4E1 003F; -0156 003F; -0072 0334 030C; -0072 0334 0323; -1D45F 0061; -FF32 0041; -02B3 0041; -1E5B 0041; -1D42B 0062; -02B3 0062; -0280 0061; -1D1A 0062; -027D 0062; -24AE 0021; -0053 0021; -24C8 0021; -015E 0021; -0073 0302 0334; -0053 0334 0327; -0073 0041; -1D69C 0041; -1D61A 0041; -1E60 0041; -1D564 0062; -015C 0062; -00DF 0041; -1DB3 003F; -1D8B 0041; -1D42D 0021; -FF34 0021; -1D57 0021; -1E6F 0021; -1E6C 0334; -1D461 0061; -FF34 0041; -1D57 0041; -1E6F 0041; -1D57F 0062; -2121 003F; -02A7 003F; -01AB 003F; -0236 003F; -1D42E 003F; -1D650 0021; -00D9 003F; -01DA 003F; -1E7A 003F; -1EED 003F; -0055 0341 0334; -0055 030A 0334; -0055 0334 0308 030C; -0168 0334 0341; -0055 030F 0334; -01AF 0334 0340; -1EE4 0334; -1D462 0061; -FF35 0041; -1D58 0041; -00FC 0041; -1E78 0041; -1EE9 0041; -1E76 0041; -1D518 0062; -01DA 0062; -1EED 0062; -1D1D 0062; -1D99 0041; -019C 0061; -01B1 0061; -1D5CF 0021; -1D4E5 0021; -1E7C 0021; -1D42F 0061; -FF36 0061; -24CB 0061; -1D66B 0062; -2175 0061; -33DE 0062; -028C 0061; -1D534 003F; -1D4B2 003F; -1E85 0021; -0175 0334; -24B2 0041; -0057 0041; -24CC 0041; -1E88 0041; -1D61E 0062; -028D 003F; -1D4CD 003F; -1D687 0021; -1E8D 0334; -1D5D1 0061; -1D4E7 0061; -1E8C 0061; -1D47F 0062; -216B 0021; -1D66E 0021; -1D5EC 0021; -0177 003F; -0079 0334 0301; -0079 0303 0334; -0079 0061; -1D66E 0041; -1D5EC 0041; -1E8F 0061; -1D66E 0062; -1EF8 0062; -1D433 0021; -FF3A 0021; -1DBB 0021; -005A 0301 0334; -1E95 0334; -1D59F 0041; -1D4B5 0041; -1E92 0061; -1D4B5 0062; -1D22 0041; -0225 0062; -01B7 003F; -1D23 0061; -021C 0021; -01BB 0061; -0184 0041; -02EE 0061; -1D24 0061; -01C0 0061; -02AC 0061; -1D756 003F; -1F80 0021; -1F8F 0021; -1FB1 0021; -1F00 0340 0334; -03B1 0334 0343 0345; -03B1 0314 0340 0334; -0391 0334 0314 0345 0342; -03B1 0345 0334 0300; -1FB3 003F; -1F08 0041; -1F01 0041; -1F89 0041; -1FB3 0041; -1F88 0062; -1FB9 0062; -1D5D 003F; -1D5D 0041; -1D772 003F; -1D6FE 0041; -213E 0062; -1D759 0021; -1D71F 0041; -1D7AE 0021; -1F1C 0021; -03B5 0313 0334; -03B5 0314 0334 0301; -0395 0340 0334; -1D720 0061; -1F1B 0061; -1D75A 0062; -03DB 0021; -1D6E7 003F; -1D701 0062; -1D6E8 003F; -1F9E 0021; -1F97 0021; -03B7 0343 0334; -03B7 0343 0300 0334 0345; -1FCC 0313 0334; -1F29 0340 0334; -0397 0314 0345 0334; -1FC6 0334; -1D6E8 0061; -1F26 0041; -1F9B 0041; -1FC6 0041; -1F2E 0062; -1FC7 0062; -03F4 003F; -1D717 0061; -1D7A1 0061; -1D6F3 0062; -1D798 0021; -1F33 0021; -0390 0021; -1FBE 0334 0313 0300; -1FBE 0314 0300 0334; -0399 0340 0334; -1FBE 0334 0308 0342; -1D798 0061; -1F33 0061; -0390 0061; -1F32 0062; -03F3 003F; -1D6B1 0021; -1D779 0041; -1D6EB 0062; -1D726 003F; -1D740 0062; -1D6B3 0021; -1D79B 0061; -338D 003F; -03BD 003F; -1D6CE 0041; -03BE 003F; -1D6CF 0041; -03BF 003F; -1F4C 003F; -03BF 0334 0343; -03BF 0334 0314 0301; -1FF8 0334; -1F44 0041; -1FF8 0041; -1FF8 0062; -1D6B7 0021; -1D71B 0041; -1D77F 0062; -03DF 0061; -1D6D2 003F; -03C1 0334 0313; -1D780 0041; -1D746 0062; -1D6D3 0021; -1D6F4 003F; -03A3 0061; -1D6BA 0062; -1D749 003F; -1D6F5 0061; -1D74A 003F; -1F55 003F; -1FE6 003F; -03C5 0343 0340 0334; -1F51 0342 0334; -1FE8 0334; -1FE9 0334; -1F54 0041; -03D3 0041; -1D6D6 0062; -1FEA 0062; -1D719 003F; -1D719 0061; -1D60 0041; -1D6D8 003F; -1D74C 0041; -1D7A6 0062; -1D713 0061; -1D733 0062; -1D6FA 003F; -1FAE 0021; -1FA7 0021; -03C9 0334 0343; -03C9 0313 0345 0300 0334; -2126 0345 0334 0313; -03A9 0334 0314 0340; -1F61 0345 0334; -03C9 0342 0334; -2126 0061; -1FA2 0041; -1F6B 0041; -1FFA 0041; -1F62 0062; -1FF4 0062; -2C80 0021; -2C86 0021; -2C8A 0021; -2C90 0021; -2CE4 0061; -2C98 0041; -2CBC 0041; -2CA0 0041; -2CA6 0041; -2CAC 0041; -2CBE 0041; -2CC2 0041; -03E4 0041; -03E8 0041; -2CCE 0041; -2CD4 0041; -03EC 0041; -2CDC 0041; -2CB4 0041; -2CE2 0041; -04D0 0334; -04D2 0334; -04DB 0021; -04D5 003F; -0433 003F; -0492 0041; -0414 0041; -0502 0041; -0433 0301 0041; -0435 003F; -0450 0041; -0435 0591 0306 0061; -04C2 003F; -04DC 003F; -0496 0041; -04DE 0021; -0455 0041; -045D 003F; -0418 0001 0306 0061; -04E4 003F; -0406 0041; -0407 0041; -0419 0041; -049B 003F; -049F 003F; -1D2B 003F; -0508 0061; -043D 0061; -04C8 003F; -050B 003F; -043E 0334 0308; -04E8 0001 0308 0061; -04EB 0062; -0480 0041; -0421 0041; -0422 0041; -040B 0041; -043A 0301 0041; -0423 0304 0334; -0443 0334 0306; -0443 0334 0308; -0443 0334 030B; -04AE 0062; -0424 0062; -04BA 0062; -047C 0062; -04B4 0062; -04F5 0061; -04CB 0041; -04BE 0041; -0429 0041; -04F8 0021; -044C 0041; -044D 0041; -04EC 0061; -0464 003F; -0468 003F; -0470 003F; -0477 0021; -04A9 003F; -2C01 0061; -2C04 0061; -2C07 0061; -2C0A 0061; -2C0D 0061; -2C10 0061; -2C13 0061; -2C16 0061; -2C19 0061; -2C1C 0061; -2C1F 0061; -2C22 0061; -2C25 0061; -2C28 0061; -2C2B 0061; -2C2E 0061; -10A1 0061; -10A3 0061; -10A5 0061; -10C1 0061; -10A8 0061; -10AA 0061; -2D0C 003F; -2D0D 003F; -2D0F 003F; -2D11 003F; -2D23 003F; -2D14 003F; -2D16 003F; -2D18 003F; -2D1A 003F; -2D1C 003F; -2D1E 003F; -2D1F 003F; -2D25 003F; -10FA 003F; -0533 0061; -0566 003F; -0569 003F; -056C 003F; -056F 003F; -0572 003F; -FB14 003F; -0576 003F; -0579 003F; -057C 003F; -FB16 003F; -0551 0061; -0554 0061; -05D0 003F; -FB30 0061; -2136 0041; -2138 003F; -05D4 0041; -05F0 003F; -05D8 05BC 0334; -FB39 0062; -FB3B 003F; -FB3C 0021; -05DE 0062; -05E1 0041; -FB43 0021; -05E5 0061; -05E8 0041; -FB2A 003F; -05EA 05BC 0334; -0674 0062; -0623 003F; -FB51 0021; -FE86 0061; -FE88 0062; -FE8C 0061; -FC97 0062; -FCDF 003F; -FC9B 0062; -FBF3 0062; -FBF9 003F; -FBF7 003F; -FD3D 0061; -066E 0062; -FC9C 0061; -FC07 0062; -FC08 0061; -FC09 0062; -FB52 0041; -FB56 0062; -0750 0062; -0756 0062; -FE98 0061; -FDA0 0062; -FD53 0062; -FC70 0062; -FD55 0062; -FCA5 0061; -FE9C 0021; -FC76 0062; -FC79 0062; -FB69 0021; -FB5E 003F; -FB65 0021; -FE9D 003F; -FDA6 0062; -FD58 0062; -FD02 0062; -FB75 0021; -FB7A 003F; -FB7E 003F; -FEA4 0061; -FCAA 0061; -FD1C 0061; -FEA5 0062; -FD1F 0061; -0685 0062; -FEAB 0021; -FB88 0062; -FB84 0062; -FB86 0062; -FEAD 0021; -FEAF 0021; -0692 0062; -FB8A 0021; -076B 0062; -FEB1 0062; -FC1D 0021; -FC1E 0062; -FCE7 0041; -FD62 0062; -FCFC 0062; -FD25 0021; -FD2E 0041; -FD27 0021; -FD28 0021; -FD6D 0061; -FD1A 0061; -075C 0062; -FEB9 0062; -FCB2 0062; -FDF0 0062; -FD05 0062; -FEBD 0041; -FD6E 0062; -FD2C 0061; -FD24 0061; -FEC1 003F; -FC27 0021; -FD74 0062; -FEC5 003F; -FC28 0062; -FEC9 0062; -FCBB 0061; -FD13 0061; -FED0 0061; -FC2C 0062; -FD16 0061; -075F 0062; -FCBE 0061; -FD7D 0061; -FC31 0062; -FB6D 0021; -FB71 0021; -0761 0062; -FED5 0062; -FDB4 0061; -FC7F 0061; -FEDC 0061; -FC38 0062; -FCC7 0041; -FC3C 0062; -FC84 0061; -FB8E 0062; -FBD6 0061; -FB95 0061; -FB9D 0061; -FB99 0061; -0764 0062; -FEF6 0061; -FEFC 0061; -FDBA 0061; -FD80 0062; -FD85 0062; -FD87 0062; -FC44 0062; -FEE4 0021; -FC88 0062; -FDC0 0062; -FD8B 0062; -FC48 0021; -0765 0062; -FEE5 0062; -FD97 0062; -FD96 0062; -FC8C 0021; -FC8D 0062; -FC50 0062; -FBA3 0061; -0767 0062; -FEEA 0041; -FC52 0062; -FBAA 003F; -06C2 003F; -06D5 003F; -0648 0061; -FBE1 0021; -FBD8 0021; -06C8 0041; -FBDF 0021; -FC5D 0021; -FEF4 003F; -FCDA 003F; -FCDC 003F; -FCF0 0041; -FCDE 003F; -06CC 003F; -06CE 003F; -06D1 003F; -FBB0 0041; -0714 0061; -0718 0041; -071D 0041; -0722 0041; -074F 0041; -0780 0041; -079C 0041; -07A3 0041; -079B 0041; -078E 0041; -079F 0041; -0796 0041; -07A9 0041; -07AF 0041; -2D34 0041; -2D3A 0041; -2D40 0041; -2D46 0041; -2D4C 0041; -2D52 0041; -2D58 0041; -2D5E 0041; -2D63 0041; -1203 0041; -1209 0041; -120F 0041; -1214 0041; -121A 0041; -1380 0041; -1221 0041; -1227 0041; -122D 0041; -1232 0041; -2D83 0041; -123D 0041; -1242 0041; -1248 0041; -1251 0041; -1258 0041; -1261 0041; -1267 0041; -1268 0041; -126E 0041; -1274 0041; -1279 0041; -127F 0041; -1284 0041; -128B 0041; -1293 0041; -1298 0041; -129E 0041; -12A3 0041; -12A8 0041; -12AE 0041; -12B5 0041; -12BD 0041; -12C5 0041; -12CD 0041; -12D3 0041; -12DA 0041; -2D8B 0041; -12E5 0041; -12EB 0041; -12F1 0041; -12F7 0041; -12FC 0041; -1301 0041; -1307 0041; -130C 0041; -1313 0041; -131B 0041; -2D94 0041; -1323 0041; -1328 0041; -132E 0041; -1333 0041; -1338 0041; -133E 0041; -1344 0041; -134A 0041; -1388 0041; -1352 0041; -138C 0041; -1359 0041; -2DA4 0041; -2DAB 0041; -2DB2 0041; -2DB9 0041; -2DC0 0041; -2DC6 0041; -2DCD 0041; -2DD4 0041; -2DDB 0041; -0905 0041; -090B 0041; -090F 0041; -0915 093C 0334; -0917 0061; -095B 0334; -0921 003F; -0924 0021; -0929 0041; -092D 0062; -0930 0062; -0937 0021; -093F 0021; -0962 0021; -0949 0021; -0985 0041; -098B 0041; -0993 0041; -0999 0041; -099F 0041; -09DD 0041; -09A7 0061; -09AE 0061; -09B2 0062; -09BD 0062; -09C3 0062; -09C8 0041; -09D7 003F; -0A05 003F; -0A08 003F; -0A15 0041; -0A18 0061; -0A5B 0062; -0A22 0062; -0A28 0062; -0A2E 003F; -0A35 0041; -0A42 0041; -0AD0 003F; -0A8A 003F; -0A8F 003F; -0A96 003F; -0A9C 003F; -0AA2 003F; -0AA8 003F; -0AAF 003F; -0AB7 003F; -0AC0 003F; -0AE3 003F; -0ACC 003F; -0B08 0062; -0B61 0062; -0B16 0062; -0B1C 0062; -0B5C 0061; -0B25 0041; -0B2C 0041; -0B32 0041; -0B38 0041; -0B41 0041; -0B47 0B56 0061; -0B4D 0061; -0B87 0061; -0B90 0061; -0B95 0062; -0BA3 0062; -0BAF 0062; -0BB5 0062; -0BBF 0062; -0BC7 0041; -0BC6 0BD7 0021; -0C06 0041; -0C60 0041; -0C12 0041; -0C18 0041; -0C1E 0041; -0C24 0041; -0C2B 0041; -0C31 0041; -0C38 0041; -0C42 0041; -0C46 0591 0C56 0061; -0C55 0021; -0C88 003F; -0CE1 003F; -0C94 003F; -0C9A 003F; -0CA0 003F; -0CA6 003F; -0CAD 003F; -0CB5 003F; -0CDE 003F; -0CBF 0CD5 0062; -0CC6 0001 0CC2 0CD5 0061; -0CCA 0021; -0CCC 0021; -0D06 0041; -0D60 0041; -0D12 0041; -0D18 0041; -0D1E 0041; -0D24 0041; -0D2B 0041; -0D31 0041; -0D37 0041; -0D41 0041; -0D47 1D165 0D3E 0061; -0D46 0D57 0061; -0D87 0061; -0D8D 0061; -0D93 0061; -0D9C 0061; -0DA2 0061; -0DA8 0061; -0DAE 0061; -0DB5 0061; -0DBB 0061; -0DC4 0061; -0DD1 0021; -0DD9 0021; -0DDB 0021; -0DDC 0591 0DCA 0061; -0DF3 0021; -A805 0021; -A80A 0041; -A811 0041; -A817 0041; -A81D 0041; -A823 0041; -10A01 0041; -10A10 0041; -10A17 0041; -10A1E 0041; -10A24 0041; -10A2A 0041; -10A30 0041; -0E40 0E01 003F; -0E40 0E02 003F; -0E40 0E03 003F; -0E40 0E04 003F; -0E40 0E05 003F; -0E40 0E06 003F; -0E40 0E07 003F; -0E40 0E08 003F; -0E40 0E09 003F; -0E40 0E0A 003F; -0E40 0E0B 003F; -0E40 0E0C 003F; -0E40 0E0D 003F; -0E40 0E0E 003F; -0E40 0E0F 003F; -0E40 0E10 003F; -0E40 0E11 003F; -0E40 0E12 003F; -0E40 0E13 003F; -0E40 0E14 003F; -0E40 0E15 003F; -0E40 0E16 003F; -0E40 0E17 003F; -0E40 0E18 003F; -0E40 0E19 003F; -0E40 0E1A 003F; -0E40 0E1B 003F; -0E40 0E1C 003F; -0E40 0E1D 003F; -0E40 0E1E 003F; -0E40 0E1F 003F; -0E40 0E20 003F; -0E40 0E21 003F; -0E40 0E22 003F; -0E40 0E23 003F; -0E40 0E24 003F; -0E40 0E25 003F; -0E40 0E26 003F; -0E40 0E27 003F; -0E40 0E28 003F; -0E40 0E29 003F; -0E40 0E2A 003F; -0E40 0E2B 003F; -0E40 0E2C 003F; -0E40 0E2D 003F; -0E40 0E2E 003F; -0E30 003F; -0E34 0041; -0E39 0062; -0E40 1D165 0E06 0061; -0E40 1D165 0E10 0061; -0E40 1D165 0E1A 0061; -0E40 1D165 0E24 0061; -0E40 1D165 0E2E 0061; -0E41 0001 0E09 0061; -0E41 0001 0E13 0061; -0E41 0001 0E1D 0061; -0E41 0001 0E27 0061; -0E42 0591 0E01 0061; -0E42 0591 0E0B 0061; -0E42 0591 0E15 0061; -0E42 0591 0E1F 0061; -0E42 0591 0E29 0061; -0E43 1D165 0E03 0061; -0E43 1D165 0E0D 0061; -0E43 1D165 0E17 0061; -0E43 1D165 0E21 0061; -0E43 1D165 0E2B 0061; -0E44 0001 0E06 0061; -0E44 0001 0E10 0061; -0E44 0001 0E1A 0061; -0E44 0001 0E24 0061; -0E44 0001 0E2E 0061; -0EC3 0E81 0061; -0EC3 0E82 0061; -0EC3 0E84 0061; -0EC3 0E87 0061; -0EC3 0E88 0061; -0EC3 0E8A 0061; -0EC3 0E8D 0061; -0EC3 0E94 0061; -0EC3 0E95 0061; -0EC3 0E96 0061; -0EC3 0E97 0061; -0EC3 0E99 0061; -0EC3 0E9A 0061; -0EC3 0E9B 0061; -0EC3 0E9C 0061; -0EC3 0E9D 0061; -0EC3 0E9E 0061; -0EC3 0E9F 0061; -0EC3 0EA1 0061; -0EC3 0EA2 0061; -0EC3 0EA3 0061; -0EC3 0EA5 0061; -0EC3 0EA7 0061; -0EC3 0EAA 0061; -0EC2 0EDC 0061; -0EC2 0EDD 0061; -0EC3 0EAB 0061; -0EC3 0EAD 0061; -0EC3 0EAE 0061; -0EB2 0062; -0EB7 0062; -0EC0 0021; -0EC0 0591 0E95 0061; -0EC0 0591 0EA1 0061; -0EC0 0591 0EAE 0061; -0EC1 1D165 0E94 0061; -0EC1 1D165 0E9F 0061; -0EC1 1D165 0EAD 0061; -0EC2 0001 0E94 0061; -0EC2 0001 0E9F 0061; -0EC2 0001 0EAD 0061; -0EC3 0591 0E8D 0061; -0EC3 0591 0E9E 0061; -0EC3 0591 0EDD 0061; -0EC4 1D165 0E8A 0061; -0EC4 1D165 0E9D 0061; -0EC4 1D165 0EDC 0061; -0F41 0021; -0F44 0021; -0F47 0021; -0F4B 0021; -0F4E 0021; -0F51 0021; -0F54 0021; -0FA6 0021; -0F5A 0021; -0F5D 0021; -0FAF 0021; -0F62 0021; -0FB2 0001 0F71 0F80 0061; -0FB4 003F; -0FB7 003F; -0F8A 003F; -0334 0F72 0F71; -0F81 0061; -0F76 003F; -0FB2 0F81 0041; -0FB3 0F71 1D165 0F80 0061; -0F7C 0062; -1903 0021; -1909 0021; -190F 0021; -1915 0021; -191B 0021; -1924 0021; -192A 0021; -1934 0021; -1701 0021; -1707 0021; -170E 0021; -1714 0021; -1724 0041; -172A 0041; -1730 0041; -1741 003F; -1747 003F; -174D 003F; -1753 003F; -1765 003F; -176B 003F; -1773 003F; -1A05 003F; -1A0B 003F; -1A11 003F; -1A17 003F; -1000 0061; -1006 0061; -100C 0061; -1012 0061; -1018 0061; -1050 0061; -1023 0061; -1027 0062; -1055 0062; -1031 0062; -1039 0061; -1785 0061; -178B 0061; -1791 0061; -1797 0061; -179D 0061; -17DC 0061; -17A8 0061; -17AE 0061; -17B4 0061; -17BA 0061; -17C0 0061; -0334 17D2; -1955 0021; -195B 0021; -1961 0021; -1967 0021; -196D 0021; -1980 0021; -1986 0021; -198C 0021; -1992 0021; -1998 0021; -19DF 0021; -19A2 0021; -19A8 0021; -19B4 0021; -19BA 0021; -19C0 0021; -19C6 0021; -1882 0021; -1820 0021; -1845 0021; -1846 0021; -1826 0021; -184A 0021; -182B 0021; -184E 0021; -182F 0021; -18A2 0021; -1833 0021; -185C 0021; -1836 0021; -1856 0021; -1863 0021; -186E 0021; -1859 0021; -185A 0021; -188E 0021; -1891 0021; -18A3 0021; -18A7 0021; -13A3 0041; -13A9 0041; -13AF 0041; -13B5 0041; -13BB 0041; -13C1 0041; -13C7 0041; -13CD 0041; -13D3 0041; -13D9 0041; -13DF 0041; -13E5 0041; -13EB 0041; -13F1 0041; -1403 0041; -1409 0041; -140F 0041; -1415 0041; -141B 0041; -1421 0041; -1427 0041; -142D 0041; -1433 0041; -1439 0041; -143F 0041; -1445 0041; -144B 0041; -1451 0041; -1457 0041; -145D 0041; -1463 0041; -1469 0041; -146F 0041; -1475 0041; -147B 0041; -1481 0041; -1487 0041; -148D 0041; -1493 0041; -1499 0041; -149F 0041; -14A5 0041; -14AB 0041; -14B1 0041; -14B7 0041; -14BD 0041; -14C3 0041; -14C9 0041; -14CF 0041; -14D5 0041; -14DB 0041; -14E1 0041; -14E7 0041; -14ED 0041; -14F3 0041; -14F9 0041; -14FF 0041; -1505 0041; -150B 0041; -1511 0041; -1517 0041; -151D 0041; -1523 0041; -1529 0041; -152F 0041; -1535 0041; -153B 0041; -1541 0041; -1547 0041; -154D 0041; -1553 0041; -1559 0041; -155F 0041; -1565 0041; -156B 0041; -1571 0041; -1577 0041; -166F 0041; -1583 0041; -1589 0041; -158E 0041; -1594 0041; -1675 0041; -159A 0041; -15A0 0041; -15A6 0041; -15AB 0041; -15B1 0041; -15B7 0041; -15BD 0041; -15C3 0041; -15C9 0041; -15CF 0041; -15D5 0041; -15DB 0041; -15E1 0041; -15E7 0041; -15ED 0041; -15F3 0041; -15F9 0041; -15FF 0041; -1605 0041; -160B 0041; -1611 0041; -1617 0041; -161D 0041; -1623 0041; -1629 0041; -162F 0041; -1635 0041; -163B 0041; -1641 0041; -1647 0041; -164D 0041; -1653 0041; -1659 0041; -165F 0041; -1665 0041; -166B 0041; -1685 0041; -168B 0041; -1691 0041; -1697 0041; -16A4 003F; -16A9 003F; -16B0 0041; -16B5 0062; -16BC 0041; -16C1 0062; -16C7 0041; -16CA 0041; -16D0 0062; -16D8 0061; -16DC 0062; -16E0 0041; -16E5 0041; -3131 0061; -326E 0041; -AC02 0062; -1101 0061; -3201 0062; -3262 0061; -FFA8 0041; -3211 003F; -3204 0062; -3265 0061; -FFB3 0041; -3214 003F; -3267 0021; -321D 003F; -3268 0061; -110D 003F; -3269 0061; -326A 0021; -1110 003F; -3279 0061; -321A 003F; -320D 0062; -D788 1161 0021; -D7A0 0062; -3165 0062; -1119 0062; -316E 0062; -1120 0061; -3174 0062; -1127 0061; -112B 0061; -112E 0061; -1132 0061; -317E 0062; -113C 0062; -1141 0062; -1147 0061; -114C 0061; -1151 0062; -1157 0061; -115F 0062; -FFC2 0062; -FFC4 0062; -FFC6 0062; -FFCA 0062; -FFCC 0062; -FFCE 0062; -FFD2 0062; -FFD4 0062; -FFD6 0062; -FFDA 0062; -FFDC 0062; -117B 0062; -1181 0062; -3188 0062; -118A 0062; -1190 0062; -1194 0061; -1199 0062; -318D 0062; -11A8 0062; -FFA5 0021; -11AE 0062; -313B 0041; -313D 0041; -313F 0041; -11BA 0062; -11C0 0062; -11C6 0062; -11CA 0062; -316A 0062; -316B 0062; -11D8 0062; -11DD 0061; -11E1 0062; -11E7 0062; -11ED 0062; -11F2 0061; -11F7 0062; -3041 0061; -3301 0062; -FF72 0061; -30A6 003F; -3094 0041; -32D3 003F; -3307 0041; -30AA 0041; -304B 3099 0334; -32D5 0062; -30AD 0021; -FF77 0062; -3315 003F; -3050 0021; -3319 0021; -30B1 0334 3099; -30F6 0062; -3053 0041; -30B5 003F; -32DA 0062; -3058 003F; -3321 003F; -FF7D 0061; -305C 003F; -3323 0062; -30BE 0041; -305F 0061; -30C1 3099 0334; -FF6F 0021; -32E1 0061; -3067 003F; -30C8 0021; -3068 0062; -FF85 0041; -FF86 0062; -30CD 003F; -FF89 0041; -3071 0334; -31F5 0041; -3072 003F; -3072 0041; -332E 0062; -30D5 3099 0334; -3077 0061; -3335 0061; -307A 003F; -30DA 0041; -333A 0021; -30DC 003F; -307D 0041; -3340 0041; -3344 0041; -307F 0061; -31FA 003F; -334D 0021; -30E2 003F; -32F3 003F; -FF94 0062; -3085 0062; -30E7 0061; -32F6 0021; -31FC 0041; -32F8 0021; -31FE 003F; -3356 0041; -308F 003F; -30EE 0062; -30F0 0062; -FF66 0021; -3093 0061; -3107 003F; -310B 003F; -312B 003F; -3111 003F; -3116 003F; -31A9 0061; -31A4 003F; -31AF 0061; -3125 003F; -3127 0061; -A000 003F; -A006 003F; -A00C 003F; -A012 003F; -A018 003F; -A01E 003F; -A024 003F; -A02A 003F; -A030 003F; -A036 003F; -A03C 003F; -A042 003F; -A048 003F; -A04E 003F; -A054 003F; -A05A 003F; -A060 003F; -A066 003F; -A06C 003F; -A072 003F; -A078 003F; -A07E 003F; -A084 003F; -A08A 003F; -A090 003F; -A096 003F; -A09C 003F; -A0A2 003F; -A0A8 003F; -A0AE 003F; -A0B4 003F; -A0BA 003F; -A0C0 003F; -A0C6 003F; -A0CC 003F; -A0D2 003F; -A0D8 003F; -A0DE 003F; -A0E4 003F; -A0EA 003F; -A0F0 003F; -A0F6 003F; -A0FC 003F; -A102 003F; -A108 003F; -A10E 003F; -A114 003F; -A11A 003F; -A120 003F; -A126 003F; -A12C 003F; -A132 003F; -A138 003F; -A13E 003F; -A144 003F; -A14A 003F; -A150 003F; -A156 003F; -A15C 003F; -A162 003F; -A168 003F; -A16E 003F; -A174 003F; -A17A 003F; -A180 003F; -A186 003F; -A18C 003F; -A192 003F; -A198 003F; -A19E 003F; -A1A4 003F; -A1AA 003F; -A1B0 003F; -A1B6 003F; -A1BC 003F; -A1C2 003F; -A1C8 003F; -A1CE 003F; -A1D4 003F; -A1DA 003F; -A1E0 003F; -A1E6 003F; -A1EC 003F; -A1F2 003F; -A1F8 003F; -A1FE 003F; -A204 003F; -A20A 003F; -A210 003F; -A216 003F; -A21C 003F; -A222 003F; -A228 003F; -A22E 003F; -A234 003F; -A23A 003F; -A240 003F; -A246 003F; -A24C 003F; -A252 003F; -A258 003F; -A25E 003F; -A264 003F; -A26A 003F; -A270 003F; -A276 003F; -A27C 003F; -A282 003F; -A288 003F; -A28E 003F; -A294 003F; -A29A 003F; -A2A0 003F; -A2A6 003F; -A2AC 003F; -A2B2 003F; -A2B8 003F; -A2BE 003F; -A2C4 003F; -A2CA 003F; -A2D0 003F; -A2D6 003F; -A2DC 003F; -A2E2 003F; -A2E8 003F; -A2EE 003F; -A2F4 003F; -A2FA 003F; -A300 003F; -A306 003F; -A30C 003F; -A312 003F; -A318 003F; -A31E 003F; -A324 003F; -A32A 003F; -A330 003F; -A336 003F; -A33C 003F; -A342 003F; -A348 003F; -A34E 003F; -A354 003F; -A35A 003F; -A360 003F; -A366 003F; -A36C 003F; -A372 003F; -A378 003F; -A37E 003F; -A384 003F; -A38A 003F; -A390 003F; -A396 003F; -A39C 003F; -A3A2 003F; -A3A8 003F; -A3AE 003F; -A3B4 003F; -A3BA 003F; -A3C0 003F; -A3C6 003F; -A3CC 003F; -A3D2 003F; -A3D8 003F; -A3DE 003F; -A3E4 003F; -A3EA 003F; -A3F0 003F; -A3F6 003F; -A3FC 003F; -A402 003F; -A408 003F; -A40E 003F; -A414 003F; -A41A 003F; -A420 003F; -A426 003F; -A42C 003F; -A432 003F; -A438 003F; -A43E 003F; -A444 003F; -A44A 003F; -A450 003F; -A456 003F; -A45C 003F; -A462 003F; -A468 003F; -A46E 003F; -A474 003F; -A47A 003F; -A480 003F; -A486 003F; -A48C 003F; -10305 003F; -1030B 003F; -10311 003F; -10317 003F; -1031D 003F; -10334 003F; -1033A 003F; -10340 003F; -10346 003F; -10400 0061; -10403 0061; -10406 0061; -10409 0061; -1040C 0061; -1040F 0061; -10412 0061; -10415 0061; -10418 0061; -1041B 0061; -1041E 0061; -10421 0061; -10424 0061; -10427 0061; -10455 003F; -1045B 003F; -10461 003F; -10467 003F; -1046D 003F; -10473 003F; -10479 003F; -1047F 003F; -10485 003F; -1048B 003F; -10491 003F; -10497 003F; -1049D 003F; -10005 003F; -1000B 003F; -10012 003F; -10018 003F; -1001E 003F; -10024 003F; -1002B 003F; -10031 003F; -10037 003F; -1003F 003F; -10045 003F; -1004B 003F; -10053 003F; -10059 003F; -10081 003F; -10087 003F; -1008D 003F; -10093 003F; -10099 003F; -1009F 003F; -100A5 003F; -100AB 003F; -100B1 003F; -100B7 003F; -100BD 003F; -100C3 003F; -100C9 003F; -100CF 003F; -100D5 003F; -100DB 003F; -100E1 003F; -100E7 003F; -100ED 003F; -100F3 003F; -100F9 003F; -10804 003F; -1080D 003F; -10813 003F; -10819 003F; -1081F 003F; -10825 003F; -1082B 003F; -10831 003F; -10838 003F; -10383 003F; -10389 003F; -1038F 003F; -10395 003F; -1039B 003F; -103A3 003F; -103A9 003F; -103AF 003F; -103B5 003F; -103BB 003F; -103C1 003F; -103CB 003F; -3280 0021; -4E02 003F; -3222 003F; -3198 0061; -32A5 003F; -F95E 003F; -2E84 0041; -2F05 003F; -3224 003F; -2E85 003F; -32AD 0061; -F9B5 003F; -F9D4 003F; -FA31 0041; -FA32 0041; -F978 003F; -3285 0041; -2F8D2 003F; -2F0E 003F; -F955 003F; -2F10 0061; -FA00 0041; -2F822 003F; -2F992 003F; -FA33 0041; -2F13 003F; -2F82B 0021; -3229 003F; -2F82C 003F; -2F18 003F; -F91C 003F; -2E81 0061; -2F1D 003F; -3234 003F; -2F83E 003F; -2F841 003F; -2F845 0041; -2F848 003F; -FA37 0041; -3223 0061; -322F 0061; -2F854 003F; -F96C 003F; -2F20 003F; -2F22 003F; -337D 003F; -2F85F 003F; -2F863 003F; -FA81 003F; -2F27 003F; -F95F 0061; -2F873 003F; -2F2A 0061; -2F877 003F; -2F2C 0041; -F921 003F; -2F2E 003F; -2E92 003F; -2F32 003F; -FA01 003F; -F928 0041; -2F890 003F; -2F894 0041; -2F899 003F; -F966 003F; -2F89E 003F; -2F8A3 0021; -F9D9 003F; -FA8A 003F; -F98F 003F; -FA40 0061; -2F8B2 003F; -2E98 003F; -2F8B6 003F; -F9A4 003F; -2F8BD 003F; -2F8C4 003F; -2E99 003F; -2F42 003F; -2F46 003F; -2F47 0041; -FA91 0021; -FA06 003F; -322A 003F; -FA92 0021; -322D 003F; -2F8DB 003F; -F9DA 003F; -F97A 003F; -2F8E8 003F; -F94C 003F; -2F8EF 003F; -FA95 003F; -FA96 0021; -2F50 003F; -322C 0061; -F972 003F; -2F8FF 003F; -F9CA 0061; -2F904 003F; -FA46 003F; -2F90B 0021; -FA47 0041; -2F915 003F; -322B 0061; -F9FB 003F; -FA9C 0021; -F91E 003F; -2F921 0021; -2F922 003F; -3295 0061; -F9FA 003F; -2F5E 003F; -2F92B 003F; -2F92E 003F; -F994 003F; -2F62 003F; -329A 003F; -F962 0041; -FAA4 003F; -2F6A 003F; -32AC 0061; -F96D 003F; -FAA9 0041; -2F94E 003F; -2F950 0021; -2EAD 003F; -FA4D 003F; -3297 0041; -FA53 003F; -F995 003F; -2F95A 003F; -2F74 0061; -FA56 0041; -FAAE 003F; -F97B 003F; -F96A 003F; -2F96E 003F; -F950 003F; -2F79 003F; -FA5A 003F; -2EB7 0041; -2F979 003F; -2F97A 0041; -F997 003F; -2F81 003F; -2F985 003F; -FA5C 003F; -2F893 0041; -F97C 003F; -2EBF 0061; -2F994 003F; -2F99C 003F; -2F99D 003F; -FAB4 003F; -F999 003F; -F923 003F; -2F8C 003F; -2F9B6 003F; -2F9BC 003F; -2F9C0 003F; -2F9C3 003F; -2F9C6 003F; -FAB6 003F; -FA0A 003F; -2EC6 0061; -FAB9 003F; -FABA 0021; -FABF 0021; -2EC8 003F; -2F98 003F; -F948 003F; -FA65 0041; -2F9C 003F; -2F9D 003F; -2F9DF 0021; -2F98D 003F; -2ECC 0041; -FAC3 003F; -F92C 003F; -F919 003F; -F97E 003F; -2F9E7 003F; -F99B 003F; -2ED2 003F; -2ED4 003F; -FA09 003F; -2FAA 003F; -FA68 0041; -F938 003F; -2FAE 003F; -2ED9 003F; -32A0 003F; -FACC 0021; -2FB6 003F; -2FA02 003F; -2FB8 003F; -F91A 003F; -2FBC 003F; -2FC0 003F; -F9F2 003F; -F93A 003F; -2FC5 0061; -2FC7 0061; -2FA17 003F; -2FCD 003F; -2FD0 0061; -2EED 0061; -2EF0 003F; -FACE 0062; -9FA3 003F; -FA13 003F; -FA27 003F; -3403 003F; -3409 003F; -340F 003F; -3415 003F; -341B 003F; -3421 003F; -3427 003F; -342D 003F; -3433 003F; -3439 003F; -343F 003F; -3445 003F; -344B 003F; -3451 003F; -3457 003F; -345D 003F; -3463 003F; -3469 003F; -346F 003F; -3475 003F; -347B 003F; -3481 003F; -3487 003F; -348D 003F; -3493 003F; -3499 003F; -349E 0041; -34A4 003F; -34AA 003F; -34B0 003F; -34B6 003F; -2F9CA 0021; -34C0 003F; -34C6 003F; -34CC 003F; -34D2 003F; -34D8 003F; -34DE 003F; -34E3 003F; -34E9 003F; -34EF 003F; -34F5 003F; -34FB 003F; -3501 003F; -3507 003F; -350D 003F; -3513 003F; -3518 003F; -351E 003F; -3524 003F; -352A 003F; -3530 003F; -3536 003F; -353C 003F; -3542 003F; -3548 003F; -354E 003F; -3554 003F; -355A 003F; -3560 003F; -3566 003F; -356C 003F; -3572 003F; -3578 003F; -357E 003F; -3584 003F; -358A 003F; -3590 003F; -3596 003F; -359C 003F; -35A2 003F; -35A8 003F; -35AE 003F; -35B4 003F; -35BA 003F; -35C0 003F; -35C6 003F; -35CC 003F; -35D2 003F; -35D8 003F; -35DE 003F; -35E4 003F; -35EA 003F; -35F0 003F; -35F6 003F; -35FC 003F; -3602 003F; -3608 003F; -360E 003F; -3614 003F; -361A 003F; -3620 003F; -3626 003F; -362C 003F; -3632 003F; -3638 003F; -363E 003F; -3644 003F; -364A 003F; -3650 003F; -3656 003F; -365C 003F; -3662 003F; -3668 003F; -366E 003F; -3674 003F; -367A 003F; -3680 003F; -3686 003F; -368C 003F; -3692 003F; -3698 003F; -369E 003F; -36A4 003F; -36AA 003F; -36B0 003F; -36B6 003F; -36BC 003F; -36C2 003F; -36C8 003F; -36CE 003F; -36D4 003F; -36DA 003F; -36E0 003F; -36E6 003F; -36EC 003F; -36F1 003F; -36F7 003F; -36FC 0041; -3702 003F; -3708 003F; -370E 003F; -3714 003F; -371A 003F; -3720 003F; -3726 003F; -372C 003F; -3732 003F; -3738 003F; -373E 003F; -3744 003F; -374A 003F; -3750 003F; -3756 003F; -375C 003F; -3762 003F; -3768 003F; -376E 003F; -3774 003F; -377A 003F; -3780 003F; -3785 003F; -378B 003F; -3791 003F; -3797 003F; -379D 003F; -37A3 003F; -37A9 003F; -37AF 003F; -37B5 003F; -37BB 003F; -37C1 003F; -37C7 003F; -37CD 003F; -37D3 003F; -37D9 003F; -37DF 003F; -37E5 003F; -37EB 003F; -37F1 003F; -37F7 003F; -37FD 003F; -3803 003F; -3809 003F; -380F 003F; -3815 003F; -381B 003F; -3821 003F; -3827 003F; -382D 003F; -3832 003F; -3838 003F; -383E 003F; -3844 003F; -384A 003F; -3850 003F; -3856 003F; -385C 003F; -2F888 0021; -3867 003F; -386D 003F; -3873 003F; -3879 003F; -387E 003F; -3884 003F; -388A 003F; -3890 003F; -3896 003F; -389C 003F; -38A2 003F; -38A8 003F; -38AE 003F; -38B4 003F; -38BA 003F; -38C0 003F; -38C6 003F; -38CB 003F; -38D1 003F; -38D7 003F; -38DD 003F; -2F89B 0021; -38E8 003F; -38EE 003F; -38F4 003F; -38FA 003F; -3900 003F; -3906 003F; -390C 003F; -3912 003F; -3918 003F; -391D 003F; -3923 003F; -3929 003F; -392F 003F; -3935 003F; -393A 0041; -3940 003F; -3946 003F; -394C 003F; -3952 003F; -3958 003F; -395E 003F; -3964 003F; -396A 003F; -3970 003F; -3976 003F; -397C 003F; -3982 003F; -3988 003F; -398E 003F; -3994 003F; -399A 003F; -39A0 003F; -39A6 003F; -39AC 003F; -39B2 003F; -39B8 003F; -39BE 003F; -39C4 003F; -39CA 003F; -39D0 003F; -39D6 003F; -39DC 003F; -39E2 003F; -39E8 003F; -39EE 003F; -39F4 003F; -39FA 003F; -3A00 003F; -3A06 003F; -3A0C 003F; -3A12 003F; -3A18 003F; -3A1E 003F; -3A24 003F; -3A2A 003F; -3A2F 003F; -3A35 003F; -3A3B 003F; -3A41 003F; -3A47 003F; -3A4D 003F; -3A53 003F; -3A59 003F; -3A5F 003F; -3A65 003F; -3A6B 003F; -3A70 003F; -3A76 003F; -3A7C 003F; -3A82 003F; -3A88 003F; -3A8E 003F; -3A94 003F; -3A9A 003F; -3AA0 003F; -3AA6 003F; -3AAC 003F; -3AB2 003F; -3AB8 003F; -3ABE 003F; -3AC4 003F; -3ACA 003F; -3AD0 003F; -3AD6 003F; -3ADC 003F; -3AE2 003F; -3AE7 003F; -3AED 003F; -3AF3 003F; -3AF9 003F; -3AFF 003F; -3B05 003F; -3B0A 003F; -3B10 003F; -3B16 003F; -3B1B 003F; -3B21 003F; -3B27 003F; -3B2D 003F; -3B33 003F; -3B39 003F; -3B3F 003F; -3B45 003F; -3B4A 003F; -3B50 003F; -3B56 003F; -3B5C 003F; -3B62 003F; -3B68 003F; -3B6E 003F; -3B74 003F; -3B7A 003F; -3B80 003F; -3B86 003F; -3B8C 003F; -3B92 003F; -3B98 003F; -3B9D 0061; -3BA2 003F; -3BA8 003F; -3BAE 003F; -3BB4 003F; -3BBA 003F; -3BC0 003F; -3BC6 003F; -3BCC 003F; -3BD2 003F; -3BD8 003F; -3BDE 003F; -3BE4 003F; -3BEA 003F; -3BF0 003F; -3BF6 003F; -3BFC 003F; -3C02 003F; -3C08 003F; -3C0E 003F; -3C14 003F; -3C19 003F; -3C1F 003F; -3C25 003F; -3C2B 003F; -3C31 003F; -3C37 003F; -3C3D 003F; -3C43 003F; -3C49 003F; -3C4E 0041; -3C54 003F; -3C5A 003F; -3C60 003F; -3C66 003F; -3C6C 003F; -3C72 003F; -3C78 003F; -3C7E 003F; -3C84 003F; -3C8A 003F; -3C90 003F; -3C96 003F; -3C9C 003F; -3CA2 003F; -3CA8 003F; -3CAE 003F; -3CB4 003F; -3CBA 003F; -3CC0 003F; -3CC6 003F; -3CCC 003F; -3CD2 003F; -3CD8 003F; -3CDE 003F; -3CE4 003F; -3CEA 003F; -3CF0 003F; -3CF6 003F; -3CFC 003F; -3D02 003F; -3D08 003F; -3D0E 003F; -3D14 003F; -3D1A 003F; -3D20 003F; -3D26 003F; -3D2C 003F; -3D32 003F; -3D37 003F; -3D3D 003F; -3D43 003F; -3D49 003F; -3D4F 003F; -3D55 003F; -3D5B 003F; -3D61 003F; -3D67 003F; -3D6D 003F; -3D73 003F; -3D79 003F; -3D7F 003F; -3D85 003F; -3D8B 003F; -3D91 003F; -3D96 0041; -3D9C 003F; -3DA2 003F; -3DA8 003F; -3DAE 003F; -3DB4 003F; -3DBA 003F; -3DC0 003F; -3DC6 003F; -3DCC 003F; -3DD2 003F; -3DD8 003F; -3DDE 003F; -3DE4 003F; -3DEA 003F; -3DF0 003F; -3DF6 003F; -3DFC 003F; -3E02 003F; -3E08 003F; -3E0E 003F; -3E14 003F; -3E1A 003F; -3E20 003F; -3E26 003F; -3E2C 003F; -3E32 003F; -3E38 003F; -3E3E 003F; -3E44 003F; -3E4A 003F; -3E50 003F; -3E56 003F; -3E5C 003F; -3E62 003F; -3E68 003F; -3E6E 003F; -3E74 003F; -3E7A 003F; -3E80 003F; -3E86 003F; -3E8C 003F; -3E92 003F; -3E98 003F; -3E9E 003F; -3EA4 003F; -3EAA 003F; -3EAF 003F; -3EB5 003F; -3EB9 003F; -3EBF 003F; -3EC5 003F; -3ECB 003F; -3ED1 003F; -3ED7 003F; -3EDD 003F; -3EE3 003F; -3EE9 003F; -3EEF 003F; -3EF5 003F; -3EFB 003F; -3F01 003F; -3F07 003F; -3F0D 003F; -3F13 003F; -3F19 003F; -3F1E 003F; -3F24 003F; -3F2A 003F; -3F30 003F; -3F36 003F; -3F3C 003F; -3F42 003F; -3F48 003F; -3F4E 003F; -3F54 003F; -3F5A 003F; -3F60 003F; -3F66 003F; -3F6C 003F; -3F72 003F; -3F78 003F; -3F7E 003F; -3F84 003F; -3F8A 003F; -3F90 003F; -3F96 003F; -3F9C 003F; -3FA2 003F; -3FA8 003F; -3FAE 003F; -3FB4 003F; -3FBA 003F; -3FC0 003F; -3FC6 003F; -3FCC 003F; -3FD2 003F; -3FD8 003F; -3FDE 003F; -3FE4 003F; -3FEA 003F; -3FF0 003F; -3FF6 003F; -2F93E 0021; -4001 003F; -4007 003F; -400C 003F; -4012 003F; -FAD3 0021; -401D 003F; -4023 003F; -4029 003F; -402F 003F; -4035 003F; -2F949 0041; -403F 003F; -4045 003F; -404A 003F; -4050 003F; -4056 003F; -405C 003F; -4062 003F; -4068 003F; -406E 003F; -4074 003F; -407A 003F; -4080 003F; -4086 003F; -408C 003F; -4092 003F; -4097 003F; -409D 003F; -40A3 003F; -40A9 003F; -40AF 003F; -40B5 003F; -40BB 003F; -40C1 003F; -40C7 003F; -40CD 003F; -40D3 003F; -40D9 003F; -40DF 003F; -40E4 003F; -40EA 003F; -40F0 003F; -40F6 003F; -40FC 003F; -4102 003F; -4108 003F; -410E 003F; -4114 003F; -411A 003F; -4120 003F; -4126 003F; -412C 003F; -4131 003F; -4137 003F; -413D 003F; -4143 003F; -4149 003F; -414F 003F; -4155 003F; -415B 003F; -4161 003F; -4167 003F; -416D 003F; -4173 003F; -4179 003F; -417F 003F; -4185 003F; -418B 003F; -4191 003F; -4197 003F; -419D 003F; -41A3 003F; -41A9 003F; -41AF 003F; -41B5 003F; -41BB 003F; -41C1 003F; -41C7 003F; -41CD 003F; -41D3 003F; -41D9 003F; -41DF 003F; -41E5 003F; -41EB 003F; -41F1 003F; -41F7 003F; -41FD 003F; -4202 0041; -4208 003F; -420E 003F; -4214 003F; -421A 003F; -4220 003F; -4226 003F; -422B 003F; -4231 003F; -4237 003F; -423D 003F; -4243 003F; -4249 003F; -424F 003F; -4255 003F; -425B 003F; -4261 003F; -4267 003F; -426D 003F; -4273 003F; -4279 003F; -427F 003F; -4285 003F; -428B 003F; -4291 003F; -4297 003F; -429D 003F; -42A2 003F; -42A8 003F; -42AE 003F; -42B4 003F; -42BA 003F; -42C0 003F; -42C6 003F; -42CC 003F; -42D2 003F; -42D8 003F; -42DE 003F; -42E4 003F; -42EA 003F; -42F0 003F; -42F6 003F; -42FC 003F; -4301 0041; -4307 003F; -430D 003F; -4313 003F; -4319 003F; -431F 003F; -4325 003F; -432B 003F; -4331 003F; -4336 003F; -433C 003F; -4342 003F; -4348 003F; -434E 003F; -4354 003F; -4359 0041; -435F 003F; -4365 003F; -436B 003F; -4371 003F; -4377 003F; -437D 003F; -4383 003F; -4389 003F; -438F 003F; -4395 003F; -439B 003F; -43A1 003F; -43A7 003F; -43AD 003F; -43B3 003F; -43B9 003F; -43BF 003F; -43C5 003F; -43CB 003F; -43D1 003F; -43D6 003F; -43DB 003F; -43E1 003F; -43E7 003F; -43ED 003F; -43F3 003F; -43F9 003F; -43FF 003F; -4405 003F; -2F984 0021; -4410 003F; -4416 003F; -441C 003F; -4422 003F; -4428 003F; -442E 003F; -4434 003F; -443A 003F; -4440 003F; -4446 003F; -444C 003F; -4452 003F; -4458 003F; -445E 003F; -4464 003F; -446A 003F; -446F 003F; -4475 003F; -447B 003F; -4481 003F; -4487 003F; -448D 003F; -4493 003F; -4499 003F; -449F 003F; -44A5 003F; -44AB 003F; -44B1 003F; -44B7 003F; -44BD 003F; -44C3 003F; -44C9 003F; -44CF 003F; -44D5 003F; -44DB 003F; -44E1 003F; -44E7 003F; -44ED 003F; -44F3 003F; -44F9 003F; -44FF 003F; -4505 003F; -450B 003F; -4511 003F; -4517 003F; -451D 003F; -4523 003F; -4529 003F; -452E 003F; -4534 003F; -453A 003F; -4540 003F; -4546 003F; -454C 003F; -4552 003F; -4558 003F; -455D 0041; -4562 003F; -4568 003F; -456D 003F; -4573 003F; -4579 003F; -457F 003F; -4585 003F; -458B 003F; -4591 003F; -4597 003F; -459D 003F; -45A3 003F; -45A9 003F; -45AF 003F; -45B5 003F; -45BB 003F; -45C1 003F; -45C7 003F; -45CD 003F; -45D3 003F; -45D8 003F; -45DE 003F; -45E4 003F; -45EA 003F; -45F0 003F; -45F6 003F; -45FB 003F; -4601 003F; -4607 003F; -460D 003F; -4613 003F; -4619 003F; -461F 003F; -4625 003F; -462B 003F; -4631 003F; -4636 003F; -463C 003F; -4642 003F; -4648 003F; -464E 003F; -4654 003F; -465A 003F; -4660 003F; -4666 003F; -466C 003F; -4672 003F; -4678 003F; -467E 003F; -4684 003F; -468A 003F; -4690 003F; -4696 003F; -469C 003F; -46A2 003F; -46A8 003F; -46AE 003F; -46B4 003F; -46BA 003F; -46BF 003F; -46C5 003F; -46CA 003F; -46D0 003F; -46D6 003F; -46DC 003F; -46E2 003F; -46E8 003F; -46EE 003F; -46F4 003F; -46FA 003F; -4700 003F; -4706 003F; -470C 003F; -4712 003F; -4718 003F; -471E 003F; -4724 003F; -472A 003F; -4730 003F; -4736 003F; -473C 003F; -4742 003F; -4748 003F; -474E 003F; -4754 003F; -475A 003F; -4760 003F; -4766 003F; -476C 003F; -4772 003F; -4778 003F; -477E 003F; -4784 003F; -478A 003F; -4790 003F; -4796 003F; -479C 003F; -47A2 003F; -47A8 003F; -47AE 003F; -47B4 003F; -47BA 003F; -47C0 003F; -47C6 003F; -47CC 003F; -47D2 003F; -47D8 003F; -47DE 003F; -47E4 003F; -47EA 003F; -47F0 003F; -47F6 003F; -47FC 003F; -4802 003F; -4808 003F; -480E 003F; -4814 003F; -481A 003F; -4820 003F; -4826 003F; -482C 003F; -4832 003F; -4838 003F; -483E 003F; -4844 003F; -484A 003F; -4850 003F; -4856 003F; -485C 003F; -4862 003F; -4868 003F; -486E 003F; -4874 003F; -487A 003F; -4880 003F; -4886 003F; -488C 003F; -4892 003F; -4898 003F; -489E 003F; -48A4 003F; -48AA 003F; -48B0 003F; -48B6 003F; -48BC 003F; -48C2 003F; -48C8 003F; -48CE 003F; -48D4 003F; -48DA 003F; -48E0 003F; -48E6 003F; -48EC 003F; -48F2 003F; -48F8 003F; -48FE 003F; -4904 003F; -490A 003F; -4910 003F; -4916 003F; -491C 003F; -4922 003F; -4928 003F; -492E 003F; -4934 003F; -493A 003F; -4940 003F; -4946 003F; -494C 003F; -4952 003F; -4958 003F; -495E 003F; -4964 003F; -496A 003F; -4970 003F; -4976 003F; -497C 003F; -4982 003F; -4988 003F; -498E 003F; -4994 003F; -4999 003F; -499F 003F; -49A5 003F; -49AB 003F; -49B1 003F; -49B7 003F; -49BD 003F; -49C3 003F; -49C9 003F; -49CF 003F; -49D5 003F; -49DB 003F; -49E1 003F; -49E6 0041; -49EC 003F; -49F2 003F; -49F8 003F; -49FE 003F; -4A04 003F; -4A0A 003F; -4A10 003F; -4A16 003F; -4A1C 003F; -4A22 003F; -4A28 003F; -4A2E 003F; -4A34 003F; -4A3A 003F; -4A40 003F; -4A46 003F; -4A4C 003F; -4A52 003F; -4A58 003F; -4A5E 003F; -4A64 003F; -4A6A 003F; -4A6F 003F; -4A75 003F; -4A7A 003F; -4A80 003F; -4A86 003F; -4A8C 003F; -4A92 003F; -4A98 003F; -4A9E 003F; -4AA4 003F; -4AAA 003F; -4AB0 003F; -4AB5 003F; -4ABB 003F; -4AC1 003F; -4AC7 003F; -4ACD 003F; -4AD3 003F; -4AD9 003F; -4ADF 003F; -4AE5 003F; -4AEB 003F; -4AF1 003F; -4AF7 003F; -4AFD 003F; -4B03 003F; -4B09 003F; -4B0F 003F; -4B15 003F; -4B1B 003F; -4B21 003F; -4B27 003F; -4B2D 003F; -2FA03 0021; -4B38 003F; -4B3E 003F; -4B44 003F; -4B4A 003F; -4B50 003F; -4B56 003F; -4B5C 003F; -4B62 003F; -4B68 003F; -4B6E 003F; -4B74 003F; -4B7A 003F; -4B80 003F; -4B86 003F; -4B8C 003F; -4B92 003F; -4B98 003F; -4B9E 003F; -4BA4 003F; -4BAA 003F; -4BB0 003F; -4BB6 003F; -4BBC 003F; -4BC2 003F; -4BC8 003F; -2FA08 0021; -4BD3 003F; -4BD9 003F; -4BDF 003F; -4BE5 003F; -4BEB 003F; -4BF1 003F; -4BF7 003F; -4BFD 003F; -4C03 003F; -4C09 003F; -4C0F 003F; -4C15 003F; -4C1B 003F; -4C21 003F; -4C27 003F; -4C2D 003F; -4C33 003F; -4C39 003F; -4C3F 003F; -4C45 003F; -4C4B 003F; -4C51 003F; -4C57 003F; -4C5D 003F; -4C63 003F; -4C69 003F; -4C6F 003F; -4C75 003F; -4C7B 003F; -4C81 003F; -4C87 003F; -4C8D 003F; -4C93 003F; -4C99 003F; -4C9F 003F; -4CA5 003F; -4CAB 003F; -4CB1 003F; -4CB7 003F; -4CBD 003F; -4CC3 003F; -4CC9 003F; -4CCE 0041; -4CD4 003F; -4CDA 003F; -4CE0 003F; -4CE6 003F; -4CEC 003F; -4CF1 003F; -4CF7 003F; -4CFC 003F; -4D02 003F; -4D08 003F; -4D0E 003F; -4D14 003F; -4D1A 003F; -4D20 003F; -4D26 003F; -4D2C 003F; -4D32 003F; -4D38 003F; -4D3E 003F; -4D44 003F; -4D4A 003F; -4D50 003F; -2FA16 0021; -4D5B 003F; -4D61 003F; -4D67 003F; -4D6D 003F; -4D73 003F; -4D79 003F; -4D7F 003F; -4D85 003F; -4D8B 003F; -4D91 003F; -4D97 003F; -4D9D 003F; -4DA3 003F; -4DA9 003F; -4DAF 003F; -4DB5 003F; -20005 003F; -2F9D9 003F; -2F861 003F; -2F889 003F; -FACF 003F; -2F989 003F; -2F8F0 003F; -2F910 003F; -2F927 003F; -2F942 003F; -2F952 003F; -2F961 003F; -2F973 003F; -2F987 003F; -2F9AD 003F; -2F9CC 003F; -2F9E5 003F; -2F9FB 003F; -2FA13 003F; -2A6D3 003F; -E001 003F; -F8FB 003F; -C0000 003F; -E0005 003F; -F0005 003F; -F00FD 003F; -FFF05 003F; -FFFFD 003F; -100005 003F; -1000FD 003F; -10FF05 003F; -10FFFD 003F; +2706 0062; +2726 0062; +2745 0062; +276B 0062; +27AA 0062; +27CA 0062; +27F1 0062; +290F 0062; +292D 0062; +294B 0062; +2969 0062; +299D 0062; +29BB 0062; +29D9 0062; +29F7 0062; +2A18 0062; +2A36 0062; +2A54 0062; +2A72 0062; +2A93 0062; +2AB1 0062; +2ACF 0062; +2AED 0062; +2B0B 0062; +2804 0062; +2822 0062; +2840 0062; +285E 0062; +287C 0062; +289A 0062; +28B8 0062; +28D6 0062; +28F4 0062; +4DC4 0062; +4DE2 0062; +1D300 0062; +1D31E 0062; +1D33C 0062; +A493 0062; +A4B1 0062; +1013F 0062; +1D00C 0062; +1D02A 0062; +1D048 0062; +1D066 0062; +1D084 0062; +1D0A2 0062; +1D0C0 0062; +1D0DE 0062; +1D106 0062; +1D124 0062; +1D142 0062; +1D159 0062; +1D1A0 0062; +1D1C2 0062; +1D202 0062; +1D220 0062; +1D23E 0062; +31CD 0062; +137B 0062; +10126 0062; +10154 0062; +103D5 0062; +0000 0062; +0082 0062; +0488 0062; +05AD 0062; +06E4 0062; +200B 0062; +FDD3 0062; +1D167 0062; +1D18A 0062; +BFFFF 0062; +E0038 0062; +E0056 0062; +E0074 0062; +E0112 0062; +E0130 0062; +E014E 0062; +E016C 0062; +E018A 0062; +E01A8 0062; +E01C6 0062; +E01E4 0062; +1D5BB 0021; +1D539 0021; +1E05 0021; +0301 0062; +0319 0062; +033B 0062; +035F 0062; +05B7 0062; +FCF4 0062; +0734 0062; +07F2 0062; +0C02 0062; +0EC8 0062; +302A 0062; +20E4 0062; +1D68B 0061; +1D609 0061; +1E07 0061; +1D435 0062; +0180 0021; +0253 0021; +1D41C 0021; +FF23 0021; +1D63E 003F; +0063 0301 0334; +0043 0334 0327; +1D5BC 0061; +1D402 0061; +0106 0061; +0368 0062; +1D60A 0062; +33C6 0041; +2106 0041; +1D9D 003F; +1D485 0021; +FF24 003F; +1D673 003F; +1E0E 003F; +1E12 0334; +1D41D 0061; +0044 0041; +1D60B 0041; +1E12 0041; +1D4ED 0062; +33C8 003F; +3377 0021; +02A3 0061; +1D05 0021; +0257 0021; +0065 0021; +1D58A 003F; +1D508 003F; +00CA 0021; +0117 0021; +1EBA 0021; +0045 0301 0334; +00CA 0334 0301; +0045 0334 030C; +0045 0327 0334 0306; +0112 0334 0340; +0045 0302 0334 0323; +1D486 0061; +2130 0061; +2091 0061; +1EC4 0061; +0119 0061; +1EB8 0061; +1D65A 0062; +1EBF 0062; +0205 0062; +0246 003F; +018F 003F; +025B 0061; +1D9F 003F; +025E 0041; +1D68F 0021; +1D5A5 0021; +0046 0334 0307; +1D5F3 0041; +1D509 0041; +1D557 0062; +FB00 0061; +02A9 0061; +2132 0041; +1D5C0 003F; +1D53E 003F; +0121 003F; +011C 0334; +24A2 0041; +0047 0041; +24BC 0041; +1E21 0041; +1D4A2 0062; +3387 0041; +1D79 0041; +0260 0062; +01A2 003F; +1D489 003F; +210B 003F; +1E26 003F; +021E 0334; +1E2A 0334; +1D629 0061; +1D5A7 0061; +021F 0061; +0126 0061; +1D46F 0062; +32CC 003F; +01F6 0061; +2C75 0061; +2148 0021; +24D8 003F; +1D610 003F; +01CF 003F; +0208 003F; +0069 0334 0306; +1E2E 0334; +0209 0334; +2170 0061; +1D5F6 0041; +1D4D8 0041; +00CE 0061; +1EC8 0061; +1D526 0062; +00CD 0062; +2171 0021; +33CC 0021; +0131 0021; +0268 0021; +0269 0021; +1D4BF 0021; +1D409 0021; +1D36 0021; +1D55B 0061; +1D4A5 0061; +0135 0041; +1D50D 0062; +0249 003F; +0284 003F; +1D590 003F; +1D4A6 003F; +1E32 0021; +1E33 0334; +1D694 0061; +1D5AA 0061; +01E9 0061; +1D5C4 0062; +01E8 0062; +3398 0021; +33CF 0021; +0199 0021; +24A7 003F; +1D695 003F; +1D5AB 003F; +1E38 003F; +006C 0334 0323; +0140 003F; +1D4F5 0041; +2112 0041; +013B 0041; +1D425 0062; +24C1 0062; +01C8 0041; +32CF 0062; +019A 0061; +026C 0062; +026E 0062; +1D5FA 0021; +1D510 0021; +1E3E 003F; +036B 0334; +1D5FA 0061; +1D510 0061; +1E3F 0041; +1D662 0062; +1E43 0062; +339F 0021; +33A8 0041; +33C1 0061; +FF4E 0021; +24DD 0021; +1D649 003F; +0145 0021; +006E 030C 0334; +006E 032D 0334; +1D697 0061; +1D615 0061; +01F8 0061; +3381 0061; +1D5AD 0062; +338B 0062; +33B1 0062; +1D0E 0062; +0220 0062; +014A 0041; +1D490 003F; +1D442 003F; +014F 0021; +00D6 0021; +0231 0021; +014C 0021; +1EDD 0021; +004F 0341 0334; +006F 0302 0300 0334; +006F 0308 0334; +004F 0334 0303 0301; +004F 0307 0304 0334; +014C 0301 0334; +01A1 0334; +006F 0334 0309 031B; +006F 0061; +1D5FC 0041; +1D57A 0041; +00D4 0061; +0151 0061; +00D8 0061; +020D 0061; +1EE2 0061; +1D40E 0062; +1ED7 0062; +01ED 0062; +0153 0021; +1D14 0021; +1D12 0021; +0275 0021; +1D3D 0061; +1D45D 003F; +1D67F 0021; +0070 0341 0334; +1D699 0061; +1D617 0061; +1E57 0061; +1D40F 0062; +33D7 003F; +33B4 003F; +1D88 003F; +0071 003F; +1D69A 003F; +1D618 003F; +1D562 0041; +1D4AC 0041; +211A 0062; +024A 0061; +1D42B 003F; +1D64D 0021; +0158 003F; +0072 0334 0301; +0210 0334; +0072 0041; +1D633 0041; +1D5B1 0041; +0211 0041; +33AF 0062; +1D4E1 0062; +20A8 003F; +1D72 003F; +027B 003F; +1D73 003F; +1D530 0021; +1D4AE 0021; +015A 003F; +1E69 003F; +0073 0334 030C; +1E62 0334; +1D494 0061; +1D412 0061; +015B 0061; +1E62 0061; +24E2 0062; +015F 0062; +FB06 0041; +023F 0021; +0285 0021; +1D599 0021; +1D517 0021; +0164 003F; +0054 030C 0334; +0074 032D 0334; +1D5CD 0061; +1D54B 0061; +1E97 0061; +1D42D 0062; +1D57 0062; +1D7A 0041; +1D1B 0041; +1DB5 003F; +0236 0041; +1D496 003F; +1D414 003F; +016D 003F; +01D9 003F; +1EE7 003F; +1EEC 003F; +0075 0334 0300; +016E 0334; +00DC 0334 030C; +0075 0334 0328; +0214 0334; +0075 0334 0303 031B; +0075 0334 0324; +1D4CA 0061; +1D448 0061; +1D64 0041; +00DC 0041; +0173 0041; +1EE8 0041; +1E75 0041; +1D580 0062; +01D6 0062; +1EF1 0062; +1D1E 0021; +1D99 0021; +1D5A 003F; +1DB7 003F; +1D533 0021; +1D449 0021; +1D65 003F; +24B1 0041; +24E5 0041; +1D61D 0041; +1D5CF 0062; +2175 003F; +33DE 003F; +2C74 003F; +1D534 0021; +1D4B2 0021; +1E83 003F; +0057 0334 0301; +0057 0334 0307; +1D4CC 0041; +1D44A 0041; +1E98 0061; +24E6 0062; +1E87 0062; +1D4CD 0021; +2169 003F; +02E3 003F; +036F 0061; +1D6A1 0041; +1D5B7 0041; +1D569 0062; +1E8A 0062; +24B4 0021; +0059 0021; +24CE 0021; +0233 0021; +0177 0334; +0232 0334; +1D66E 0061; +1D5EC 0061; +0177 0041; +FF59 0062; +1D688 0062; +024E 003F; +1D59F 0021; +1D4B5 0021; +1E91 003F; +005A 0302 0334; +FF5A 0041; +24E9 0041; +1D689 0041; +FF5A 0062; +1D689 0062; +01B6 0041; +0290 0041; +0292 0021; +01EE 0062; +0293 0062; +01F7 0062; +0185 0061; +02BC 0062; +02BF 0062; +02A2 0062; +0297 0062; +1D6A8 0021; +1F06 0021; +1F8B 0021; +1FB0 0021; +03B1 0343 0341 0334 0345; +03B1 0313 0345 0342 0334; +03B1 0334 0314 0341 0345; +1F09 0342 0334; +03B1 0334 0300; +1FB9 0334; +1D6A8 0041; +1F86 0041; +1F0F 0041; +1FB6 0041; +1F0A 0062; +1F70 0062; +1D757 0021; +1D757 0061; +1D6FE 0021; +213D 0061; +03B3 0062; +1D739 003F; +0394 0041; +1D6C6 0021; +1D75A 003F; +0388 0021; +1F18 0334 0300; +0395 0334 0341; +1D774 0041; +1F19 0061; +1D774 0062; +1D7CB 0021; +1D6C7 0021; +1D701 0041; +1D6C8 0021; +1F94 0021; +1F2D 0021; +0389 0021; +0397 0334 0343 0341; +0397 0313 0334 0342; +0397 0314 0334 0301; +1F21 0334 0342; +03B7 0334 0341 0345; +1FC3 003F; +1F28 0041; +1F21 0041; +1F99 0041; +1D7B0 0062; +1F2B 0062; +1D751 0021; +1D6B9 003F; +1D751 0041; +1DBF 0041; +037A 0021; +1F3C 0021; +038A 0021; +03B9 0334 0313; +1F38 0334 0342; +0399 0334 0314 0342; +03B9 0308 0334; +037A 0061; +1F3C 0061; +038A 0061; +03B9 0062; +03AF 0062; +1D73F 0021; +03F0 0061; +1D6EB 0041; +1D706 0021; +1D740 0041; +1D27 0041; +00B5 0061; +00B5 0062; +339B 0041; +039D 003F; +1D6B4 0041; +039E 003F; +1D6B5 0041; +039F 003F; +1F4D 003F; +039F 0334 0313 0301; +1F49 0334 0340; +1D7B8 0041; +1F45 0041; +1D79E 0062; +1D77F 0021; +03C0 0041; +1D72B 0061; +1D28 003F; +03D8 0061; +1D6B8 0021; +03F1 0061; +1D6F2 0041; +1D68 0062; +1D70D 003F; +1D70D 0061; +1D768 0041; +03FE 0061; +1D7BD 0021; +03A4 0061; +1D7BE 0021; +1F59 0021; +1FE8 0021; +03C5 0313 0300 0334; +03C5 0314 0334 0342; +1FE0 0334; +1FE1 0334; +1F50 0061; +038E 0041; +1FE9 0061; +1FEB 0062; +1D6D7 003F; +1D6D7 0061; +1D76B 0041; +1D74C 0021; +1D7C0 0061; +1D6F8 0062; +03C8 0061; +03A8 0062; +1D76E 0021; +1F6E 003F; +1F67 003F; +1FF7 003F; +03A9 0334 0343 0340; +1FA0 0334; +1F61 0340 0334; +03C9 0334 0314 0345; +03C9 0340 0334 0345; +1D788 0041; +1F6A 0061; +1F63 0061; +1F7C 0061; +1F6C 0062; +1F7D 0062; +03F7 0062; +2C84 0062; +2CB6 0062; +2C8E 0062; +2C94 0062; +2C99 0061; +2CBD 0061; +2CA1 0061; +2CA7 0061; +2CAD 0061; +2CBF 0061; +2CC3 0061; +03E5 0061; +03E9 0061; +2CCF 0061; +2CD5 0061; +03ED 0061; +2CDD 0061; +2CB5 0061; +2CE3 0061; +04D1 0334; +04D3 0334; +04D9 0062; +04D8 0308 0062; +0432 0062; +0493 0061; +04F7 0061; +0452 0061; +0433 0341 0334; +0413 0301 0062; +0415 0334 0300; +0435 0306 003F; +0404 0021; +0436 0001 0308 0061; +0416 0308 0041; +0504 0021; +0417 0334 0308; +04E0 0021; +0438 0300 0334; +0438 0062; +0438 0308 0061; +0456 0308 003F; +0438 0306 003F; +0408 0021; +049B 0062; +049F 0062; +04C5 003F; +0508 003F; +041D 003F; +04A3 0062; +045A 0062; +041E 0308 003F; +04E8 0061; +04E8 0308 0041; +0481 0061; +0441 0061; +0442 0061; +045B 0061; +043A 1D165 0301 0061; +0443 0304 0334; +040E 003F; +0423 0308 003F; +0423 030B 003F; +04AE 0061; +0424 0061; +04FE 0061; +0460 0061; +047A 0061; +0427 0061; +0427 0308 0041; +04B9 0061; +045F 0061; +044A 0061; +042B 0334 0308; +048C 0021; +044D 0308 0021; +044E 0021; +0467 0021; +046D 0021; +0473 0021; +0475 030F 0334; +04A9 0062; +2C31 0062; +2C34 0062; +2C37 0062; +2C3A 0062; +2C3D 0062; +2C40 0062; +2C43 0062; +2C46 0062; +2C49 0062; +2C4C 0062; +2C4F 0062; +2C52 0062; +2C55 0062; +2C58 0062; +2C5B 0062; +2C5E 0062; +2D01 0062; +2D03 0062; +2D05 0062; +2D21 0062; +2D08 0062; +2D0A 0062; +10AC 003F; +10AD 003F; +10AF 003F; +10B1 003F; +10C3 003F; +10B4 003F; +10B6 003F; +10B8 003F; +10BA 003F; +10BC 003F; +10BE 003F; +10BF 003F; +10C5 003F; +10FA 0041; +0563 0062; +0536 003F; +0539 003F; +053C 003F; +053F 003F; +0542 003F; +FB14 0041; +0546 003F; +0549 003F; +054C 003F; +FB16 0041; +0581 0062; +0584 0062; +2135 003F; +05D0 0062; +FB31 0041; +FB22 003F; +FB23 0041; +05F0 0041; +FB38 0021; +05F2 003F; +FB3A 003F; +05DC 0061; +05DD 0062; +FB41 0041; +FB4E 0021; +FB46 0061; +FB27 0041; +FB49 003F; +FB4A 0021; +10903 0062; +10909 0062; +1090F 0062; +10915 0062; +0627 0334 0653; +0627 1D165 0654 0061; +FB50 0062; +FE88 0021; +FE8B 003F; +FBEB 0021; +FC99 0021; +FC02 0041; +FBEF 0021; +FBF5 0021; +FBFB 0062; +0627 0021; +0675 003F; +0628 0041; +FC06 0061; +FC6B 003F; +FCA0 003F; +067B 003F; +FB57 0021; +0680 0041; +0753 003F; +FE93 0041; +FCA1 003F; +FC0C 0061; +FD54 003F; +FC0E 0021; +FDA4 003F; +FC0F 0061; +FE9A 0061; +FC12 0021; +FC13 0061; +FB67 0061; +FB60 0062; +FB63 0061; +FE9F 0062; +FCA8 003F; +FD1D 003F; +0683 0041; +FB73 0061; +FB7C 0062; +FB80 0062; +FCA9 003F; +FD5A 003F; +FEA6 0021; +FC1A 003F; +FD04 0061; +062F 003F; +0630 0062; +068B 003F; +FB82 0041; +06EE 003F; +0631 0062; +0691 003F; +0695 003F; +0699 003F; +FEB2 0021; +FC1C 0041; +FD5C 003F; +FD2A 003F; +FD60 003F; +FD17 003F; +0634 0041; +FD2D 0062; +FD68 003F; +FD2F 0062; +FD30 0062; +FCEA 0061; +069B 003F; +FEBA 0021; +FD65 003F; +FDF5 003F; +FDC5 003F; +0636 003F; +FC22 0061; +FC24 0061; +FC25 0061; +069E 003F; +FEC3 0062; +FD72 003F; +FD12 003F; +FEC7 0062; +FECA 0021; +FDC4 003F; +FD76 0061; +FCF8 0061; +FCBC 003F; +FD7A 003F; +06FC 003F; +0641 0041; +FC2E 0061; +FC30 0061; +06A1 003F; +FB6B 0061; +FB6F 0061; +FED6 0021; +FDF1 003F; +FDB2 003F; +06A8 003F; +FC80 003F; +FCC6 003F; +FCC8 003F; +FDB7 003F; +FB8F 0021; +06AC 003F; +06AE 003F; +06B0 003F; +06B2 003F; +06B4 003F; +0644 0041; +FEF7 0061; +FC3F 0061; +FCCA 003F; +FCCB 003F; +FCED 0041; +FC86 003F; +06B7 003F; +FEE4 0061; +FD8C 003F; +FD89 003F; +FD8E 003F; +FDB1 003F; +FEE6 0021; +FDB8 003F; +FCD3 003F; +FC4D 0061; +FCD5 0062; +FC8E 003F; +FB9E 0041; +06BC 003F; +0647 003F; +FCD7 003F; +FC53 003F; +FBAC 0062; +06C2 0041; +06C0 0061; +FEED 0062; +FBE0 0062; +FBD7 0062; +FBE2 0021; +FBDE 0062; +FC90 0061; +FEF4 0041; +FDAF 0041; +FC91 0041; +FD9C 003F; +FC59 003F; +FBFE 0041; +FBE4 0021; +06D3 0334; +0712 0021; +0715 0021; +071A 0021; +074E 0021; +0725 0021; +072A 0021; +0781 0021; +0786 0021; +0789 0021; +07A0 0021; +0790 0021; +0793 0021; +07A6 0021; +07AC 0021; +07CB 0021; +07D1 0021; +07D6 0041; +07DA 0021; +07E0 0021; +07E6 0021; +2D32 0021; +2D38 0021; +2D3E 0021; +2D44 0021; +2D4A 0021; +2D50 0021; +2D56 0021; +2D5C 0021; +2D62 0021; +1201 0021; +1207 0021; +120D 0021; +1212 0021; +1218 0021; +121E 0021; +2D81 0021; +1225 0021; +122B 0021; +1230 0021; +1236 0021; +123B 0021; +1240 0021; +1246 0021; +124D 0021; +1255 0021; +125D 0021; +1265 0021; +1387 0021; +126C 0021; +1272 0021; +2D86 0021; +127D 0021; +1282 0021; +1288 0021; +1291 0021; +1297 0021; +129C 0021; +12A1 0021; +12A7 0021; +12AC 0021; +12B3 0021; +12BB 0021; +12C3 0021; +12CB 0021; +12D1 0021; +12D8 0021; +12DE 0021; +12E3 0021; +12E9 0021; +12EF 0021; +12F5 0021; +12FA 0021; +2D8D 0021; +1305 0021; +130A 0021; +1310 0021; +1319 0021; +131F 0021; +1321 0021; +1327 0021; +132C 0021; +1331 0021; +1337 0021; +133C 0021; +1342 0021; +1348 0021; +134E 0021; +1350 0021; +1356 0021; +2D92 0021; +2DA2 0021; +2DA9 0021; +2DB0 0021; +2DB6 0021; +2DBD 0021; +2DC4 0021; +2DCB 0021; +2DD2 0021; +2DD9 0021; +0950 0021; +0909 0021; +090D 0021; +0913 0021; +0916 0061; +0919 003F; +097C 0041; +0921 0041; +0924 0061; +0929 0062; +092D 003F; +0930 0041; +0936 0061; +093E 0061; +0944 0061; +0948 0061; +0985 0021; +098B 0021; +0993 0021; +0999 0021; +099F 0021; +09A2 0061; +09A6 0062; +09AD 0062; +09B2 003F; +09BD 003F; +09C3 003F; +09C8 0021; +09CD 0041; +0A13 0041; +0A07 0041; +0A15 0021; +0A5A 0062; +0A5B 0061; +0A22 003F; +0A28 003F; +0A2D 0041; +0A35 0021; +0A42 0021; +0A4D 0041; +0A89 0041; +0A8D 0041; +0A95 0041; +0A9B 0041; +0AA1 0041; +0AA7 0041; +0AAE 0041; +0AB6 0041; +0ABF 0041; +0AE2 0041; +0ACB 0041; +0B08 003F; +0B61 003F; +0B16 003F; +0B1C 003F; +0B5C 003F; +0B25 0021; +0B2C 0021; +0B32 0021; +0B38 0021; +0B41 0021; +0B48 0021; +0B4D 003F; +0B86 0062; +0B8F 0062; +0B95 003F; +0BA3 003F; +0BAF 003F; +0BB5 003F; +0BBF 003F; +0BC7 0021; +0BCB 0041; +0C06 0021; +0C60 0021; +0C12 0021; +0C18 0021; +0C1E 0021; +0C24 0021; +0C2B 0021; +0C31 0021; +0C38 0021; +0C42 0021; +0C46 0334 0C56; +0C4D 0061; +0C87 0041; +0C8C 0041; +0C93 0041; +0C99 0041; +0C9F 0041; +0CA5 0041; +0CAC 0041; +0CB2 0041; +0CB3 0041; +0CC0 0061; +0CE3 0021; +0CC6 0CD5 0062; +0CCB 0021; +0CD6 0021; +0D0A 0021; +0D0F 0021; +0D16 0021; +0D1C 0021; +0D22 0021; +0D28 0021; +0D2F 0021; +0D35 0021; +0D3F 0021; +0D46 0001 0D3E 0061; +0D4B 0021; +0D4D 0062; +0D8A 0062; +0D90 0062; +0D96 0062; +0D9F 0062; +0DA5 0062; +0DAB 0062; +0DB1 0062; +0DB8 0062; +0DC1 0062; +0DCA 0061; +0DD4 0061; +0DD9 0DCA 003F; +0DD9 0DCF 0DCA 0021; +0DDE 0041; +A802 0061; +A808 0021; +A80F 0021; +A815 0021; +A81B 0021; +A821 0021; +A827 0021; +10A06 0021; +10A15 0021; +10A1C 0021; +10A22 0021; +10A28 0021; +10A2E 0021; +10A3F 0021; +0E43 0E01 0041; +0E43 0E02 0041; +0E43 0E03 0041; +0E43 0E04 0041; +0E43 0E05 0041; +0E43 0E06 0041; +0E43 0E07 0041; +0E43 0E08 0041; +0E43 0E09 0041; +0E43 0E0A 0041; +0E43 0E0B 0041; +0E43 0E0C 0041; +0E43 0E0D 0041; +0E43 0E0E 0041; +0E43 0E0F 0041; +0E43 0E10 0041; +0E43 0E11 0041; +0E43 0E12 0041; +0E43 0E13 0041; +0E43 0E14 0041; +0E43 0E15 0041; +0E43 0E16 0041; +0E43 0E17 0041; +0E43 0E18 0041; +0E43 0E19 0041; +0E43 0E1A 0041; +0E43 0E1B 0041; +0E43 0E1C 0041; +0E43 0E1D 0041; +0E43 0E1E 0041; +0E43 0E1F 0041; +0E43 0E20 0041; +0E43 0E21 0041; +0E43 0E22 0041; +0E43 0E23 0041; +0E43 0E24 0041; +0E43 0E25 0041; +0E43 0E26 0041; +0E43 0E27 0041; +0E43 0E28 0041; +0E43 0E29 0041; +0E43 0E2A 0041; +0E43 0E2B 0041; +0E43 0E2C 0041; +0E43 0E2D 0041; +0E43 0E2E 0041; +0E33 0021; +0E38 0021; +0E40 0591 0E02 0061; +0E40 0591 0E0C 0061; +0E40 0591 0E16 0061; +0E40 0591 0E20 0061; +0E40 0591 0E2A 0061; +0E41 1D165 0E04 0061; +0E41 1D165 0E0E 0061; +0E41 1D165 0E18 0061; +0E41 1D165 0E22 0061; +0E41 1D165 0E2C 0061; +0E42 0001 0E07 0061; +0E42 0001 0E11 0061; +0E42 0001 0E1B 0061; +0E42 0001 0E25 0061; +0E43 0021; +0E43 0591 0E09 0061; +0E43 0591 0E13 0061; +0E43 0591 0E1D 0061; +0E43 0591 0E27 0061; +0E44 1D165 0E01 0061; +0E44 1D165 0E0B 0061; +0E44 1D165 0E15 0061; +0E44 1D165 0E1F 0061; +0E44 1D165 0E29 0061; +0EC0 0E81 0062; +0EC0 0E82 0062; +0EC0 0E84 0062; +0EC0 0E87 0062; +0EC0 0E88 0062; +0EC0 0E8A 0062; +0EC0 0E8D 0062; +0EC0 0E94 0062; +0EC0 0E95 0062; +0EC0 0E96 0062; +0EC0 0E97 0062; +0EC0 0E99 0062; +0EC0 0E9A 0062; +0EC0 0E9B 0062; +0EC0 0E9C 0062; +0EC0 0E9D 0062; +0EC0 0E9E 0062; +0EC0 0E9F 0062; +0EC0 0EA1 0062; +0EC0 0EA2 0062; +0EC0 0EA3 0062; +0EC0 0EA5 0062; +0EC0 0EA7 0062; +0EC0 0EAA 0062; +0EDC 0062; +0EDD 0062; +0EC0 0EAB 0062; +0EC0 0EAD 0062; +0EC0 0EAE 0062; +0EB0 0062; +0EB5 003F; +0EBB 0061; +0EC0 0001 0E88 0061; +0EC0 0001 0E9C 0061; +0EC0 0001 0EAB 0061; +0EC1 0591 0E87 0061; +0EC1 0591 0E9B 0061; +0EC1 0591 0EAA 0061; +0EC2 1D165 0E84 0061; +0EC2 1D165 0E9A 0061; +0EC2 1D165 0EA7 0061; +0EC3 0001 0E84 0061; +0EC3 0001 0E9A 0061; +0EC3 0001 0EA7 0061; +0EC4 0591 0E82 0061; +0EC4 0591 0E99 0061; +0EC4 0591 0EA5 0061; +0F69 0061; +0F43 0061; +0F95 0061; +0F99 0061; +0F4D 0061; +0F9F 0061; +0FA2 0061; +0FA5 0061; +0FA8 0061; +0F5C 0061; +0F5E 0061; +0F61 0061; +0FBC 0041; +0FB3 1D165 0F71 0061; +0F66 0041; +0FB8 0041; +0F71 0001 0F80 0061; +0F80 0041; +0334 0F75; +0FB2 0F71 0F80 003F; +0F78 0062; +0F7B 0021; +A840 0061; +A846 0061; +A848 0061; +A84E 0061; +A867 0061; +A86D 0061; +A86E 0061; +A862 0061; +A860 0061; +1902 0061; +1908 0061; +190E 0061; +1914 0061; +191A 0061; +1923 0061; +1929 0061; +1933 0061; +1700 0061; +1706 0061; +170C 0061; +1713 0061; +1724 0021; +172A 0021; +1730 0021; +1740 0041; +1746 0041; +174C 0041; +1752 0041; +1764 0041; +176A 0041; +1772 0041; +1A04 0041; +1A0A 0041; +1A10 0041; +1A16 0041; +1A1B 0062; +1005 0062; +100B 0062; +1011 0062; +1017 0062; +101D 0062; +1021 0062; +1027 003F; +1055 003F; +1031 003F; +1039 003F; +1784 0062; +178A 0062; +1790 0062; +1796 0062; +179C 0062; +17A2 0062; +17A7 0062; +17AD 0062; +17B3 0062; +17B9 0062; +17BF 0062; +17C5 0062; +1954 0061; +195A 0061; +1960 0061; +1966 0061; +196C 0061; +1974 0061; +1985 0061; +198B 0061; +1991 0061; +1997 0061; +19DE 0061; +19A1 0061; +19A7 0061; +19B3 0061; +19B9 0061; +19BF 0061; +19C5 0061; +1B05 1D165 1B35 0061; +1B09 003F; +1B0C 0061; +1B10 0061; +1B45 0062; +1B18 0062; +1B1E 0062; +1B23 0062; +1B28 0062; +1B2E 0062; +1B4A 0062; +1B38 0062; +1B3C 0591 1B35 0061; +1B3E 1B35 003F; +1B42 1B35 0061; +1883 0041; +1887 0041; +185E 0041; +1824 0041; +1849 0041; +1862 0041; +184C 0041; +1864 0041; +1830 0041; +18A4 0041; +1851 0041; +188B 0041; +1855 0041; +1839 0041; +1874 0041; +183D 0041; +186D 0041; +185B 0041; +189F 0041; +18A1 0041; +1895 0041; +18A9 0334; +13A5 003F; +13AB 003F; +13B1 003F; +13B7 003F; +13BD 003F; +13C3 003F; +13C9 003F; +13CF 003F; +13D5 003F; +13DB 003F; +13E1 003F; +13E7 003F; +13ED 003F; +13F3 003F; +1405 003F; +140B 003F; +1411 003F; +1417 003F; +141D 003F; +1423 003F; +1429 003F; +142F 003F; +1435 003F; +143B 003F; +1441 003F; +1447 003F; +144D 003F; +1453 003F; +1459 003F; +145F 003F; +1465 003F; +146B 003F; +1471 003F; +1477 003F; +147D 003F; +1483 003F; +1489 003F; +148F 003F; +1495 003F; +149B 003F; +14A1 003F; +14A7 003F; +14AD 003F; +14B3 003F; +14B9 003F; +14BF 003F; +14C5 003F; +14CB 003F; +14D1 003F; +14D7 003F; +14DD 003F; +14E3 003F; +14E9 003F; +14EF 003F; +14F5 003F; +14FB 003F; +1501 003F; +1507 003F; +150D 003F; +1513 003F; +1519 003F; +151F 003F; +1525 003F; +152B 003F; +1531 003F; +1537 003F; +153D 003F; +1543 003F; +1549 003F; +154F 003F; +1555 003F; +155B 003F; +1561 003F; +1567 003F; +156D 003F; +1573 003F; +1579 003F; +157F 003F; +1585 003F; +158B 003F; +1590 003F; +1671 003F; +1596 003F; +159C 003F; +15A2 003F; +15A7 003F; +15AD 003F; +15B3 003F; +15B9 003F; +15BF 003F; +15C5 003F; +15CB 003F; +15D1 003F; +15D7 003F; +15DD 003F; +15E3 003F; +15E9 003F; +15EF 003F; +15F5 003F; +15FB 003F; +1601 003F; +1607 003F; +160D 003F; +1613 003F; +1619 003F; +161F 003F; +1625 003F; +162B 003F; +1631 003F; +1637 003F; +163D 003F; +1643 003F; +1649 003F; +164F 003F; +1655 003F; +165B 003F; +1661 003F; +1667 003F; +1681 003F; +1687 003F; +168D 003F; +1693 003F; +1699 003F; +16A5 0041; +16A8 0041; +16B2 003F; +16B9 003F; +16BE 003F; +16C4 0061; +16D5 0061; +16CD 0041; +16D2 0061; +16EF 003F; +16DF 003F; +16B8 003F; +16E6 0061; +3200 0062; +AC00 0591 1161 0061; +AC04 0061; +FFA2 0062; +320F 0061; +FFA7 0062; +3139 0021; +3271 0062; +3212 0061; +FFB2 0062; +3145 0021; +3274 0062; +3207 0041; +321E 0062; +FFB8 0062; +3149 0041; +FFBA 0062; +320A 0041; +FFBC 003F; +314D 0021; +327A 0062; +327B 0021; +D788 1175 0021; +D7A2 0061; +3166 0041; +111A 0041; +3171 0041; +3144 0021; +3175 0041; +1128 0061; +3179 0021; +317C 0021; +1133 0061; +1138 0061; +113E 0061; +1143 0061; +1148 0061; +114D 0061; +1153 0061; +3185 0021; +1160 0041; +1162 0041; +1164 0041; +1166 0041; +1168 0041; +116A 0041; +116C 0041; +116E 0041; +1170 0041; +1172 0041; +1174 0041; +1177 0061; +117D 0061; +1183 0061; +1187 0061; +118C 0061; +318A 0041; +1195 0061; +119B 0061; +11A0 0061; +3133 0021; +11AC 0062; +313A 0021; +313C 0021; +313E 0021; +11B6 0061; +11BC 0061; +11C2 0061; +3167 0041; +3169 0021; +11D0 0061; +11D5 0061; +316D 0041; +11DE 0061; +11E3 0061; +11E9 0061; +11EF 0061; +11F3 0061; +11F9 0061; +30A2 0061; +3044 0021; +30A4 0062; +30A6 0334 3099; +FF73 0062; +3048 0061; +FF6B 0021; +FF6B 0062; +30AC 003F; +330C 0021; +304E 0334; +3310 0062; +3316 0062; +30AF 0061; +331A 0041; +331C 003F; +30B3 0021; +3054 0041; +30B5 0334 3099; +3320 0021; +30B7 0041; +30B9 0021; +3059 0062; +FF7E 0041; +32DE 003F; +305F 003F; +3060 0061; +30C1 0061; +3064 0334 3099; +30C3 0062; +FF83 0041; +3069 0334; +3326 003F; +3328 003F; +FF87 0021; +30CD 0041; +3329 003F; +3071 0021; +3070 0041; +32EA 003F; +32EA 0041; +3330 0061; +3076 0021; +32EB 0062; +30D8 003F; +333C 0021; +307A 0062; +31F9 003F; +3341 0041; +307C 0062; +32EE 0021; +3345 003F; +307F 0062; +3080 0041; +30E1 0041; +30E2 0041; +334F 0061; +FF6D 0021; +3350 003F; +32F5 0061; +FF97 0061; +31FC 0062; +308B 0041; +308C 0041; +FF9B 0021; +32FB 003F; +3357 0041; +32FD 003F; +30FA 003F; +FF9D 0062; +3108 0062; +310C 0062; +31AD 0062; +3112 0062; +3117 0061; +311B 0061; +31A5 0062; +3121 0062; +31B0 0062; +31B3 0062; +A001 0062; +A007 0062; +A00D 0062; +A013 0062; +A019 0062; +A01F 0062; +A025 0062; +A02B 0062; +A031 0062; +A037 0062; +A03D 0062; +A043 0062; +A049 0062; +A04F 0062; +A055 0062; +A05B 0062; +A061 0062; +A067 0062; +A06D 0062; +A073 0062; +A079 0062; +A07F 0062; +A085 0062; +A08B 0062; +A091 0062; +A097 0062; +A09D 0062; +A0A3 0062; +A0A9 0062; +A0AF 0062; +A0B5 0062; +A0BB 0062; +A0C1 0062; +A0C7 0062; +A0CD 0062; +A0D3 0062; +A0D9 0062; +A0DF 0062; +A0E5 0062; +A0EB 0062; +A0F1 0062; +A0F7 0062; +A0FD 0062; +A103 0062; +A109 0062; +A10F 0062; +A115 0062; +A11B 0062; +A121 0062; +A127 0062; +A12D 0062; +A133 0062; +A139 0062; +A13F 0062; +A145 0062; +A14B 0062; +A151 0062; +A157 0062; +A15D 0062; +A163 0062; +A169 0062; +A16F 0062; +A175 0062; +A17B 0062; +A181 0062; +A187 0062; +A18D 0062; +A193 0062; +A199 0062; +A19F 0062; +A1A5 0062; +A1AB 0062; +A1B1 0062; +A1B7 0062; +A1BD 0062; +A1C3 0062; +A1C9 0062; +A1CF 0062; +A1D5 0062; +A1DB 0062; +A1E1 0062; +A1E7 0062; +A1ED 0062; +A1F3 0062; +A1F9 0062; +A1FF 0062; +A205 0062; +A20B 0062; +A211 0062; +A217 0062; +A21D 0062; +A223 0062; +A229 0062; +A22F 0062; +A235 0062; +A23B 0062; +A241 0062; +A247 0062; +A24D 0062; +A253 0062; +A259 0062; +A25F 0062; +A265 0062; +A26B 0062; +A271 0062; +A277 0062; +A27D 0062; +A283 0062; +A289 0062; +A28F 0062; +A295 0062; +A29B 0062; +A2A1 0062; +A2A7 0062; +A2AD 0062; +A2B3 0062; +A2B9 0062; +A2BF 0062; +A2C5 0062; +A2CB 0062; +A2D1 0062; +A2D7 0062; +A2DD 0062; +A2E3 0062; +A2E9 0062; +A2EF 0062; +A2F5 0062; +A2FB 0062; +A301 0062; +A307 0062; +A30D 0062; +A313 0062; +A319 0062; +A31F 0062; +A325 0062; +A32B 0062; +A331 0062; +A337 0062; +A33D 0062; +A343 0062; +A349 0062; +A34F 0062; +A355 0062; +A35B 0062; +A361 0062; +A367 0062; +A36D 0062; +A373 0062; +A379 0062; +A37F 0062; +A385 0062; +A38B 0062; +A391 0062; +A397 0062; +A39D 0062; +A3A3 0062; +A3A9 0062; +A3AF 0062; +A3B5 0062; +A3BB 0062; +A3C1 0062; +A3C7 0062; +A3CD 0062; +A3D3 0062; +A3D9 0062; +A3DF 0062; +A3E5 0062; +A3EB 0062; +A3F1 0062; +A3F7 0062; +A3FD 0062; +A403 0062; +A409 0062; +A40F 0062; +A415 0062; +A41B 0062; +A421 0062; +A427 0062; +A42D 0062; +A433 0062; +A439 0062; +A43F 0062; +A445 0062; +A44B 0062; +A451 0062; +A457 0062; +A45D 0062; +A463 0062; +A469 0062; +A46F 0062; +A475 0062; +A47B 0062; +A481 0062; +A487 0062; +10300 0062; +10306 0062; +1030C 0062; +10312 0062; +10318 0062; +1031E 0062; +10335 0062; +1033B 0062; +10341 0062; +10347 0062; +10429 0061; +1042C 0061; +1042F 0061; +10432 0061; +10435 0061; +10438 0061; +1043B 0061; +1043E 0061; +10441 0061; +10444 0061; +10447 0061; +1044A 0061; +1044D 0061; +10450 0062; +10456 0062; +1045C 0062; +10462 0062; +10468 0062; +1046E 0062; +10474 0062; +1047A 0062; +10480 0062; +10486 0062; +1048C 0062; +10492 0062; +10498 0062; +10000 0062; +10006 0062; +1000D 0062; +10013 0062; +10019 0062; +1001F 0062; +10025 0062; +1002C 0062; +10032 0062; +10038 0062; +10040 0062; +10046 0062; +1004C 0062; +10054 0062; +1005A 0062; +10082 0062; +10088 0062; +1008E 0062; +10094 0062; +1009A 0062; +100A0 0062; +100A6 0062; +100AC 0062; +100B2 0062; +100B8 0062; +100BE 0062; +100C4 0062; +100CA 0062; +100D0 0062; +100D6 0062; +100DC 0062; +100E2 0062; +100E8 0062; +100EE 0062; +100F4 0062; +100FA 0062; +10805 0062; +1080E 0062; +10814 0062; +1081A 0062; +10820 0062; +10826 0062; +1082C 0062; +10832 0062; +1083C 0062; +10384 0062; +1038A 0062; +10390 0062; +10396 0062; +1039C 0062; +103A4 0062; +103AA 0062; +103B0 0062; +103B6 0062; +103BC 0062; +103C2 0062; +103CC 0062; +12002 0062; +12008 0062; +1200E 0062; +12014 0062; +1201A 0062; +12020 0062; +12026 0062; +1202C 0062; +12032 0062; +12038 0062; +1203E 0062; +12044 0062; +1204A 0062; +12050 0062; +12056 0062; +1205C 0062; +12062 0062; +12068 0062; +1206E 0062; +12074 0062; +1207A 0062; +12080 0062; +12086 0062; +1208C 0062; +12092 0062; +12098 0062; +1209E 0062; +120A4 0062; +120AA 0062; +120B0 0062; +120B6 0062; +120BC 0062; +120C2 0062; +120C8 0062; +120CE 0062; +120D4 0062; +120DA 0062; +120E0 0062; +120E6 0062; +120EC 0062; +120F2 0062; +120F8 0062; +120FE 0062; +12104 0062; +1210A 0062; +12110 0062; +12116 0062; +1211C 0062; +12122 0062; +12128 0062; +1212E 0062; +12134 0062; +1213A 0062; +12140 0062; +12146 0062; +1214C 0062; +12152 0062; +12158 0062; +1215E 0062; +12164 0062; +1216A 0062; +12170 0062; +12176 0062; +1217C 0062; +12182 0062; +12188 0062; +1218E 0062; +12194 0062; +1219A 0062; +121A0 0062; +121A6 0062; +121AC 0062; +121B2 0062; +121B8 0062; +121BE 0062; +121C4 0062; +121CA 0062; +121D0 0062; +121D6 0062; +121DC 0062; +121E2 0062; +121E8 0062; +121EE 0062; +121F4 0062; +121FA 0062; +12200 0062; +12206 0062; +1220C 0062; +12212 0062; +12218 0062; +1221E 0062; +12224 0062; +1222A 0062; +12230 0062; +12236 0062; +1223C 0062; +12242 0062; +12248 0062; +1224E 0062; +12254 0062; +1225A 0062; +12260 0062; +12266 0062; +1226C 0062; +12272 0062; +12278 0062; +1227E 0062; +12284 0062; +1228A 0062; +12290 0062; +12296 0062; +1229C 0062; +122A2 0062; +122A8 0062; +122AE 0062; +122B4 0062; +122BA 0062; +122C0 0062; +122C6 0062; +122CC 0062; +122D2 0062; +122D8 0062; +122DE 0062; +122E4 0062; +122EA 0062; +122F0 0062; +122F6 0062; +122FC 0062; +12302 0062; +12308 0062; +1230E 0062; +12314 0062; +1231A 0062; +12320 0062; +12326 0062; +1232C 0062; +12332 0062; +12338 0062; +1233E 0062; +12344 0062; +1234A 0062; +12350 0062; +12356 0062; +1235C 0062; +12362 0062; +12368 0062; +1236E 0062; +4E01 0061; +4E04 0062; +3196 0062; +2F01 0062; +2E80 0062; +2E84 0021; +3288 0062; +3193 0061; +2F08 0061; +F9A8 0062; +FA73 0062; +F965 0062; +F9BB 0062; +FA74 0062; +2F814 0062; +3285 0021; +2E86 0062; +32A2 0062; +F92E 0062; +2E87 0062; +2F81E 0062; +2F820 0062; +2F12 0062; +2F825 0062; +2F827 0062; +2F82A 0062; +32A9 0062; +3039 0062; +32AF 0062; +329E 0062; +2F833 0062; +2F836 0062; +32A8 0062; +2F83D 0062; +2F840 0062; +2F844 0062; +FA36 0061; +FA7B 0062; +2F1E 0062; +2F84D 0062; +2F852 0062; +FA10 0061; +F94A 0062; +2F21 0062; +2F85E 0062; +F909 0062; +2F865 0062; +2F986 0062; +323B 0061; +2F86E 0062; +2F28 0062; +2E90 003F; +2F2B 0062; +2F2C 0021; +F9D5 0062; +2F9F4 0062; +32A7 0062; +2F886 0062; +2F33 0062; +F9A2 0062; +F982 0062; +2F38 0062; +2F874 0062; +F9D8 0062; +2E96 0062; +F9AC 0062; +F9B9 0062; +FA87 0061; +FA3F 0041; +2F8AF 0062; +F990 0062; +2F3E 0062; +F95B 0062; +2F8B7 0062; +FA8D 0062; +2F8C3 0062; +2F40 0062; +2F8C9 0062; +2F45 0062; +3290 0021; +337C 0062; +2F8CF 0062; +2F8CC 0062; +3232 0061; +2F8D9 0062; +2F8DC 0062; +F9C9 0062; +337F 0062; +F9E2 0062; +F914 0041; +F91D 0062; +2F8F3 0062; +F9A5 0062; +2F4F 0062; +2F53 0062; +2F8FA 0062; +F9E3 0062; +2F900 0062; +FA45 0061; +F9D6 0062; +F9EC 0062; +F94E 0062; +F922 0062; +2F917 0062; +2F919 0062; +2F91C 0062; +F9EE 0062; +2EA4 0041; +2F59 0062; +F946 0062; +2EA8 0062; +F9A7 0062; +2F929 0061; +F9CC 0062; +2F930 0062; +2F61 0062; +2F65 0062; +F976 0062; +F9E5 0062; +2F68 0062; +FAA7 0062; +FAA8 0061; +FAAA 0062; +2F6E 0062; +FA4B 0062; +2F70 0061; +3293 0062; +3297 0021; +F93C 0062; +2F71 0062; +FA54 0061; +FAAC 0062; +F9F8 0062; +F944 0062; +FA03 0062; +2F96A 0062; +F93D 0062; +2F96F 0062; +2F78 0062; +2EB3 0041; +2EB7 0021; +FA1E 0061; +FAB2 003F; +F9B0 0062; +2EBB 0062; +2F982 0062; +3242 0061; +2EBD 0062; +2F88 0062; +2EC0 003F; +2F991 0062; +2F996 0062; +2F99A 0062; +2F9A3 0062; +FA5F 0061; +2F9AA 0062; +F91F 0062; +2F9B4 0062; +2F9BA 0062; +2F9BE 0062; +FA08 0061; +F9A0 0062; +2F9C9 0062; +2EC3 0062; +2EC5 0062; +F96F 0061; +FABE 0061; +FA62 0061; +FAC0 0061; +2F9D2 0061; +2F9D4 0062; +FA64 0062; +2F9B 0062; +F937 0062; +F998 0062; +2ECB 0062; +2ECD 0021; +FA67 0062; +2ECF 0062; +2F9E6 0062; +F9E9 0061; +328E 0062; +2F9E9 0062; +2ED1 0061; +F986 0062; +F9C6 0062; +F9DC 0062; +F9EA 0062; +F949 0062; +FA1C 0061; +FAC9 0062; +FACA 0062; +F9B4 0062; +2FB5 0062; +2EDF 0061; +2FA04 0062; +2FBA 0062; +2FBB 0061; +2FBE 0062; +F939 0062; +2FA0F 0062; +2EE7 0062; +2EE8 0062; +F989 0062; +2EEA 0062; +2FCF 0062; +2EEC 0062; +2EEF 0062; +2FD4 0041; +9FA1 0062; +FA0F 0062; +FA23 0062; +3401 0062; +3407 0062; +340D 0062; +3413 0062; +3419 0062; +341F 0062; +3425 0062; +342B 0062; +3431 0062; +3437 0062; +343D 0062; +3443 0062; +3449 0062; +344F 0062; +3455 0062; +345B 0062; +3461 0062; +3467 0062; +346D 0062; +3473 0062; +3479 0062; +347F 0062; +3485 0062; +348B 0062; +3491 0062; +3497 0062; +349D 0062; +34A2 0062; +34A8 0062; +34AE 0062; +34B4 0062; +2F813 0062; +34BE 0062; +34C4 0062; +34CA 0062; +34D0 0062; +34D6 0062; +34DC 0062; +34E1 0062; +34E7 0062; +34ED 0062; +34F3 0062; +34F9 0062; +34FF 0062; +3505 0062; +350B 0062; +3511 0062; +3516 0062; +351C 0062; +3522 0062; +3528 0062; +352E 0062; +3534 0062; +353A 0062; +3540 0062; +3546 0062; +354C 0062; +3552 0062; +3558 0062; +355E 0062; +3564 0062; +356A 0062; +3570 0062; +3576 0062; +357C 0062; +3582 0062; +3588 0062; +358E 0062; +3594 0062; +359A 0062; +35A0 0062; +35A6 0062; +35AC 0062; +35B2 0062; +35B8 0062; +35BE 0062; +35C4 0062; +35CA 0062; +35D0 0062; +35D6 0062; +35DC 0062; +35E2 0062; +35E8 0062; +35EE 0062; +35F4 0062; +35FA 0062; +3600 0062; +3606 0062; +360C 0062; +3612 0062; +3618 0062; +361E 0062; +3624 0062; +362A 0062; +3630 0062; +3636 0062; +363C 0062; +3642 0062; +3648 0062; +364E 0062; +3654 0062; +365A 0062; +3660 0062; +3666 0062; +366C 0062; +3672 0062; +3678 0062; +367E 0062; +3684 0062; +368A 0062; +3690 0062; +3696 0062; +369C 0062; +36A2 0062; +36A8 0062; +36AE 0062; +36B4 0062; +36BA 0062; +36C0 0062; +36C6 0062; +36CC 0062; +36D2 0062; +36D8 0062; +36DE 0062; +36E4 0062; +36EA 0062; +36EF 0062; +36F5 0062; +36FB 0062; +3700 0062; +3706 0062; +370C 0062; +3712 0062; +3718 0062; +371E 0062; +3724 0062; +372A 0062; +3730 0062; +3736 0062; +373C 0062; +3742 0062; +3748 0062; +374E 0062; +3754 0062; +375A 0062; +3760 0062; +3766 0062; +376C 0062; +3772 0062; +3778 0062; +377E 0062; +3783 0062; +3789 0062; +378F 0062; +3795 0062; +379B 0062; +37A1 0062; +37A7 0062; +37AD 0062; +37B3 0062; +37B9 0062; +37BF 0062; +37C5 0062; +37CB 0062; +37D1 0062; +37D7 0062; +37DD 0062; +37E3 0062; +37E9 0062; +37EF 0062; +37F5 0062; +37FB 0062; +3801 0062; +3807 0062; +380D 0062; +3813 0062; +3819 0062; +381F 0062; +3825 0062; +382B 0062; +3830 0062; +3836 0062; +383C 0062; +3842 0062; +3848 0062; +384E 0062; +3854 0062; +385A 0062; +3860 0062; +3865 0062; +386B 0062; +3871 0062; +3877 0062; +2F88A 0062; +3882 0062; +3888 0062; +388E 0062; +3894 0062; +389A 0062; +38A0 0062; +38A6 0062; +38AC 0062; +38B2 0062; +38B8 0062; +38BE 0062; +38C4 0062; +38C9 0062; +38CF 0062; +38D5 0062; +38DB 0062; +38E1 0062; +38E6 0062; +38EC 0062; +38F2 0062; +38F8 0062; +38FE 0062; +3904 0062; +390A 0062; +3910 0062; +3916 0062; +391C 0061; +3921 0062; +3927 0062; +392D 0062; +3933 0062; +3939 0062; +393E 0062; +3944 0062; +394A 0062; +3950 0062; +3956 0062; +395C 0062; +3962 0062; +3968 0062; +396E 0062; +3974 0062; +397A 0062; +3980 0062; +3986 0062; +398C 0062; +3992 0062; +3998 0062; +399E 0062; +39A4 0062; +39AA 0062; +39B0 0062; +39B6 0062; +39BC 0062; +39C2 0062; +39C8 0062; +39CE 0062; +39D4 0062; +39DA 0062; +39E0 0062; +39E6 0062; +39EC 0062; +39F2 0062; +39F8 0062; +39FE 0062; +3A04 0062; +3A0A 0062; +3A10 0062; +3A16 0062; +3A1C 0062; +3A22 0062; +3A28 0062; +3A2E 0061; +3A33 0062; +3A39 0062; +3A3F 0062; +3A45 0062; +3A4B 0062; +3A51 0062; +3A57 0062; +3A5D 0062; +3A63 0062; +3A69 0062; +3A6E 0062; +3A74 0062; +3A7A 0062; +3A80 0062; +3A86 0062; +3A8C 0062; +3A92 0062; +3A98 0062; +3A9E 0062; +3AA4 0062; +3AAA 0062; +3AB0 0062; +3AB6 0062; +3ABC 0062; +3AC2 0062; +3AC8 0062; +3ACE 0062; +3AD4 0062; +3ADA 0062; +3AE0 0062; +3AE5 0062; +3AEB 0062; +3AF1 0062; +3AF7 0062; +3AFD 0062; +3B03 0062; +2F8D0 0062; +3B0E 0062; +3B14 0062; +2F8CE 0062; +3B1F 0062; +3B25 0062; +3B2B 0062; +3B31 0062; +3B37 0062; +3B3D 0062; +3B43 0062; +3B49 0061; +3B4E 0062; +3B54 0062; +3B5A 0062; +3B60 0062; +3B66 0062; +3B6C 0062; +3B72 0062; +3B78 0062; +3B7E 0062; +3B84 0062; +3B8A 0062; +3B90 0062; +3B96 0062; +3B9C 0062; +3BA0 0062; +3BA6 0062; +3BAC 0062; +3BB2 0062; +3BB8 0062; +3BBE 0062; +3BC4 0062; +3BCA 0062; +3BD0 0062; +3BD6 0062; +3BDC 0062; +3BE2 0062; +3BE8 0062; +3BEE 0062; +3BF4 0062; +3BFA 0062; +3C00 0062; +3C06 0062; +3C0C 0062; +3C12 0062; +3C18 0061; +3C1D 0062; +3C23 0062; +3C29 0062; +3C2F 0062; +3C35 0062; +3C3B 0062; +3C41 0062; +3C47 0062; +3C4D 0062; +3C52 0062; +3C58 0062; +3C5E 0062; +3C64 0062; +3C6A 0062; +3C70 0062; +3C76 0062; +3C7C 0062; +3C82 0062; +3C88 0062; +3C8E 0062; +3C94 0062; +3C9A 0062; +3CA0 0062; +3CA6 0062; +3CAC 0062; +3CB2 0062; +3CB8 0062; +3CBE 0062; +3CC4 0062; +3CCA 0062; +3CD0 0062; +3CD6 0062; +3CDC 0062; +3CE2 0062; +3CE8 0062; +3CEE 0062; +3CF4 0062; +3CFA 0062; +3D00 0062; +3D06 0062; +3D0C 0062; +3D12 0062; +3D18 0062; +3D1E 0062; +3D24 0062; +3D2A 0062; +3D30 0062; +3D35 0062; +3D3B 0062; +3D41 0062; +3D47 0062; +3D4D 0062; +3D53 0062; +3D59 0062; +3D5F 0062; +3D65 0062; +3D6B 0062; +3D71 0062; +3D77 0062; +3D7D 0062; +3D83 0062; +3D89 0062; +3D8F 0062; +3D95 0062; +3D9A 0062; +3DA0 0062; +3DA6 0062; +3DAC 0062; +3DB2 0062; +3DB8 0062; +3DBE 0062; +3DC4 0062; +3DCA 0062; +3DD0 0062; +3DD6 0062; +3DDC 0062; +3DE2 0062; +3DE8 0062; +3DEE 0062; +3DF4 0062; +3DFA 0062; +3E00 0062; +3E06 0062; +3E0C 0062; +3E12 0062; +3E18 0062; +3E1E 0062; +3E24 0062; +3E2A 0062; +3E30 0062; +3E36 0062; +3E3C 0062; +3E42 0062; +3E48 0062; +3E4E 0062; +3E54 0062; +3E5A 0062; +3E60 0062; +3E66 0062; +3E6C 0062; +3E72 0062; +3E78 0062; +3E7E 0062; +3E84 0062; +3E8A 0062; +3E90 0062; +3E96 0062; +3E9C 0062; +3EA2 0062; +3EA8 0062; +3EAD 0062; +3EB3 0062; +3EB8 0041; +3EBD 0062; +3EC3 0062; +3EC9 0062; +3ECF 0062; +3ED5 0062; +3EDB 0062; +3EE1 0062; +3EE7 0062; +3EED 0062; +3EF3 0062; +3EF9 0062; +3EFF 0062; +3F05 0062; +3F0B 0062; +3F11 0062; +3F17 0062; +3F1C 0062; +3F22 0062; +3F28 0062; +3F2E 0062; +3F34 0062; +3F3A 0062; +3F40 0062; +3F46 0062; +3F4C 0062; +3F52 0062; +3F58 0062; +3F5E 0062; +3F64 0062; +3F6A 0062; +3F70 0062; +3F76 0062; +3F7C 0062; +3F82 0062; +3F88 0062; +3F8E 0062; +3F94 0062; +3F9A 0062; +3FA0 0062; +3FA6 0062; +3FAC 0062; +3FB2 0062; +3FB8 0062; +3FBE 0062; +3FC4 0062; +3FCA 0062; +3FD0 0062; +3FD6 0062; +3FDC 0062; +3FE2 0062; +3FE8 0062; +3FEE 0062; +3FF4 0062; +3FFA 0062; +3FFF 0062; +4005 0062; +400A 0062; +4010 0062; +4016 0062; +401B 0062; +4021 0062; +4027 0062; +402D 0062; +4033 0062; +FAD4 003F; +403D 0062; +4043 0062; +4048 0062; +404E 0062; +4054 0062; +405A 0062; +4060 0062; +4066 0062; +406C 0062; +4072 0062; +4078 0062; +407E 0062; +4084 0062; +408A 0062; +4090 0062; +4096 0061; +409B 0062; +40A1 0062; +40A7 0062; +40AD 0062; +40B3 0062; +40B9 0062; +40BF 0062; +40C5 0062; +40CB 0062; +40D1 0062; +40D7 0062; +40DD 0062; +40E3 0061; +40E8 0062; +40EE 0062; +40F4 0062; +40FA 0062; +4100 0062; +4106 0062; +410C 0062; +4112 0062; +4118 0062; +411E 0062; +4124 0062; +412A 0062; +2F958 0062; +4135 0062; +413B 0062; +4141 0062; +4147 0062; +414D 0062; +4153 0062; +4159 0062; +415F 0062; +4165 0062; +416B 0062; +4171 0062; +4177 0062; +417D 0062; +4183 0062; +4189 0062; +418F 0062; +4195 0062; +419B 0062; +41A1 0062; +41A7 0062; +41AD 0062; +41B3 0062; +41B9 0062; +41BF 0062; +41C5 0062; +41CB 0062; +41D1 0062; +41D7 0062; +41DD 0062; +41E3 0062; +41E9 0062; +41EF 0062; +41F5 0062; +41FB 0062; +4201 0062; +4206 0062; +420C 0062; +4212 0062; +4218 0062; +421E 0062; +4224 0062; +4229 0062; +422F 0062; +4235 0062; +423B 0062; +4241 0062; +4247 0062; +424D 0062; +4253 0062; +4259 0062; +425F 0062; +4265 0062; +426B 0062; +4271 0062; +4277 0062; +427D 0062; +4283 0062; +4289 0062; +428F 0062; +4295 0062; +429B 0062; +2F967 0062; +42A6 0062; +42AC 0062; +42B2 0062; +42B8 0062; +42BE 0062; +42C4 0062; +42CA 0062; +42D0 0062; +42D6 0062; +42DC 0062; +42E2 0062; +42E8 0062; +42EE 0062; +42F4 0062; +42FA 0062; +4300 0062; +4305 0062; +430B 0062; +4311 0062; +4317 0062; +431D 0062; +4323 0062; +4329 0062; +432F 0062; +2F971 0062; +433A 0062; +4340 0062; +4346 0062; +434C 0062; +4352 0062; +4358 0062; +435D 0062; +4363 0062; +4369 0062; +436F 0062; +4375 0062; +437B 0062; +4381 0062; +4387 0062; +438D 0062; +4393 0062; +4399 0062; +439F 0062; +43A5 0062; +43AB 0062; +43B1 0062; +43B7 0062; +43BD 0062; +43C3 0062; +43C9 0062; +43CF 0062; +43D5 0061; +2F8D7 0062; +43DF 0062; +43E5 0062; +43EB 0062; +43F1 0062; +43F7 0062; +43FD 0062; +4403 0062; +4409 0062; +440E 0062; +4414 0062; +441A 0062; +4420 0062; +4426 0062; +442C 0062; +4432 0062; +4438 0062; +443E 0062; +4444 0062; +444A 0062; +4450 0062; +4456 0062; +445C 0062; +4462 0062; +4468 0062; +446D 0062; +4473 0062; +4479 0062; +447F 0062; +4485 0062; +448B 0062; +4491 0062; +4497 0062; +449D 0062; +44A3 0062; +44A9 0062; +44AF 0062; +44B5 0062; +44BB 0062; +44C1 0062; +44C7 0062; +44CD 0062; +44D3 0062; +44D9 0062; +44DF 0062; +44E5 0062; +44EB 0062; +44F1 0062; +44F7 0062; +44FD 0062; +4503 0062; +4509 0062; +450F 0062; +4515 0062; +451B 0062; +4521 0062; +4527 0062; +452C 0062; +4532 0062; +4538 0062; +453E 0062; +4544 0062; +454A 0062; +4550 0062; +4556 0062; +455C 0062; +4561 0061; +4566 0062; +2F9B2 0062; +4571 0062; +4577 0062; +457D 0062; +4583 0062; +4589 0062; +458F 0062; +4595 0062; +459B 0062; +45A1 0062; +45A7 0062; +45AD 0062; +45B3 0062; +45B9 0062; +45BF 0062; +45C5 0062; +45CB 0062; +45D1 0062; +45D7 0061; +45DC 0062; +45E2 0062; +45E8 0062; +45EE 0062; +45F4 0062; +2F9C2 0062; +45FF 0062; +4605 0062; +460B 0062; +4611 0062; +4617 0062; +461D 0062; +4623 0062; +4629 0062; +462F 0062; +4635 0061; +463A 0062; +4640 0062; +4646 0062; +464C 0062; +4652 0062; +4658 0062; +465E 0062; +4664 0062; +466A 0062; +4670 0062; +4676 0062; +467C 0062; +4682 0062; +4688 0062; +468E 0062; +4694 0062; +469A 0062; +46A0 0062; +46A6 0062; +46AC 0062; +46B2 0062; +46B8 0062; +46BE 0061; +46C3 0062; +46C8 0062; +46CE 0062; +46D4 0062; +46DA 0062; +46E0 0062; +46E6 0062; +46EC 0062; +46F2 0062; +46F8 0062; +46FE 0062; +4704 0062; +470A 0062; +4710 0062; +4716 0062; +471C 0062; +4722 0062; +4728 0062; +472E 0062; +4734 0062; +473A 0062; +4740 0062; +4746 0062; +474C 0062; +4752 0062; +4758 0062; +475E 0062; +4764 0062; +476A 0062; +4770 0062; +4776 0062; +477C 0062; +4782 0062; +4788 0062; +478E 0062; +4794 0062; +479A 0062; +47A0 0062; +47A6 0062; +47AC 0062; +47B2 0062; +47B8 0062; +47BE 0062; +47C4 0062; +47CA 0062; +47D0 0062; +47D6 0062; +47DC 0062; +47E2 0062; +47E8 0062; +47EE 0062; +47F4 0062; +47FA 0062; +4800 0062; +4806 0062; +480C 0062; +4812 0062; +4818 0062; +481E 0062; +4824 0062; +482A 0062; +4830 0062; +4836 0062; +483C 0062; +4842 0062; +4848 0062; +484E 0062; +4854 0062; +485A 0062; +4860 0062; +4866 0062; +486C 0062; +4872 0062; +4878 0062; +487E 0062; +4884 0062; +488A 0062; +4890 0062; +4896 0062; +489C 0062; +48A2 0062; +48A8 0062; +48AE 0062; +48B4 0062; +48BA 0062; +48C0 0062; +48C6 0062; +48CC 0062; +48D2 0062; +48D8 0062; +48DE 0062; +48E4 0062; +48EA 0062; +48F0 0062; +48F6 0062; +48FC 0062; +4902 0062; +4908 0062; +490E 0062; +4914 0062; +491A 0062; +4920 0062; +4926 0062; +492C 0062; +4932 0062; +4938 0062; +493E 0062; +4944 0062; +494A 0062; +4950 0062; +4956 0062; +495C 0062; +4962 0062; +4968 0062; +496E 0062; +4974 0062; +497A 0062; +4980 0062; +4986 0062; +498C 0062; +4992 0062; +4997 0062; +499D 0062; +49A3 0062; +49A9 0062; +49AF 0062; +49B5 0062; +49BB 0062; +49C1 0062; +49C7 0062; +49CD 0062; +49D3 0062; +49D9 0062; +49DF 0062; +49E5 0062; +49EA 0062; +49F0 0062; +49F6 0062; +49FC 0062; +4A02 0062; +4A08 0062; +4A0E 0062; +4A14 0062; +4A1A 0062; +4A20 0062; +4A26 0062; +4A2C 0062; +4A32 0062; +4A38 0062; +4A3E 0062; +4A44 0062; +4A4A 0062; +4A50 0062; +4A56 0062; +4A5C 0062; +4A62 0062; +4A68 0062; +4A6E 0061; +4A73 0062; +4A78 0062; +4A7E 0062; +4A84 0062; +4A8A 0062; +4A90 0062; +4A96 0062; +4A9C 0062; +4AA2 0062; +4AA8 0062; +4AAE 0062; +4AB3 0062; +4AB9 0062; +4ABF 0062; +4AC5 0062; +4ACB 0062; +4AD1 0062; +4AD7 0062; +4ADD 0062; +4AE3 0062; +4AE9 0062; +4AEF 0062; +4AF5 0062; +4AFB 0062; +4B01 0062; +4B07 0062; +4B0D 0062; +4B13 0062; +4B19 0062; +4B1F 0062; +4B25 0062; +4B2B 0062; +4B31 0062; +4B36 0062; +4B3C 0062; +4B42 0062; +4B48 0062; +4B4E 0062; +4B54 0062; +4B5A 0062; +4B60 0062; +4B66 0062; +4B6C 0062; +4B72 0062; +4B78 0062; +4B7E 0062; +4B84 0062; +4B8A 0062; +4B90 0062; +4B96 0062; +4B9C 0062; +4BA2 0062; +4BA8 0062; +4BAE 0062; +4BB4 0062; +4BBA 0062; +4BC0 0062; +4BC6 0062; +4BCC 0062; +4BD1 0062; +4BD7 0062; +4BDD 0062; +4BE3 0062; +4BE9 0062; +4BEF 0062; +4BF5 0062; +4BFB 0062; +4C01 0062; +4C07 0062; +4C0D 0062; +4C13 0062; +4C19 0062; +4C1F 0062; +4C25 0062; +4C2B 0062; +4C31 0062; +4C37 0062; +4C3D 0062; +4C43 0062; +4C49 0062; +4C4F 0062; +4C55 0062; +4C5B 0062; +4C61 0062; +4C67 0062; +4C6D 0062; +4C73 0062; +4C79 0062; +4C7F 0062; +4C85 0062; +4C8B 0062; +4C91 0062; +4C97 0062; +4C9D 0062; +4CA3 0062; +4CA9 0062; +4CAF 0062; +4CB5 0062; +4CBB 0062; +4CC1 0062; +4CC7 0062; +4CCD 0062; +4CD2 0062; +4CD8 0062; +4CDE 0062; +4CE4 0062; +4CEA 0062; +4CEF 0062; +4CF5 0062; +4CFA 0062; +4D00 0062; +4D06 0062; +4D0C 0062; +4D12 0062; +4D18 0062; +4D1E 0062; +4D24 0062; +4D2A 0062; +4D30 0062; +4D36 0062; +4D3C 0062; +4D42 0062; +4D48 0062; +4D4E 0062; +4D54 0062; +4D59 0062; +4D5F 0062; +4D65 0062; +4D6B 0062; +4D71 0062; +4D77 0062; +4D7D 0062; +4D83 0062; +4D89 0062; +4D8F 0062; +4D95 0062; +4D9B 0062; +4DA1 0062; +4DA7 0062; +4DAD 0062; +4DB3 0062; +20003 0062; +2F816 0062; +2F859 0062; +2F87B 0062; +2F8A4 0062; +2F897 0062; +2F8E3 0062; +2F906 0062; +2F923 0062; +2F93C 0062; +FAD5 0062; +2F95D 0061; +2F898 0062; +2F97C 0062; +2F9A6 0062; +2F9C5 0062; +2F9E0 0062; +2F81C 0062; +2FA10 0062; +2A6D1 0062; +0370 0062; +E005 0062; +F8FF 0062; +E0003 0062; +F0003 0062; +F00FB 0062; +FFF03 0062; +FFFFB 0062; +100003 0062; +1000FB 0062; +10FF03 0062; +10FFFB 0062; diff --git a/Build/source/libs/icu-xetex/test/testdata/DataDrivenCollationTest.txt b/Build/source/libs/icu-xetex/test/testdata/DataDrivenCollationTest.txt index ad4f7095977..511f7f21c36 100644 --- a/Build/source/libs/icu-xetex/test/testdata/DataDrivenCollationTest.txt +++ b/Build/source/libs/icu-xetex/test/testdata/DataDrivenCollationTest.txt @@ -1,6 +1,6 @@ // Copyright (c) 2001-2005 International Business Machines // Corporation and others. All Rights Reserved. -DataDrivenCollationTest { +DataDrivenCollationTest:table(nofallback) { Info { Headers { "sequence" } Description { "These are the data driven tests" } diff --git a/Build/source/libs/icu-xetex/test/testdata/Makefile.in b/Build/source/libs/icu-xetex/test/testdata/Makefile.in index 102e3dc2912..bddd464043c 100644 --- a/Build/source/libs/icu-xetex/test/testdata/Makefile.in +++ b/Build/source/libs/icu-xetex/test/testdata/Makefile.in @@ -1,6 +1,6 @@ #****************************************************************************** # -# Copyright (C) 1998-2005, International Business Machines +# Copyright (C) 1998-2006, International Business Machines # Corporation and others. All Rights Reserved. # #****************************************************************************** @@ -24,8 +24,8 @@ CLEANFILES = *~ SUBDIRS = ## List of phony targets -.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \ -install-recursive clean clean-local clean-recursive distclean \ +.PHONY : all all-local all-recursive install install-local \ +install-recursive clean clean-local clean-recursive distclean \ distclean-local distclean-recursive doc dist dist-local dist-recursive \ check check-local check-recursive build-dir @@ -35,12 +35,12 @@ check check-local check-recursive build-dir .SUFFIXES : ## List of standard targets -all: all-local all-recursive -install: install-recursive install-local -clean: clean-recursive clean-local -distclean : distclean-recursive distclean-local -dist: dist-recursive dist-local -check: all check-recursive check-local +all: all-local +install: install-local +clean: clean-local +distclean : distclean-local +dist: dist-local +check: all check-local all-local: build-dir build-testdata testdata packagetest @@ -83,13 +83,17 @@ OUTTMPDIR=$(top_builddir)/data/out/tmp BUILDDIR=$(OUTDIR)/build/$(ICUDATA_PLATFORM_NAME) TESTSRCDATADIR=$(top_srcdir)/test/testdata TESTOUTDIR=$(top_builddir)/test/testdata/out -BUILD_DIRS = $(TESTOUTDIR) $(TESTBUILDDIR) +BUILD_DIRS = $(TESTOUTDIR) $(TESTBUILDDIR) $(TESTOUTDIR)/$(TESTDT) ifeq ($(PKGDATA_MODE),common) ICU_DATA_OPT = -i $(OUTDIR) else ifeq ($(PKGDATA_MODE),dll) +ifneq ($(ENABLE_SHARED),YES) +ICU_DATA_OPT = -i $(BUILDDIR) +else ICU_DATA_OPT = +endif else ICU_DATA_OPT = -i $(BUILDDIR) endif @@ -102,89 +106,93 @@ PKGDATA_INVOKE:=$(INVOKE) $(PKGDATA_INVOKE_OPTS) TESTBUILDDIR=$(TESTOUTDIR)/build # unpackaged files - live in 'out' so that the path can find them as part of the pkg -UNPACKAGEDTESTDATA=$(TESTOUTDIR)/$(TESTDT)nam.typ +UNPACKAGEDTESTDATA=$(TESTOUTDIR)/$(TESTDT)/nam.typ # pkg name for testdata TESTDATA=testdata # prefix for files that are testdata -TESTDT=$(TESTDATA)_ +TESTDT=$(TESTDATA) # File definitions -TEST_DAT_FILES=$(TESTBUILDDIR)/$(TESTDT)test.icu $(TESTBUILDDIR)/$(TESTDT)nfscsi.spp $(TESTBUILDDIR)/$(TESTDT)nfscss.spp $(TESTBUILDDIR)/$(TESTDT)nfscis.spp $(TESTBUILDDIR)/$(TESTDT)nfsmxs.spp $(TESTBUILDDIR)/$(TESTDT)nfsmxp.spp +TEST_DAT_FILES=$(TESTBUILDDIR)/test.icu +TEST_SPP_FILES=$(TESTBUILDDIR)/nfscsi.spp $(TESTBUILDDIR)/nfscss.spp $(TESTBUILDDIR)/nfscis.spp $(TESTBUILDDIR)/nfsmxs.spp $(TESTBUILDDIR)/nfsmxp.spp TEST_UCM_SOURCE= test1.ucm test3.ucm test4.ucm test4x.ucm ibm9027.ucm TEST_UCM_FILES=$(TEST_UCM_SOURCE:%=$(TESTSRCDATADIR)/data/%) -TEST_CNV_FILES=$(TEST_UCM_SOURCE:%.ucm=$(TESTBUILDDIR)/$(TESTDT)%.cnv) +TEST_CNV_FILES=$(TEST_UCM_SOURCE:%.ucm=$(TESTBUILDDIR)/%.cnv) TEST_RES = casing.txt mc.txt root.txt sh.txt sh_YU.txt te.txt te_IN.txt te_IN_REVISED.txt testtypes.txt testaliases.txt testempty.txt structLocale.txt DataDrivenCollationTest.txt idna_rules.txt conversion.txt icuio.txt testtable32.txt -TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/$(TESTDT)%.res) $(TESTBUILDDIR)/$(TESTDT)iscii.res $(TESTSRCDATADIR)/$(TESTDT)icu26_testtypes.res $(TESTSRCDATADIR)/$(TESTDT)icu26e_testtypes.res +TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/%.res) $(TESTBUILDDIR)/iscii.res $(TESTBUILDDIR)/icu26_testtypes.res $(TESTBUILDDIR)/icu26e_testtypes.res -ALL_TEST_FILES = $(TEST_DAT_FILES) $(TEST_BRK_FILES) $(TEST_CNV_FILES) $(TEST_RES_FILES) $(TESTOUTDIR)/$(TESTDT)nam.typ +ALL_TEST_FILES = $(TEST_DAT_FILES) $(TEST_SPP_FILES) $(TEST_BRK_FILES) $(TEST_CNV_FILES) $(TEST_RES_FILES) $(TESTOUTDIR)/$(TESTDT)/nam.typ # list $(TESTBUILDDIR)/testdata.lst: $(SRCLISTDEPS) @echo "generating $@ (list of data files)" @-$(RMV) $@ - @for file in $(TEST_RES_FILES) $(TEST_DAT_FILES) $(TEST_CNV_FILES); do \ + @for file in $(TEST_RES_FILES:$(TESTBUILDDIR)/%.res=%.res) $(TEST_DAT_FILES:$(TESTBUILDDIR)/%.icu=%.icu) $(TEST_SPP_FILES:$(TESTBUILDDIR)/%.spp=%.spp) $(TEST_CNV_FILES:$(TESTBUILDDIR)/%.cnv=%.cnv); do \ echo $$file >> $@; \ done; -build-testdata: build-dir $(ALL_TEST_FILES) $(TESTBUILDDIR)/testdata.lst $(TESTBUILDDIR)/$(TESTDT)iscii.res +build-testdata: build-dir $(ALL_TEST_FILES) $(TESTBUILDDIR)/testdata.lst $(TESTBUILDDIR)/iscii.res # test.icu -$(TESTBUILDDIR)/$(TESTDT)test.icu: $(TOOLDIR)/gentest/gentest$(EXEEXT) +$(TESTBUILDDIR)/test.icu: $(TOOLDIR)/gentest/gentest$(EXEEXT) $(INVOKE) $(TOOLDIR)/gentest/gentest -d $(TESTBUILDDIR) $(TESTBUILDDIR)/testtable32.txt: $(TOOLDIR)/gentest/gentest$(EXEEXT) $(INVOKE) $(TOOLDIR)/gentest/gentest -r -d $(TESTBUILDDIR) -$(TESTBUILDDIR)/$(TESTDT)testtable32.res: $(TESTBUILDDIR)/testtable32.txt $(BINDIR)/genrb$(EXEEXT) - $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -p $(TESTDATA) -q -s $(TESTBUILDDIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(<F) +$(TESTBUILDDIR)/testtable32.res: $(TESTBUILDDIR)/testtable32.txt $(BINDIR)/genrb$(EXEEXT) + $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -s $(TESTBUILDDIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(<F) # Targets for nfscsi.spp -$(TESTBUILDDIR)/$(TESTDT)nfscsi.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cs_prep_ci.txt +$(TESTBUILDDIR)/nfscsi.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cs_prep_ci.txt @echo Building nfscsi.icu - $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscsi -p $(TESTDATA) -u 3.2.0 nfs4_cs_prep_ci.txt + $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscsi -u 3.2.0 nfs4_cs_prep_ci.txt # Targets for nfscss.spp -$(TESTBUILDDIR)/$(TESTDT)nfscss.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cs_prep_cs.txt +$(TESTBUILDDIR)/nfscss.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cs_prep_cs.txt @echo Building nfscss.icu - $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscss -p $(TESTDATA) -u 3.2.0 nfs4_cs_prep_cs.txt + $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscss -u 3.2.0 nfs4_cs_prep_cs.txt # Targets for nfscis.spp -$(TESTBUILDDIR)/$(TESTDT)nfscis.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cis_prep.txt +$(TESTBUILDDIR)/nfscis.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cis_prep.txt @echo Building nfscis.spp - $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscis -p $(TESTDATA) -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_cis_prep.txt + $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfscis -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_cis_prep.txt # Targets for nfsmxs.spp -$(TESTBUILDDIR)/$(TESTDT)nfsmxs.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_mixed_prep_s.txt +$(TESTBUILDDIR)/nfsmxs.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_mixed_prep_s.txt @echo Building nfsmxs.spp - $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfsmxs -p $(TESTDATA) -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_s.txt + $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfsmxs -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_s.txt # Targets for nfsmxp.spp -$(TESTBUILDDIR)/$(TESTDT)nfsmxp.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_mixed_prep_p.txt +$(TESTBUILDDIR)/nfsmxp.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_mixed_prep_p.txt @echo Building nfsmxp.spp - $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfsmxp -p $(TESTDATA) -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_p.txt + $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) -b nfsmxp -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_p.txt -$(TESTBUILDDIR)/$(TESTDT)%.cnv: $(TESTSRCDATADIR)/%.ucm $(BINDIR)/makeconv$(EXEEXT) - $(INVOKE) $(BINDIR)/makeconv -p $(TESTDATA) -c -d $(TESTBUILDDIR) $(TESTSRCDATADIR)/$(<F) +$(TESTBUILDDIR)/%.cnv: $(TESTSRCDATADIR)/%.ucm $(BINDIR)/makeconv$(EXEEXT) + $(INVOKE) $(BINDIR)/makeconv -c -d $(TESTBUILDDIR) $(TESTSRCDATADIR)/$(<F) -$(TESTBUILDDIR)/$(TESTDT)%.res: $(TESTSRCDATADIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES) - $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -p $(TESTDATA) -q -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(<F) +$(TESTBUILDDIR)/%.res: $(TESTSRCDATADIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES) + $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -q -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(<F) -$(TESTBUILDDIR)/$(TESTDT)iscii.res: $(TESTSRCDATADIR)/iscii.bin $(BINDIR)/genrb$(EXEEXT) +$(TESTBUILDDIR)/iscii.res: $(TESTSRCDATADIR)/iscii.bin $(BINDIR)/genrb$(EXEEXT) @echo Testing genrb -e option - @ICU_DATA=$(BUILDDIR) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -s $(TESTSRCDATADIR) -p $(TESTDATA) -eISCII,version=0 -d $(TESTBUILDDIR) $(<F) >/dev/null || ( echo "WARNING: could not open ISCII - it may have been disabled." | tee $@ ) + @ICU_DATA=$(BUILDDIR) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -s $(TESTSRCDATADIR) -eISCII,version=0 -d $(TESTBUILDDIR) $(<F) >/dev/null || ( echo "WARNING: could not open ISCII - it may have been disabled." | tee $@ ) @echo Finished testing genrb -e option ################################################################### TYP # TYP FILES -$(TESTOUTDIR)/$(TESTDT)nam.typ: $(TESTBUILDDIR)/$(TESTDT)te_IN.res +$(TESTOUTDIR)/$(TESTDT)/nam.typ: $(TESTBUILDDIR)/te_IN.res + cp $< $@ +$(TESTBUILDDIR)/icu26_testtypes.res: $(TESTSRCDATADIR)/icu26_testtypes.res + cp $< $@ +$(TESTBUILDDIR)/icu26e_testtypes.res: $(TESTSRCDATADIR)/icu26e_testtypes.res cp $< $@ - testdata: build-dir $(ALL_TEST_FILES) $(UNPACKAGEDTESTDATA) diff --git a/Build/source/libs/icu-xetex/test/testdata/casing.txt b/Build/source/libs/icu-xetex/test/testdata/casing.txt index 1e1c95c23e6..709de5b8e70 100644 --- a/Build/source/libs/icu-xetex/test/testdata/casing.txt +++ b/Build/source/libs/icu-xetex/test/testdata/casing.txt @@ -1,11 +1,11 @@ //******************************************************************************* //* -//* Copyright (C) 2002-2005, International Business Machines +//* Copyright (C) 2002-2006, International Business Machines //* Corporation and others. All Rights Reserved. //* //******************************************************************************* -casing { +casing:table(nofallback) { Info { Description { "This is test data file for string casing." } @@ -36,6 +36,7 @@ casing { titlecasing { Headers { "Input", "Output", "Locale", "Type" } Cases { + { "Ê»aMeLikA huI PÅ« ʻʻʻiA", "Ê»Amelika Hui PÅ« ʻʻʻIa", "", "-1" }, // titlecase first _cased_ letter, j4933 { " tHe QUIcK bRoWn", " The Quick Brown", "", "4" }, { "DŽDždžLJLjljNJNjnj", "DžDžDžLjLjLjNjNjNj", "", "0" }, // UBRK_CHARACTER { "ljubav ljubav", "Ljubav Ljubav", "", "-1" }, // Lj vs. L+j diff --git a/Build/source/libs/icu-xetex/test/testdata/conversion.txt b/Build/source/libs/icu-xetex/test/testdata/conversion.txt index 773e5e4e08e..4e94f4713f9 100644 --- a/Build/source/libs/icu-xetex/test/testdata/conversion.txt +++ b/Build/source/libs/icu-xetex/test/testdata/conversion.txt @@ -1,6 +1,6 @@ //******************************************************************************* // -// Copyright (C) 2003-2005, International Business Machines +// Copyright (C) 2003-2006, International Business Machines // Corporation and others. All Rights Reserved. // // file name: conversion.txt @@ -15,7 +15,7 @@ // //******************************************************************************* -conversion { +conversion:table(nofallback) { Info { Description { "Test data for conversion" } LongDescription { @@ -29,11 +29,16 @@ conversion { "Callback option - a letter is passed in directly as const char * see ucnv_err.h\n" "Empty string: Sub callback with NULL option\n" - "In order to specify a charset substitution character,\n" + "In order to specify a charset substitution character (for ucnv_setSubstChars()),\n" "add a NUL (U+0000) to the callback string followed by the subchar bytes as Latin-1\n" "characters. For example, for a Sub callback with no option and a subchar of FC FC,\n" "use the string \"?\x00\xFC\xFC\"\n" + "In order to specify a substitution string (for ucnv_setSubstString()),\n" + "add an '=' to the callback string followed by the substitution string.\n" + "For example, for a Sub callback with no option and a substitution string\n" + "of \"ab\", use the string \"?=ab\"\n" + "fallbacks: per-direction boolean, currently only for fromUnicode; see Jitterbug 2401\n" "errorCode: (empty)==zero | invalid | illegal | truncated | illesc | unsuppesc\n" @@ -445,6 +450,64 @@ conversion { fromUnicode { Headers { "charset", "unicode", "bytes", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidUChars" } Cases { + { + "SCSU", + "1\U00010001\u0085\U000500022\ud8003\udc014\ue001", + :bin{ 310be0008102050fd900dc02e7320efffd330efffd34186881 }, + :intvector{ 0,1,1,1,1,3,3,4,4,4,4,4,6,6,7,7,7,8,9,9,9,10,11,11,11 }, + :int{1}, :int{0}, "", "?", "" + } + // Test substitution strings. + { + "windows-1252", // stateless MBCS with WriteSub(), should internally set char * + "a\ufdd0c", + :bin{ 61402421402463 }, + :intvector{ 0,1,1,1,1,1,2 }, + :int{1}, :int{0}, "", "?=@$!@$", "" + } + { + "ibm-930", // stateful MBCS + "a\ufdd0\u4e00\ufdd0e", + :bin{ 620e4bce0f400e45414bce0f4066 }, + :intvector{ 0,1,1,1,1,1,2,2,2,3,3,3,3,4 }, + :int{1}, :int{0}, "", "?=\u4e01 ", "" + } + { + "iso-2022-jp", + "a\x1bc", // Unicode ESC must not occur as a character + :bin{ 6163 }, + :intvector{ 0,2 }, + :int{1}, :int{0}, "", "?=", "" // empty substitution string + } + { + "iso-2022-cn", + "a\x1bc", // Unicode ESC must not occur as a character + :bin{ 61202063 }, + :intvector{ 0,1,1,2 }, + :int{1}, :int{0}, "", "?= ", "" + } + { + "iso-2022-cn", + "a\x1bc", // Unicode ESC must not occur as a character + :bin{ 611b2429410e523b0f2063 }, + :intvector{ 0,1,1,1,1,1,1,1,1,1,2 }, + :int{1}, :int{0}, "", "?=\u4e00 ", "" + } + { + "us-ascii", + "a\x85c", + :bin{ 61402421402463 }, + :intvector{ 0,1,1,1,1,1,2 }, + :int{1}, :int{0}, "", "?=@$!@$", "" + } + // ISO 2022-CN: test a single-byte subchar, j5171 + { + "iso-2022-cn", + "a\x1bc", // Unicode ESC must not occur as a character + :bin{ 612163 }, + :intvector{ 0,1,2 }, + :int{1}, :int{0}, "", "?\x00\x21", "" + } // UTF-16/32: do not output a BOM if there is no data at all { "UTF-16", @@ -910,6 +973,14 @@ conversion { } { "UTF-16BE", "\ud800", :bin{""}, :intvector{}, :int{1}, :int{0}, "truncated", ".", "\ud800" } + { + "SCSU", + "1\U00010001\u00082\ud8003\udc014\ue001", + :bin{ 310be000810108320efffd330efffd34186881 }, + :intvector{ 0, 1, 1, 1, 1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 9 }, + :int{1}, :int{0}, "", "?", "" + } + // escape callback { "ISCII", diff --git a/Build/source/libs/icu-xetex/test/testdata/csdetest.xml b/Build/source/libs/icu-xetex/test/testdata/csdetest.xml new file mode 100644 index 00000000000..edef3c4730d --- /dev/null +++ b/Build/source/libs/icu-xetex/test/testdata/csdetest.xml @@ -0,0 +1,550 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- Copyright (c) 2005-2006 IBM Corporation and others. All rights reserved --> +<!-- See individual test cases for their specific copyright. --> + +<charset-detection-tests> + <test-case id="IUC10-ar" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-6/ar windows-1256/ar"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + أوروبا, برمجيات الØاسوب + انترنيت : + ØªØµØ¨Ø Ø¹Ø§Ù„Ù…ÙŠØ§ مع يونيكود + IUC10 + تسجّل الآن Ù„Øضور المؤتمر الدولي العاشر ليونيكود, الذي سيعقد ÙÙŠ 10-12 آذار 1997 بمدينة ماينتس, + ألمانيا. وسيجمع المؤتمر بين خبراء من كاÙØ© قطاعات الصناعة على الشبكة العالمية انترنيت ويونيكود, Øيث ستتم, + على الصعيدين الدولي والمØلي على Øد سواء مناقشة سبل استخدام يونكود ÙÙŠ النظم القائمة ÙˆÙيما يخص التطبيقات + الØاسوبية, الخطوط, تصميم النصوص والØوسبة متعددة اللغات. + + Unicode + عندما يريد العالم أن يتكلّم, Ùهو يتØدّث بلغة يونيكود + + </test-case> + + <test-case id="IUC10-da-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1252/da"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Software + Internet: + Bliv global med Unicode + IUC10 + Indskriv dig nu til den tiende internationale Unicode-konference, der holdes den 10-12 + marts 1997 i Mainz, Tyskland. Konferencen samler eksperter fra hele verden inden for det + globale Internet og Unicode, internationalisering og lokalisering, implementering af + Unicode i styresystemer og programmer, skrifttyper, tekst-layout og flersproget databehandling. + + Unicode + NÃ¥r verden vil tale, taler den “Unicode.†+ + </test-case> + + <test-case id="IUC10-da" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/da"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Software + Internet: + Bliv global med Unicode + IUC10 + Indskriv dig nu til den tiende internationale Unicode-konference, der holdes den 10-12 + marts 1997 i Mainz, Tyskland. Konferencen samler eksperter fra hele verden inden for det + globale Internet og Unicode, internationalisering og lokalisering, implementering af + Unicode i styresystemer og programmer, skrifttyper, tekst-layout og flersproget databehandling. + + Unicode + NÃ¥r verden vil tale, taler den Unicode. + + </test-case> + + <test-case id="IUC10-de" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/de"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Software + das Internet: + International mit Unicode + IUC10 + Melden Sie sich jetzt für die 10. Internationale Unicode Konferenz an, die in der Zeit vom 10.-12. März 1997 in + Mainz stattfinden wird. Die Konferenz ist ein Treffpunkt für Betriebsexperten aus den Bereichen globales + Internet und Unicode, Internationalisierung und Lokalisierung, die Implementierung von Unicode in + Betriebssystemen und Programmen, sowie für Schriftarten, Textlayout und mehrsprachige Computeranwendungen. + + Unicode + Wenn die Welt miteinander spricht, spricht sie Unicode. + + </test-case> + + <!-- No UTF-8 in this test because there are no non-ASCII characters. --> + <test-case id="IUC10-en" encodings="UTF-32BE UTF-32LE ISO-8859-1/en"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europe, Software + the Internet: + Going Global with Unicode + IUC10 + Register now for the Tenth International Unicode Conference, to be held on March 10-12, 1997, + in Mainz, Germany. The Conference will bring together industry-wide experts on the global Internet and + Unicode, internationalization and localization, implementation of Unicode in operating systems and applications, + fonts, text layout, and multilingual computing. + + Unicode + When the world wants to talk, it speaks Unicode. + + </test-case> + + <test-case id="IUC10-es" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/es"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Software + el Internet: + Mundializando con Unicode + IUC10 + InscrÃbase ahora para la Décima Conferencia Internacional Unicode, que tendrá lugar del 10 al 12 de marzo de + 1997 en Maguncia, Alemania. La Conferencia reunirá expertos de los sectores de la mundialización del Internet y + Unicode, la internacionalización y localización, implementación de Unicode en sistemas operativos y aplicaciones, + tipos, composición de texto e informática multilingüe. + + Unicode + Cuando el mundo quiere conversar, habla Unicode. + + </test-case> + + <test-case id="IUC10-fr" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/fr"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + L'Europe, le logiciel et l'Internet : + la mondialisation avec Unicode + IUC10 + Inscrivez-vous dès maintenant à la dixième Conférence internationale sur Unicode, qui se tiendra du 10 au 12 + mars 1997 à Mayence, en Allemagne. Cette conférence rassemblera des experts de tous les horizons industriels + sur les sujets suivants : l'Internet mondial et Unicode, l'internationalisation et l'adaptation locale, + l'implémentation d'Unicode dans les systèmes d'exploitation et les applications, les polices de caractères, + la disposition de texte, l'informatique plurilingue. + + Unicode + Quand le monde veut communiquer, il parle en Unicode. + + </test-case> + + <test-case id="IUC10-he" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-8-I/he"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + ×ירופה, ×ª×•×›× ×” וה××™× ×˜×¨× ×˜: + Unicode ×™×•×¦× ×œ×©×•×§ העולמי + IUC10 + הירשמו כעת ×œ×›× ×¡ Unicode ×”×‘×™× ×œ×ומי העשירי, שייערך בין הת××¨×™×›×™× 12-10 במרץ 1997, ×‘×ž×™×™× ×¥ ×©×‘×’×¨×ž× ×™×”. ×‘×›× ×¡ + ישתתפו ×ž×•×ž×—×™× ×ž×›×œ ×¢× ×¤×™ התעשייה ×‘× ×•×©× ×”××™× ×˜×¨× ×˜ העולמי וה-Unicode, בהת×מה לשוק ×”×‘×™× ×œ×ומי והמקומי, ×‘×™×™×©×•× + Unicode במערכות הפעלה וביישומי×, ×‘×’×•×¤× ×™×, בפריסת טקסט ובמחשוב רב-×œ×©×•× ×™. + + Unicode + ×›×שר ×”×¢×•×œ× ×¨×•×¦×” לדבר, ×”×•× ×ž×“×‘×¨ ב-Unicode + + </test-case> + + <test-case id="IUC10-he-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1255/he"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + ×ירופה, ×ª×•×›× ×” וה××™× ×˜×¨× ×˜: + Unicode ×™×•×¦× ×œ×©×•×§ העולמי + IUC10 + הירשמו כעת ×œ×›× ×¡ Unicode ×”×‘×™× ×œ×ומי העשירי, שייערך בין הת××¨×™×›×™× 12-10 במרץ 1997, ×‘×ž×™×™× ×¥ ×©×‘×’×¨×ž× ×™×”. ×‘×›× ×¡ + ישתתפו ×ž×•×ž×—×™× ×ž×›×œ ×¢× ×¤×™ התעשייה ×‘× ×•×©× ×”××™× ×˜×¨× ×˜ העולמי וה-Unicode, בהת×מה לשוק ×”×‘×™× ×œ×ומי והמקומי, ×‘×™×™×©×•× + Unicode במערכות הפעלה וביישומי×, ×‘×’×•×¤× ×™×, בפריסת טקסט ובמחשוב רב-×œ×©×•× ×™. + + Unicode + ×›×שר ×”×¢×•×œ× ×¨×•×¦×” לדבר, ×”×•× ×ž×“×‘×¨ -“Unicode.†+ + </test-case> + + <test-case id="IUC10-hu" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-2/hu"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Európa, a Szoftver s az Internet - + Globálissá Változik a Unicode Ãltal + IUC10 + Iratkozzon már most a Tizedik Nemzetközi Unicode Konferenciára, amely Március 10-12 1997 + lesz megtartva, Meinz-be, Németországba. Ebben a Konferencián az iparág szerte sok szakértÅ‘ + fog részt venni: a globális Internet s Unicode nemzetközisÃtése s lokalizálása, a + Unicode beteljesÃtése a működÅ‘ rendszerekben s alkalmazásokban, fontokba, szöveg + térbeosztásba s többnyelvű computerekben. + + Unicode + Ha a világ beszélni akar, azt Unicode-ul mondja. + + </test-case> + + <test-case id="IUC10-hu-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1250/hu"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Európa, a Szoftver s az Internet - + Globálissá Változik a Unicode Ãltal + IUC10 + Iratkozzon már most a Tizedik Nemzetközi Unicode Konferenciára, amely Március 10-12 1997 + lesz megtartva, Meinz-be, Németországba. Ebben a Konferencián az iparág szerte sok szakértÅ‘ + fog részt venni: a globális Internet s Unicode nemzetközisÃtése s lokalizálása, a + Unicode beteljesÃtése a működÅ‘ rendszerekben s alkalmazásokban, fontokba, szöveg + térbeosztásba s többnyelvű computerekben. + + Unicode + Ha a világ beszélni akar, azt “Unicodeâ€-ul mondja. + + </test-case> + + <test-case id="IUC10-it" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/it"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, software e Internet: + Globalizzazione con Unicode + IUC10 + Iscrivetevi subito alla X Conferenza Internazionale su Unicode, che si terrà dal 10 al 12 marzo 1997 a + Mainz in Germania. Alla Conferenza parteciperanno esperti di tutti i settori per discutere di Internet globale e + Unicode, internazionalizzazione e localizzazione, implementazione di Unicode in sistemi operativi e applicazioni, + caratteri, composizione dei testi ed elaborazione multilingue. + + Unicode + Quando il mondo vuole comunicare, parla Unicode. + + </test-case> + + <test-case id="IUC10-jp" encodings="UTF-8 UTF-32BE UTF-32LE Shift_JIS EUC-JP ISO-2022-JP"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + ヨーãƒãƒƒãƒ‘ã€ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã€ãã—ã¦ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆ: + Unicode ã§ã‚°ãƒãƒ¼ãƒãƒ«åŒ–ã‚’ç‹™ã£ã¦ + IUC10 + 第 10 回㮠Unicode 会è°ã¯ 1997 å¹´ 3 月 10-12æ—¥ã€ãƒ‰ã‚¤ãƒ„ã®ãƒžã‚¤ãƒ³ãƒ„ã§é–‹ã‹ã‚Œã¾ã™ã€‚å‚åŠ å¸Œæœ›ã®æ–¹ã¯ä»Šã™ã登録ã—ã¦ãã ã•ã„。 + ã“ã®ä¼šè°ã§ã¯ã€ã‚°ãƒãƒ¼ãƒãƒ«ãªã‚¤ãƒ³ã‚¿ãƒãƒƒãƒˆã€Unicodeã€ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã®å›½éš›åŒ–ãŠã‚ˆã³ãƒãƒ¼ã‚«ãƒªã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã€OS ãŠã‚ˆã³ã‚¢ãƒ—リケーションã§ã® + Unicode ã®ã‚¤ãƒ³ãƒ—リメンテーションã€ãƒ•ã‚©ãƒ³ãƒˆã€ãƒ†ã‚スト表示ã€ãƒžãƒ«ãƒè¨€èªžã‚³ãƒ³ãƒ”ューティングã«ãŠã‘ã‚‹æ¥ç•Œã®å°‚門家ãŒé›†ã¾ã‚Šã¾ã™ã€‚ + + Unicode + 世界的ã«è©±ã™ãªã‚‰ã€Unicode ã§ã™ã€‚ + + </test-case> + + <test-case id="IUC10-ko" encodings="UTF-8 UTF-32BE UTF-32LE EUC-KR ISO-2022-KR"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + ìœ ëŸ½, 소프트웨어 ê·¸ë¦¬ê³ ì¸í„°ë„·: + ìœ ë‹ˆì½”ë“œì™€ 함께 세계로 + IUC10 + ì œ10회 ìœ ë‹ˆì½”ë“œ êµì œ 회ì˜ê°€ 1997ë…„ 3ì›” 10ì¼ë¶€í„° 12ì¼ê¹Œì§€ ë…ì¼ì˜ 마ì¸ì¦ˆì—ì„œ 열립니다. 지금 등ë¡í•˜ì‹ì‹œì˜¤. + ì´ íšŒì˜ì—서는 업계 ì „ë°˜ì˜ ì „ë¬¸ê°€ë“¤ì´ í•¨ê»˜ 모여 다ìŒê³¼ ê°™ì€ ë¶„ì•¼ë¥¼ 다룹니다. - ì¸í„°ë„·ê³¼ ìœ ë‹ˆì½”ë“œ, êµì œí™”와 지ì—í™”, + ìš´ì˜ ì²´ì œì™€ ì‘ìš© 프로그램ì—ì„œ ìœ ë‹ˆì½”ë“œì˜ êµ¬í˜„, 글꼴, ë¬¸ìž ë°°ì—´, 다êµì–´ 컴퓨팅. + + Unicode + 세계를 향한 대화, ìœ ë‹ˆì½”ë“œë¡œ 하ì‹ì‹œì˜¤ + + </test-case> + + <!-- No UTF-8 in this test because there are no non-ASCII characters. --> + <test-case id="IUC10-nl" encodings="UTF-32BE UTF-32LE ISO-8859-1/nl"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Software + het Internet: + wereldwijd met Unicode + IUC10 + Meld u nu aan voor de Tiende Internationale Unicode-conferentie, die van 10 tot 12 maart 1997 in + Mainz (Duitsland) wordt gehouden. De Conferentie is een ontmoetingsplaats voor experts uit de industrie op het + gebied van het wereldwijde Internet en Unicode, internationalisatie en localisatie, implementatie van Unicode in + besturingssystemen en applicaties, lettertypes, tekstopmaak en meertalig computergebruik. + + Unicode + Als de wereld wil praten, spreekt hij Unicode. + + </test-case> + + <!-- No language for ISO-8859-1 in this test because no-BO is recogonized as Danish... --> + <test-case id="IUC10-no-BO" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Programvare og Internet: + Global fokus med Unicode + IUC10 + Registrer deg som deltager pÃ¥ den tiende inernasjonale Unicode konferansen i Mainz, Tyskland, fra 10. til 12. mars, + 1997. Konferansen vil samle eksperter pÃ¥ Internet, Unicode, internasjonalisering og integrasjon av Unicode i + operativsystemer og programmer, fonter, tekst layout og flersprÃ¥klig databehandling. + + Unicode + NÃ¥r verden vil snakke, snakker den Unicode + + </test-case> + + <test-case id="IUC10-no-NY" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/no"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, programvare og Internett: + Femn verda med Unicode + IUC10 + Meld deg pÃ¥ den 10. internasjonale Unicode-konferansen. Han gÃ¥r føre seg i Mainz i Tyskland i dagane 10.--12. mars + 1997, og samlar fagkunnige innan konferansetemaet frÃ¥ heile databransjen. Tema: Det globale Internettet og + Unicode, internasjonalisering og nasjonal tilpassing, implementering av Unicode i operativsystem og brukarprogram, + skriftsnitt (fontar), tekstutlegg, og fleirsprÃ¥kleg databehandling. + + Unicode + NÃ¥r verda ønskjer Ã¥ snakke, talar ho Unicode + + </test-case> + + <test-case id="IUC10-pt-BR" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/pt"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Software e a Internet: + Globalização com o Unicode + IUC10 + Inscreva-se agora para a Décima Conferência Internacional Sobre O Unicode, realizada entre os dias 10 e 12 de + março de 1997 em Mainz na Alemanha. A Conferência reunirá peritos de todas as áreas da indústria especializados + em assuntos relacionados com a Internet global e o Unicode, internacionalização e localização de software, + implementação do Unicode em sistemas operacionais e aplicativos, fontes, layout de texto e informática multilÃngüe. + + Unicode + Quando o mundo quer falar, fala Unicode. + + </test-case> + + <test-case id="IUC10-pt-PT" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/pt"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Software e a Internet: + Globalização com o Unicode + IUC10 + Inscreva-se agora para a Décima Conferência Internacional Sobre O Unicode, a ser realizada entre os dias 10 e 12 + de Março de 1997 em Mainz na Alemanha. A Conferência reunirá peritos de todas as áreas da indústria + especializados em assuntos relacionados com a Internet global e o Unicode, internacionalização e localização de + software, implementação do Unicode em sistemas operativos e aplicações, tipos de letra, esquematização de + texto e informática multilÃngue. + + Unicode + Quando o mundo quer falar, fala Unicode. + + </test-case> + + <test-case id="IUC10-ro" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-2/ro"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, Software ÅŸi Internet: + Globalizarea cu Unicode + IUC10 + InscrieÅ£i-vă acum la a Zecea Conferinţă InternaÅ£ională "Unicode" ce va avea loc in + perioada de 10-12 martie, 1997 în Mainz, Germania. ConferinÅ£a va întruni experÅ£i din + variate domenii: Internet global ÅŸi Unicode, internaÅ£ionalizare ÅŸi localizare, + implementarede Unicode în sisteme de operare ÅŸi aplicaÅ£ii, fonturi, aranjare de text în + pagină, computerizare multilinguală. + + Unicode + Când lumea vrea să comunice, vorbeÅŸte Unicode. + + </test-case> + + <test-case id="IUC10-ru" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-5/ru windows-1251/ru KOI8-R/ru"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Европа, Программное обеÑпечение + Интернет: + Unicode в глобальных маÑштабах + IUC10 + ЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ + 10-12 марта 1997 года в Майнце в Германии. ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по и + вопроÑам глобального Интернета и Unicode, локализации и интернационализации, воплощению + применению Unicode в различных операционных ÑиÑтемах и программных приложениÑÑ…, + шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах. + + Unicode + Когда мир желает общатьÑÑ, он общаетÑÑ Ð½Ð° Unicode. + + </test-case> + + <test-case id="IUC10-sv" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-1/sv"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Europa, programvara och Internet: + globalisera med Unicode + IUC10 + Anmäl Dig till den tionde internationella Unicode-konferensen, som hÃ¥lls den 10-12 mars 1997 i Mainz, + Tyskland. Vid konferensen kommer experter inom följande omrÃ¥den att delta: det globala Internet och Unicode, + internationalisering och lokalisering, implementering av Unicode i operativsystem, tillämpningar, typsnitt, + textlayout och mÃ¥ngsprÃ¥klig datoranvändning. + + Unicode + När världen vill tala, sÃ¥ talar den Unicode. + + </test-case> + + <test-case id="IUC10-yi" encodings="UTF-8 UTF-32BE UTF-32LE"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + ×ײר×ָפּע: פּר×ָגר×ַמװ×ַרג ×ון די ×°×¢×œ×˜× ×¢×¥: + ××•× ×™×§×ָד ×יבער דער ×’×ָרער װעלט + IUC10 + פֿ×ַרשרײַבט זיך שױן ××±×£ דער ×¦×¢× ×˜×¢×¨ ××™× ×˜×¢×¨× ×ַצי×Ö¸× ×ַלער ××•× ×™×§×ָד-ק×Ö¸× ×¤Ö¿×¢×¨×¢× ×¥, ×°×ָס װעט פֿ×ָרקומען ×“×¢× + 10טן ביזן 12טן מ×ַרץ, 1997, ×ין ×ž×²Ö·× ×¥, דײַטשל×Ö·× ×“. די ק×Ö¸× ×¤Ö¿×¢×¨×¢× ×¥ װעט צוז×Ö·×ž×¢× ×‘×¨×¢× ×’×Ÿ ×ž×‘Ö¿×™× ×™× ×¤Ö¿×•×Ÿ ×°×¢×œ×˜× ×¢×¥, + ××•× ×™×§×ָד, ××™ ×ַלװעלטלעכן ××™ סבֿיבֿהדיקן פּר×ָגר×ַמװ×ַרג, ×Ö·×¨×²Ö·× ×©×˜×¢×œ×Ÿ ××•× ×™×§×ָד ×ין ×ָפּעריר-סיסטעמען ×ון + ×Ö¸× ×°×¢× ×“×•× ×’×¢×Ÿ, שריפֿטן, טעקסט-×ױסשטעל, ×ון מערשפּר×ַכיקע ק×ָמפּיוטערײַ. + + Unicode + ×Ö·×– די װעלט װיל רעדן, רעדט ×–×™ ××•× ×™×§×ָד + + </test-case> + + <test-case id="IUC10-zh-Hant" encodings="UTF-8 UTF-32BE UTF-32LE ISO-2022-CN GB18030 Big5"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + æ洲,軟體åŠç¶²éš›ç¶²è·¯ï¼š + 讓統一碼(Unicodeï¼‰é ˜ä½ é€²å…¥å…¨ä¸–ç•Œ + IUC10 + ä½ ç¾åœ¨å°±æ‡‰å ±å將在1997年3月1ï¼è‡³ï¼‘2日於德國美姿城(Mainz)å¬é–‹çš„第åå±†åœ‹éš›çµ±ä¸€ç¢¼ç ”è¨Žæœƒã€‚ + æœ¬æ¬¡ç ”è¨Žæœƒå°‡é‚€è«‹å¤šä½æ¥ç•Œå°ˆå®¶ç ”討關於全çƒç¶²éš›ç¶²è·¯åŠçµ±ä¸€ç¢¼ç™¼å±•ã€åœ‹éš›åŒ–åŠæœ¬åœŸåŒ–〠+ 支æ´çµ±ä¸€ç¢¼çš„作æ¥ç³»çµ±åŠæ‡‰ç”¨ç¨‹å¼ã€å—åž‹ã€æ–‡å—排版ã€é›»è…¦å¤šåœ‹èªžæ–‡åŒ–ç‰å¤šé …課題。 + + Unicode + 當世界需è¦æºé€šæ™‚,請用統一碼(Unicode) + + </test-case> + + <!-- No ISO-2022-CN in this test because Java doesn't support it in both directions :-( --> + <test-case id="IUC10-zh-Hans" encodings="UTF-8 UTF-32BE UTF-32LE ISO-2022-CN GB18030"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + 欧洲,软件+互è”网 + 用统一ç (Unicode) èµ°é世界 + IUC10 + 将于1997å¹´ 3 月10æ—¥ï¼12日在德国 Mainz 市举行的第å届统一ç å›½é™…ç ”è®¨ä¼šçŽ°åœ¨å¼€å§‹æ³¨å†Œã€‚ + 本次会议将汇集å„æ–¹é¢çš„专家。涉åŠçš„领域包括:国际互è”网和统一ç ,国际化和本地化, + 统一ç 在æ“作系统和应用软件ä¸çš„实现,å—åž‹ï¼Œæ–‡æœ¬æ ¼å¼ä»¥åŠå¤šæ–‡ç§è®¡ç®—ç‰ã€‚ + + Unicode + 当世界需è¦æ²Ÿé€šæ—¶ï¼Œè¯·ç”¨Unicodeï¼ + +Conference Program + </test-case> + + <test-case id="WIU-cz" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-2/cs"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Co je Unicode? + + Unicode pÅ™iÅ™azuje každému znaku jedineÄné ÄÃslo, + nezávisle na platformÄ›, + nezávisle na programu, + nezávisle na jazyce. + + PoÄÃtaÄe, ze své podstaty, pracujà pouze s ÄÃsly. PÃsmena a dalÅ¡Ã znaky ukládajà tak, že každému z nich + pÅ™iÅ™adà ÄÃslo. PÅ™ed vznikem Unicode existovaly stovky rozdÃlných kódovacÃch systémů pro pÅ™iÅ™azovánà tÄ›chto + ÄÃsel. Žádné z tÄ›chto kódovánà nemohlo obsahovat dostatek znaků: napÅ™Ãklad Evropská unie sama potÅ™ebuje + nÄ›kolik různých kódovánÃ, aby pokryla vÅ¡echny své jazyky. Dokonce i pro jeden jediný jazyk, jako je angliÄtina, + nevyhovovalo žádné kódovánà pro vÅ¡echny pÃsmena, interpunkci a běžnÄ› použÃvané technické symboly. + + Tyto kódovacà systémy také byly v konfliktu jeden s druhým. To znamená, že dvÄ› kódovánà mohou použÃvat + stejné ÄÃslo pro dva různé znaky, nebo použÃvat různá ÄÃsla pro stejný znak. Jakýkoli poÄÃtaÄ (zvláštÄ› servery) + musà podporovat mnoho různých kódovánÃ; pÅ™esto, kdykoli jsou data pÅ™edávána mezi různými kódovánÃmi nebo + platformami, hrozÃ, že tato data budou poÅ¡kozena. + + </test-case> + + <test-case id="WIU-el" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-7/el"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Τι είναι το Unicode; + + Η κωδικοσελίδα Unicode Ï€Ïοτείνει Îναν και μοναδικό αÏιθμό για κάθε χαÏακτήÏα, + ανεξάÏτητα από το λειτουÏγικό σÏστημα, + ανεξάÏτητα από το λογισμικό, + ανεξάÏτητα από την γλώσσα. + + Οι ηλεκτÏονικοί υπολογιστÎÏ‚, σε τελική ανάλυση, χειÏίζονται απλώς αÏιθμοÏÏ‚. ΑποθηκεÏουν γÏάμματα και + άλλους χαÏακτήÏες αντιστοιχώντας στο καθÎνα τους από Îναν αÏιθμό (ονομάζουμε μία Ï„Îτοια αντιστοιχία + κωδικοσελίδα). Î Ïιν την εφεÏÏεση του Unicode, υπήÏχαν εκατοντάδες διαφοÏετικÎÏ‚ κωδικοσελίδες. Λόγω + πεÏιοÏισμών μεγÎθους όμως, σε καμία κωδικοσελίδα δεν χωÏοÏσαν αÏκετοί χαÏακτήÏες: λόγου χάÏιν, + η ΕυÏωπαϊκή Ένωση χÏειαζόταν πλήθος διαφοÏετικών κωδικοσελίδων για να καλÏψει όλες τις γλώσσες των + χωÏών-μελών της. Ακόμα και για μία και μόνη γλώσσα, όπως Ï€.χ. τα Αγγλικά, μία κωδικοσελίδα δεν + επαÏκοÏσε για να καλÏψει όλα τα γÏάμματα, σημεία στίξης και τεχνικά σÏμβολα ευÏείας χÏήσης. + + Εκτός αυτοÏ, οι κωδικοσελίδες αυτÎÏ‚ διαφωνοÏσαν Î¼ÎµÏ„Î±Î¾Ï Ï„Î¿Ï…Ï‚. Έτσι, δÏο κωδικοσελίδες μποÏοÏσαν κάλλιστα να + χÏησιμοποιοÏν τον ίδιο αÏιθμό για δÏο διαφοÏετικοÏÏ‚ χαÏακτήÏες, ή να χÏησιμοποιοÏν διαφοÏετικοÏÏ‚ αÏιθμοÏÏ‚ για + τον ίδιο χαÏακτήÏα. Κάθε υπολογιστής (και ιδίως εάν ήταν διακομιστής) ÎÏ€Ïεπε να υποστηÏίζει πλήθος διαφοÏετικών + κωδικοσελίδων· ταυτόχÏονα κάθε φοÏά που δεδομÎνα μεταφÎÏονταν Î¼ÎµÏ„Î±Î¾Ï Î´Î¹Î±Ï†Î¿Ïετικών κωδικοσελίδων ή + λειτουÏγικών συστημάτων, τα δεδομÎνα αυτά κινδÏνευαν να αλλοιωθοÏν. + + </test-case> + + <test-case id="WIU-el-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1253/el"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Τι είναι το “Unicodeâ€; + + Η κωδικοσελίδα Unicode Ï€Ïοτείνει Îναν και μοναδικό αÏιθμό για κάθε χαÏακτήÏα, + ανεξάÏτητα από το λειτουÏγικό σÏστημα, + ανεξάÏτητα από το λογισμικό, + ανεξάÏτητα από την γλώσσα. + + Οι ηλεκτÏονικοί υπολογιστÎÏ‚, σε τελική ανάλυση, χειÏίζονται απλώς αÏιθμοÏÏ‚. ΑποθηκεÏουν γÏάμματα και + άλλους χαÏακτήÏες αντιστοιχώντας στο καθÎνα τους από Îναν αÏιθμό (ονομάζουμε μία Ï„Îτοια αντιστοιχία + κωδικοσελίδα). Î Ïιν την εφεÏÏεση του Unicode, υπήÏχαν εκατοντάδες διαφοÏετικÎÏ‚ κωδικοσελίδες. Λόγω + πεÏιοÏισμών μεγÎθους όμως, σε καμία κωδικοσελίδα δεν χωÏοÏσαν αÏκετοί χαÏακτήÏες: λόγου χάÏιν, + η ΕυÏωπαϊκή Ένωση χÏειαζόταν πλήθος διαφοÏετικών κωδικοσελίδων για να καλÏψει όλες τις γλώσσες των + χωÏών-μελών της. Ακόμα και για μία και μόνη γλώσσα, όπως Ï€.χ. τα Αγγλικά, μία κωδικοσελίδα δεν + επαÏκοÏσε για να καλÏψει όλα τα γÏάμματα, σημεία στίξης και τεχνικά σÏμβολα ευÏείας χÏήσης. + + Εκτός αυτοÏ, οι κωδικοσελίδες αυτÎÏ‚ διαφωνοÏσαν Î¼ÎµÏ„Î±Î¾Ï Ï„Î¿Ï…Ï‚. Έτσι, δÏο κωδικοσελίδες μποÏοÏσαν κάλλιστα να + χÏησιμοποιοÏν τον ίδιο αÏιθμό για δÏο διαφοÏετικοÏÏ‚ χαÏακτήÏες, ή να χÏησιμοποιοÏν διαφοÏετικοÏÏ‚ αÏιθμοÏÏ‚ για + τον ίδιο χαÏακτήÏα. Κάθε υπολογιστής (και ιδίως εάν ήταν διακομιστής) ÎÏ€Ïεπε να υποστηÏίζει πλήθος διαφοÏετικών + κωδικοσελίδων· ταυτόχÏονα κάθε φοÏά που δεδομÎνα μεταφÎÏονταν Î¼ÎµÏ„Î±Î¾Ï Î´Î¹Î±Ï†Î¿Ïετικών κωδικοσελίδων ή + λειτουÏγικών συστημάτων, τα δεδομÎνα αυτά κινδÏνευαν να αλλοιωθοÏν. + + </test-case> + + <test-case id="WIU-pl" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-2/pl"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Czym jest Unikod ? + + Unikod przypisuje unikalny numer każdemu znakowi, niezależny od używanej platformy, programu czy jÄ™zyka. + + Zasadniczo, komputery rozumiejÄ… tylko liczby. ZapisujÄ… litery i inne znaki przypisujÄ…c każdemu z nich liczbÄ™. + Nim powstaÅ‚ Unikod, byÅ‚o wiele różnych systemów kodowania przypisujÄ…cych te liczby. BrakowaÅ‚o jednego, + który mógÅ‚by pomieÅ›cić wystarczajÄ…co dużą liczbÄ™ znaków. PrzykÅ‚adowo, sama Unia Europejska potrzebowaÅ‚a + kilku różnych kodowaÅ„, by móc używać wszystkich używanych w niej jÄ™zyków. Nawet dla pojedynczego jÄ™zyka + takiego jak np. angielski brakowaÅ‚o jednego kodowania, które byÅ‚oby odpowiednie dla zaprezentowania + wszystkich liter, znaków przestankowych i popularnych symboli technicznych. + + Innym problemem byÅ‚o, że kodowania te kolidowaÅ‚y ze sobÄ…. Dwa, różne kodowania używaÅ‚y jednej liczby dla dwu + różnych znaków lub różnych liczb dla tego samego znaku. Wszystkie komputery (miÄ™dzy innymi serwery) muszÄ… + wspierać wszystkie te kodowania, gdyż dane przesyÅ‚ane miÄ™dzy różnymi systemami operacyjnymi zawsze + narażone sÄ… na uszkodzenie. + + </test-case> + + <test-case id="WIU-tr" encodings="UTF-8 UTF-32BE UTF-32LE ISO-8859-9/tr"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + Evrensel Kod Nedir? + + Evrensel Kod her yazı karakteri için bir ve yalnız bir sayı ÅŸart koÅŸar, + hangi altyapı, + hangi yazılım, + hangi dil olursa olsun. + + Ä°lke olarak, bilgisayarlar sadece sayılarla iÅŸlem yaparlar. Kelimelerin ve yazı karakterlerinin her biri için + birer sayı atarlar ve böyle saklarlar. Evrensel Kod keÅŸfedilmeden önce, bu sayıları atamak için birçok ÅŸifreleme + yöntemi vardı. Ancak, tüm bu dilleri gösterebilecek, örneÄŸin; Avrupa TopluluÄŸu bünyesindeki tüm ülkelerin dillerini + kapsayacak bir tek ÅŸifreleme yöntemi yoktu. Bunun yanısıra, sadece Ä°ngilizcedeki harfleri, noktalama + iÅŸaretlerini ve teknik sembolleri kapsayan tek bir ÅŸifreleme yöntemi de bulunmamaktaydı. + + Bu ÅŸifreleme yöntemleri kendi aralarında çeliÅŸmektedir. Ä°ki farklı ÅŸifreleme, aynı sayıyı iki farklı karaktere + vermiÅŸ olabilir ya da farklı sayılar aynı karekteri kodlayabilir. Bilgisayarlar, özellikle sunucular, birçok + ÅŸifrelemeyi desteklemek zorundadırlar; veriler, farklı ÅŸifreleme ve altyapılardan geçerken bozulma riski taşırlar. + + </test-case> + + <test-case id="WIU-tr-Q" encodings="UTF-8 UTF-32BE UTF-32LE windows-1254/tr"> + <!-- Copyright © 1991-2005 Unicode, Inc. All rights reserved. --> + + “Evrensel Kod†Nedir? + + Evrensel Kod her yazı karakteri için bir ve yalnız bir sayı ÅŸart koÅŸar, + hangi altyapı, + hangi yazılım, + hangi dil olursa olsun. + + Ä°lke olarak, bilgisayarlar sadece sayılarla iÅŸlem yaparlar. Kelimelerin ve yazı karakterlerinin her biri için + birer sayı atarlar ve böyle saklarlar. Evrensel Kod keÅŸfedilmeden önce, bu sayıları atamak için birçok ÅŸifreleme + yöntemi vardı. Ancak, tüm bu dilleri gösterebilecek, örneÄŸin; Avrupa TopluluÄŸu bünyesindeki tüm ülkelerin dillerini + kapsayacak bir tek ÅŸifreleme yöntemi yoktu. Bunun yanısıra, sadece Ä°ngilizcedeki harfleri, noktalama + iÅŸaretlerini ve teknik sembolleri kapsayan tek bir ÅŸifreleme yöntemi de bulunmamaktaydı. + + Bu ÅŸifreleme yöntemleri kendi aralarında çeliÅŸmektedir. Ä°ki farklı ÅŸifreleme, aynı sayıyı iki farklı karaktere + vermiÅŸ olabilir ya da farklı sayılar aynı karekteri kodlayabilir. Bilgisayarlar, özellikle sunucular, birçok + ÅŸifrelemeyi desteklemek zorundadırlar; veriler, farklı ÅŸifreleme ve altyapılardan geçerken bozulma riski taşırlar. + + </test-case> +</charset-detection-tests>
\ No newline at end of file diff --git a/Build/source/libs/icu-xetex/test/testdata/testdata_icu26_testtypes.res b/Build/source/libs/icu-xetex/test/testdata/icu26_testtypes.res Binary files differindex d7747ce691c..d7747ce691c 100644 --- a/Build/source/libs/icu-xetex/test/testdata/testdata_icu26_testtypes.res +++ b/Build/source/libs/icu-xetex/test/testdata/icu26_testtypes.res diff --git a/Build/source/libs/icu-xetex/test/testdata/testdata_icu26e_testtypes.res b/Build/source/libs/icu-xetex/test/testdata/icu26e_testtypes.res Binary files differindex 89acde07914..89acde07914 100644 --- a/Build/source/libs/icu-xetex/test/testdata/testdata_icu26e_testtypes.res +++ b/Build/source/libs/icu-xetex/test/testdata/icu26e_testtypes.res diff --git a/Build/source/libs/icu-xetex/test/testdata/icuio.txt b/Build/source/libs/icu-xetex/test/testdata/icuio.txt index e83fb3d5461..3f5fbb88e65 100644 --- a/Build/source/libs/icu-xetex/test/testdata/icuio.txt +++ b/Build/source/libs/icu-xetex/test/testdata/icuio.txt @@ -1,6 +1,6 @@ //***************************************************************************** // -// Copyright (C) 2004-2005, International Business Machines +// Copyright (C) 2004-2006, International Business Machines // Corporation and others. All Rights Reserved. // // file name: icuio.txt @@ -15,7 +15,7 @@ // //***************************************************************************** -icuio { +icuio:table(nofallback) { Info { Description { "Test data for ICU I/O" } LongDescription { @@ -24,6 +24,7 @@ icuio { "argumentType:\n" "\td: double\n" + "\tf: float\n" "\t1: int8_t (hexadecimal)\n" "\t2: int16_t (hexadecimal)\n" "\t4: int32_t (hexadecimal)\n" @@ -85,6 +86,7 @@ icuio { { "%G", "12345.7", "d", "12345.6789" } { "%G", "123457", "d", "123456.789" } { "%G", "1.23457E+006", "d", "1234567.89" } + { "%.14G", "1.7E+064", "d", "1.7E+64" } { "%.0f", "-12", "d", "-12.34" } { "%.0e", "-1e+001", "d", "-12.34" } { "%.0g", "-1e+001", "d", "-12.34" } @@ -117,8 +119,8 @@ icuio { scanf { Headers { "format", "argument", "argumentType", "result" } Cases { - { "%e", "1.200000e+000", "d", "1.2" } - { "%*e%e", "1.200000e+000 4.825000e+000", "d", "4.825" } + { "%e", "1.200000e+000", "f", "1.2" } + { "%*e%e", "1.200000e+000 4.825000e+000", "f", "4.825" } { "%C", "1234", "2", "31" } { "%*C%C", "1234", "2", "32" } { "%S", "1234 5678", "S", "1234" } @@ -132,12 +134,15 @@ icuio { { "%4d", "123", "4", "7B" } { "%2d", "123", "4", "C" } { "%40d", "123", "4", "7B" } - { "%2e", "1.25", "d", "1" } - { "%2f", "1.25", "d", "1" } - { "%2g", "1.25", "d", "1" } - { "%*2e%2e", "1.25", "d", "25" } - { "%*2f%2f", "1.25", "d", "25" } - { "%*2g%2g", "1.25", "d", "25" } + { "%2e", "1.25", "f", "1" } + { "%2f", "1.25", "f", "1" } + { "%2g", "1.25", "f", "1" } + { "%2le", "1.25", "d", "1" } + { "%2lf", "1.25", "d", "1" } + { "%2lg", "1.25", "d", "1" } + { "%*2e%2e", "1.25", "f", "25" } + { "%*2f%2f", "1.25", "f", "25" } + { "%*2g%2g", "1.25", "f", "25" } { "%*d%d", "1234 5678", "4", "162E" } { "%x", "abcd ef01", "4", "abcd" } { "%3x", "abcd ef01", "4", "abc" } @@ -161,6 +166,12 @@ icuio { { "%*3S%S", "abcd efg", "S", "d" } { "%*3s%s", "abcd efg", "s", "d" } { "%*3d%d", "1234", "4", "4" } + { "%d", " 1234", "4", "4D2" } + { "%e", " 1234", "f", "1234" } + { "%f", " 1234", "f", "1234" } + { "%d", "+1234", "4", "4D2" } + { "%e", "+1234", "f", "1234" } + { "%f", "+1234", "f", "1234" } } } } diff --git a/Build/source/libs/icu-xetex/test/testdata/idna_conf.txt b/Build/source/libs/icu-xetex/test/testdata/idna_conf.txt new file mode 100644 index 00000000000..ba999bc83a3 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/testdata/idna_conf.txt @@ -0,0 +1,1266 @@ +===== +desc: Copyright 2003-2005 http://idnconnect.jdna.jp/testbed.html +namebase: <00ED>dn +nameutf8: Ãdn +namezone: xn--dn-mja +failzone1: +failzone2: +token: 25029153 +passfail: pass +type: toascii + +===== +desc: 1-1-1 Has one IDN +namebase: <00ED>dn +nameutf8: Ãdn +namezone: xn--dn-mja +failzone1: +failzone2: +token: 25029153 +passfail: pass +type: toascii + +===== +desc: 1-1-2 Has two IDNs +namebase: <00EB>x.<00ED>dn +nameutf8: ëx.Ãdn +namezone: xn--x-ega.xn--dn-mja +failzone1: +failzone2: +token: 02721141 +passfail: pass +type: toascii + +===== +desc: 1-2-1 Latin-1 +namebase: <00E5><00FE><00E7> +nameutf8: åþç +namezone: xn--5cae2e +failzone1: +failzone2: +token: 41542620 +passfail: pass +type: toascii + +===== +desc: 1-2-2 Latin Extended A +namebase: <0103>b<0109> +nameutf8: ăbĉ +namezone: xn--b-rhat +failzone1: +failzone2: +token: 72238617 +passfail: pass +type: toascii + +===== +desc: 1-2-3 Latin Extended B +namebase: <0227><0180><0188> +nameutf8: ȧƀƈ +namezone: xn--lhaq98b +failzone1: +failzone2: +token: 48464361 +passfail: pass +type: toascii + +===== +desc: 1-2-4 Latin Extended Additional +namebase: <1E01><1E03><1E09> +nameutf8: á¸á¸ƒá¸‰ +namezone: xn--2fges +failzone1: +failzone2: +token: 49301230 +passfail: pass +type: toascii + +===== +desc: 1-3-1 Han +namebase: <4E3F><4EBA><5C38> +nameutf8: 丿人尸 +namezone: xn--xiqplj17a +failzone1: +failzone2: +token: 58367113 +passfail: pass +type: toascii + +===== +desc: 1-3-2 Hiragana +namebase: <304B><304C><304D> +nameutf8: ã‹ãŒã +namezone: xn--u8jcd +failzone1: +failzone2: +token: 57006197 +passfail: pass +type: toascii + +===== +desc: 1-3-3 Katakana +namebase: <30AB><30AC><30AD> +nameutf8: カガ゠+namezone: xn--lckcd +failzone1: +failzone2: +token: 81826992 +passfail: pass +type: toascii + +===== +desc: 1-3-4 Hangul Jamo +namebase: <1100><1161><11A8> +nameutf8: 각 +namezone: xn--p39a +failzone1: xn--ypd8qrh +failzone2: +token: 44228346 +passfail: pass +type: toascii + +===== +desc: 1-3-5 Hangul +namebase: <AC69><B4C6><C03A> +nameutf8: 걩듆쀺 +namezone: xn--o69aq2nl0j +failzone1: +failzone2: +token: 79235608 +passfail: pass +type: toascii + +===== +desc: 1-3-6 Yi +namebase: <A00A><A020><A2B8> +nameutf8: ê€Šê€ êŠ¸ +namezone: xn--6l7arby7j +failzone1: +failzone2: +token: 99549720 +passfail: pass +type: toascii + +===== +desc: 1-3-7 Greek +namebase: <03B1><03B2><03B3> +nameutf8: αβγ +namezone: xn--mxacd +failzone1: +failzone2: +token: 83859912 +passfail: pass +type: toascii + +===== +desc: 1-3-8 Greek Extended +namebase: <1F02><1F26><1F55> +nameutf8: ἂἦὕ +namezone: xn--fng7dpg +failzone1: +failzone2: +token: 22501339 +passfail: pass +type: toascii + +===== +desc: 1-3-9 Cyrillic +namebase: <0430><0431><0432> +nameutf8: абв +namezone: xn--80acd +failzone1: +failzone2: +token: 98871751 +passfail: pass +type: toascii + +===== +desc: 1-3-10 Armeian +namebase: <0561><0562><0563> +nameutf8: Õ¡Õ¢Õ£ +namezone: xn--y9acd +failzone1: +failzone2: +token: 23687015 +passfail: pass +type: toascii + +===== +desc: 1-3-11 Georgian +namebase: <10D0><10D1><10D2> +nameutf8: áƒáƒ‘გ +namezone: xn--lodcd +failzone1: +failzone2: +token: 70499589 +passfail: pass +type: toascii + +===== +desc: 1-4-1 Symbols +namebase: <2221><21BA><2282> +nameutf8: ∡↺⊂ +namezone: xn--b7gxomk +failzone1: +failzone2: +token: 24617638 +passfail: pass +type: toascii + +===== +desc: 1-5-1 Devanagari +namebase: <0915><0916><0917> +nameutf8: कखग +namezone: xn--11bcd +failzone1: +failzone2: +token: 18477223 +passfail: pass +type: toascii + +===== +desc: 1-5-2 Bengali +namebase: <0995><0996><0997> +nameutf8: কখগ +namezone: xn--p5bcd +failzone1: +failzone2: +token: 11477904 +passfail: pass +type: toascii + +===== +desc: 1-5-3 Gurmukhi +namebase: <0A15><0A16><0A17> +nameutf8: ਕਖਗ +namezone: xn--d9bcd +failzone1: +failzone2: +token: 71543506 +passfail: pass +type: toascii + +===== +desc: 1-5-4 Gujarati +namebase: <0A95><0A96><0A97> +nameutf8: કખગ +namezone: xn--0dccd +failzone1: +failzone2: +token: 75268760 +passfail: pass +type: toascii + +===== +desc: 1-5-5 Oriya +namebase: <0B15><0B16><0B17> +nameutf8: କଖଗ +namezone: xn--ohccd +failzone1: +failzone2: +token: 36079747 +passfail: pass +type: toascii + +===== +desc: 1-5-6 Tamil +namebase: <0B95><0B99><0B9A> +nameutf8: கஙச +namezone: xn--clcid +failzone1: +failzone2: +token: 39841446 +passfail: pass +type: toascii + +===== +desc: 1-5-7 Telugu +namebase: <0C15><0C16><0C17> +nameutf8: à°•à°–à°— +namezone: xn--zoccd +failzone1: +failzone2: +token: 34438808 +passfail: pass +type: toascii + +===== +desc: 1-5-8 Kannada +namebase: <0C95><0C96><0C97> +nameutf8: ಕಖಗ +namezone: xn--nsccd +failzone1: +failzone2: +token: 42303465 +passfail: pass +type: toascii + +===== +desc: 1-5-9 Malayalam +namebase: <0D15><0D16><0D17> +nameutf8: à´•à´–à´— +namezone: xn--bwccd +failzone1: +failzone2: +token: 11813559 +passfail: pass +type: toascii + +===== +desc: 1-5-10 Sinhala +namebase: <0D9A><0D9B><0D9C> +nameutf8: කඛග +namezone: xn--3zccd +failzone1: +failzone2: +token: 89823209 +passfail: pass +type: toascii + +===== +desc: 1-5-11 Thai +namebase: <0E01><0E02><0E03> +nameutf8: à¸à¸‚ฃ +namezone: xn--12ccd +failzone1: +failzone2: +token: 94992842 +passfail: pass +type: toascii + +===== +desc: 1-5-12 Lao +namebase: <0E81><0E82><0E84> +nameutf8: àºàº‚ຄ +namezone: xn--p6ccg +failzone1: +failzone2: +token: 42424338 +passfail: pass +type: toascii + +===== +desc: 1-5-13 Tibetan +namebase: <0F40><0F41><0F42> +nameutf8: ཀà½à½‚ +namezone: xn--5cdcd +failzone1: +failzone2: +token: 26962778 +passfail: pass +type: toascii + +===== +desc: 1-5-14 Myanmar +namebase: <1000><1001><1002> +nameutf8: ကá€á€‚ +namezone: xn--nidcd +failzone1: +failzone2: +token: 09824611 +passfail: pass +type: toascii + +===== +desc: 1-5-15 Khmer +namebase: <1780><1781><1782> +nameutf8: កážáž‚ +namezone: xn--i2ecd +failzone1: +failzone2: +token: 48071156 +passfail: pass +type: toascii + +===== +desc: 1-5-16 Mongolian +namebase: <1820><1821><1822> +nameutf8: á á ¡á ¢ +namezone: xn--26ecd +failzone1: +failzone2: +token: 40131572 +passfail: pass +type: toascii + +===== +desc: 1-6-1 Arabic +namebase: <0627><0628><0629> +nameutf8: ابة +namezone: xn--mgbcd +failzone1: +failzone2: +token: 06414817 +passfail: pass +type: toascii + +===== +desc: 1-6-2 Hebrew +namebase: <05D0><05D1><05D2> +nameutf8: ×בג +namezone: xn--4dbcd +failzone1: +failzone2: +token: 41996705 +passfail: pass +type: toascii + +===== +desc: 1-6-3 Syriac +namebase: <0710><0711><0712> +nameutf8: ÜÜ‘Ü’ +namezone: xn--9mbcd +failzone1: +failzone2: +token: 77925080 +passfail: pass +type: toascii + +===== +desc: 1-7-1 ASCII and non-Latin +namebase: abc<30AB><30AC><30AD> +nameutf8: abcカガ゠+namezone: xn--abc-mj4bfg +failzone1: +failzone2: +token: 14333380 +passfail: pass +type: toascii + +===== +desc: 1-7-2 Latin (non-ASCII) and non-Latin +namebase: <00E5><00FE><00E7><30AB><30AC><30AD> +nameutf8: åþçカガ゠+namezone: xn--5cae2e328wfag +failzone1: +failzone2: +token: 00848299 +passfail: pass +type: toascii + +===== +desc: 2-3-1-1 If UseSTD3ASCIIRules: Includes ! before Nameprep +namebase: <00ED><0021>dn +nameutf8: Ã!dn +namezone: +failzone1: xn--!dn-qma +failzone2: +token: 89571181 +passfail: fail +type: toascii + +===== +desc: 2-3-1-2 If UseSTD3ASCIIRules: Includes $ before Nameprep +namebase: <00ED><0024>dn +nameutf8: Ã$dn +namezone: +failzone1: xn--$dn-qma +failzone2: +token: 06965937 +passfail: fail +type: toascii + +===== +desc: 2-3-1-3 If UseSTD3ASCIIRules: Includes + before Nameprep +namebase: <00ED><002B>dn +nameutf8: Ã+dn +namezone: +failzone1: xn--+dn-qma +failzone2: +token: 98967951 +passfail: fail +type: toascii + +===== +desc: 2-3-2-1 If UseSTD3ASCIIRules: Leading hyphen before Nameprep +namebase: <002D><00ED>1dn +nameutf8: -Ã1dn +namezone: +failzone1: xn---1dn-vpa +failzone2: +token: 65457100 +passfail: fail +type: toascii + +===== +desc: 2-3-2-2 If UseSTD3ASCIIRules: Trailing hyphen before Nameprep +namebase: <00ED>1dn<002D> +nameutf8: Ã1dn- +namezone: +failzone1: xn--1dn--upa +failzone2: +token: 85629714 +passfail: fail +type: toascii + +===== +desc: 2-3-3-1 If UseSTD3ASCIIRules: Gets a + after Nameprep +namebase: <00ED><FF0B>dn +nameutf8: Ã+dn +namezone: +failzone1: xn--dn-mja0331x +failzone2: +token: 95236620 +passfail: fail +type: toascii + +===== +desc: 2-3-3-2 If UseSTD3ASCIIRules: Gets a = after Nameprep +namebase: <00ED><207C>dn +nameutf8: Ãâ¼dn +namezone: +failzone1: xn--dn-mja0343a +failzone2: +token: 04960664 +passfail: fail +type: toascii + +===== +desc: 2-3-4-1 If UseSTD3ASCIIRules: Leading hyphen after Nameprep +namebase: <FE63><00ED>2dn +nameutf8: ï¹£Ã2dn +namezone: +failzone1: xn--2dn-qma32863a +failzone2: xn---2dn-vpa +token: 53512069 +passfail: fail +type: toascii + +===== +desc: 2-3-4-2 If UseSTD3ASCIIRules: Trailing hyphen after Nameprep +namebase: <00ED>2dn<FF0D> +nameutf8: Ã2dnï¼ +namezone: +failzone1: xn--2dn-qma79363a +failzone2: xn--2dn--upa +token: 39938653 +passfail: fail +type: toascii + +===== +desc: 2-4-1 All-ASCII check, Latin +namebase: <00B9>1 +nameutf8: ¹1 +namezone: 11 +failzone1: +failzone2: +token: 43611374 +passfail: pass +type: toascii + +===== +desc: 2-4-2 All-ASCII check, symbol +namebase: <2165>vi +nameutf8: â…¥vi +namezone: vivi +failzone1: +failzone2: +token: 79939993 +passfail: pass +type: toascii + +===== +desc: 2-4-3 All-ASCII check, sharp S +namebase: <00DF>ss +nameutf8: ßss +namezone: ssss +failzone1: +failzone2: +token: 71292530 +passfail: pass +type: toascii + +===== +desc: 2-5-1 ACE prefix exists before Nameprep +namebase: xn--<00EF>dn +nameutf8: xn--ïdn +namezone: +failzone1: xn--xn--dn-sja +failzone2: xn--dn-sja +token: 32841515 +passfail: fail +type: toascii + +===== +desc: 2-5-2 ACE prefix appears after Nameprep +namebase: <2179>n--<00E4>dn +nameutf8: â…¹n--ädn +namezone: +failzone1: xn--xn--dn-uia +failzone2: xn--dn-uia +token: 52994631 +passfail: fail +type: toascii + +===== +desc: 2-8-1 Zero-length label after Nameprep +namebase: <00AD> +nameutf8: +namezone: +failzone1: xn--kba +failzone2: xn-- +token: 18420037 +passfail: fail +type: toascii + +===== +desc: 2-9-1 U+3002 acts as a label separator +namebase: 3002-test<3002><00ED>dn +nameutf8: 3002-test。Ãdn +namezone: 3002-test.xn--dn-mja +failzone1: xn--3002-testdn-wcb2087m +failzone2: +token: 14217422 +passfail: pass +type: toascii + +===== +desc: 2-9-2 U+FF0E acts as a label separator +namebase: ff0e-test<FF0E><00ED>dn +nameutf8: ff0e-test.Ãdn +namezone: ff0e-test.xn--dn-mja +failzone1: xn--ff0e-testdn-wcb45865f +failzone2: +token: 94579179 +passfail: pass +type: toascii + +===== +desc: 2-9-3 U+FF61 acts as a label separator +namebase: ff61-test<FF61><00ED>dn +nameutf8: ff61-test。Ãdn +namezone: ff61-test.xn--dn-mja +failzone1: xn--ff61-testdn-wcb33975f +failzone2: +token: 27084042 +passfail: pass +type: toascii + +===== +desc: 3-2-1 Sharp S conversion; should display as m<00EB>ss <icu> ICU fixed the namezone token to to be m<00EB>ss since this is a tounicode without error.</icu> +namebase: xn--m<00DF>-jma +nameutf8: xn--mß-jma +namezone: m<00EB>ss +failzone1: +failzone2: +token: 85142449 +passfail: pass +type: tounicode + +===== +desc: 3-3-1 Old prefix; should not display as Unicode;<icu> ICU will treat this as ASCII. This sequence is not explicitly prohibited by the RFC.</icu> +namebase: iesg--dn-mja +nameutf8: iesg--dn-mja +namezone: +failzone1: +failzone2: +token: 35996358 +passfail: fail +type: tounicode + +===== +desc: 3-3-2 Old prefix; should not display as Unicode;<icu> ICU will treat this as ASCII. This sequence is not explicitly prohibited by the RFC.</icu> +namebase: iesgdn-mja +nameutf8: iesgdn-mja +namezone: +failzone1: +failzone2: +token: 13693467 +passfail: fail +type: tounicode + +===== +desc: 3-3-3 Old prefix; should not display as Unicode;<icu> ICU will treat this as ASCII. This sequence is not explicitly prohibited by the RFC.</icu> +namebase: bq--dn-mja +nameutf8: bq--dn-mja +namezone: +failzone1: +failzone2: +token: 77049719 +passfail: fail +type: tounicode + +===== +desc: 3-5-1 Non-ASCII code point before the last hyphen;\ + should not display as Unicode +namebase: xn--d<00F1>-mja +nameutf8: xn--dñ-mja +namezone: +failzone1: +failzone2: +token: 53043171 +passfail: fail +type: tounicode + +===== +desc: 3-5-2 Non-alphanumeric code point after the last hyphen;\ + should not display as Unicode +namebase: xn--dn-mj+ +nameutf8: xn--dn-mj+ +namezone: +failzone1: +failzone2: +token: 24626494 +passfail: fail +type: tounicode + +===== +desc: 3-5-3 Ends in the middle of an encoded delta value;\ + should not display as Unicode +namebase: xn--dn-mj +nameutf8: xn--dn-mj +namezone: +failzone1: +failzone2: +token: 30921132 +passfail: fail +type: tounicode + +===== +desc: 3-6-1 Nameprep -- prohibited character U+E000;\ + should not display as Unicode +namebase: xn--e000dn-l704a +nameutf8: xn--e000dn-l704a +namezone: +failzone1: +failzone2: +token: 02359753 +passfail: fail +type: tounicode + +===== +desc: 3-6-2 If using UseSTD3ASCIIRules, Step 3a -- leading hyphen; should not display as Unicode +namebase: xn---3dn-vpa +nameutf8: xn---3dn-vpa +namezone: +failzone1: +failzone2: +token: 99795165 +passfail: fail +type: tounicode + +===== +desc: 3-6-3 If using UseSTD3ASCIIRules, Step 3b -- trailing hyphen; should not display as Unicode +namebase: xn--3dn--upa +nameutf8: xn--3dn--upa +namezone: +failzone1: +failzone2: +token: 86051717 +passfail: fail +type: tounicode + +===== +desc: 3-6-4 Step 5 -- prefix exists; should not display as Unicode +namebase: xn--xn--dn-6va +nameutf8: xn--xn--dn-6va +namezone: +failzone1: +failzone2: +token: 02506789 +passfail: fail +type: tounicode + +===== +desc: 3-7-1 Punycode was not necessary; should not display as Unicode +namebase: xn--idn- +nameutf8: xn--idn- +namezone: +failzone1: +failzone2: +token: 21675918 +passfail: fail +type: tounicode + +===== +desc: 3-7-2 String did not go through Nameprep;\ + should not display as Unicode +namebase: xn--dn-vga +nameutf8: xn--dn-vga +namezone: +failzone1: +failzone2: +token: 18832454 +passfail: fail +type: tounicode + +===== +desc: 3-8-1 Should show the Unicode <00ED>4dn; <icu> Changed namebase and nameutf8 from xn--4dn-lla to xn--4dn-qma </icu> +namebase: xn--4dn-qma +nameutf8: xn--4dn-qma +namezone: <00ED>4dn +failzone1: +failzone2: +token: 23377435 +passfail: pass +type: tounicode + +===== +desc: 4-1-1-1 00adout<00AD><00ED>dn ->\ + 00adout<00ED>dn +namebase: 00adout<00AD><00ED>dn +nameutf8: 00adoutÂÃdn +namezone: xn--00adoutdn-m5a +failzone1: xn--00adoutdn-cna81e +failzone2: +token: 04299950 +passfail: pass +type: toascii + +===== +desc: 4-1-1-2 200dout<200D><00ED>dn ->\ + 200dout<00ED>dn +namebase: 200dout<200D><00ED>dn +nameutf8: 200doutâ€Ãdn +namezone: xn--200doutdn-m5a +failzone1: xn--200doutdn-m5a1678f +failzone2: +token: 00643243 +passfail: pass +type: toascii + +===== +desc: 4-1-2-1 simplecap<0044><00ED>dn ->\ + simplecap<0064><00ED>dn +namebase: simplecap<0044><00ED>dn +nameutf8: simplecapDÃdn +namezone: xn--simplecapddn-1fb +failzone1: +failzone2: +token: 36249795 +passfail: pass +type: toascii + +===== +desc: 4-1-2-2 latintogreek<00B5><00ED>dn ->\ + latintogreek<03BC><00ED>dn +namebase: latintogreek<00B5><00ED>dn +nameutf8: latintogreekµÃdn +namezone: xn--latintogreekdn-cmb716i +failzone1: xn--latintogreekdn-cxa01g +failzone2: +token: 03117407 +passfail: pass +type: toascii + +===== +desc: 4-1-2-3 latinext<00C7><00ED>dn ->\ + latinext<00E7><00ED>dn +namebase: latinext<00C7><00ED>dn +nameutf8: latinextÇÃdn +namezone: xn--latinextdn-v6a6e +failzone1: xn--latinextdn-twa07b +failzone2: +token: 10243505 +passfail: pass +type: toascii + +===== +desc: 4-1-2-4 sharps<00DF><00ED>dn ->\ + sharpsss<00ED>dn +namebase: sharps<00DF><00ED>dn +nameutf8: sharpsßÃdn +namezone: xn--sharpsssdn-r8a +failzone1: xn--sharpsdn-vya4l +failzone2: +token: 84921656 +passfail: pass +type: toascii + +===== +desc: 4-1-2-5 turkishi<0130><00ED>dn ->\ + turkishi<0069><0307><00ED>dn +namebase: turkishi<0130><00ED>dn +nameutf8: turkishiÄ°Ãdn +namezone: xn--turkishiidn-wcb701e +failzone1: xn--turkishidn-r8a71f +failzone2: +token: 02381730 +passfail: pass +type: toascii + +===== +desc: 4-1-2-6 exptwo<0149><00ED>dn ->\ + exptwo<02BC><006E><00ED>dn +namebase: exptwo<0149><00ED>dn +nameutf8: exptwoʼnÃdn +namezone: xn--exptwondn-m5a502c +failzone1: xn--exptwodn-h2a33g +failzone2: +token: 10575203 +passfail: pass +type: toascii + +===== +desc: 4-1-2-7 addfold<03D2><00ED>dn ->\ + addfold<03C5><00ED>dn +namebase: addfold<03D2><00ED>dn +nameutf8: addfoldÏ’Ãdn +namezone: xn--addfolddn-m5a121f +failzone1: xn--addfolddn-m5a462f +failzone2: +token: 31493044 +passfail: pass +type: toascii + +===== +desc: 4-1-2-8 expthree<1F52><00ED>dn ->\ + expthree<03C5><0313><0300><00ED>dn +namebase: expthree<1F52><00ED>dn +nameutf8: expthreeá½’Ãdn +namezone: xn--expthreedn-r8a5844g +failzone1: +failzone2: +token: 68144622 +passfail: pass +type: toascii + +===== +desc: 4-1-2-9 nonbmp<10400><00ED>dn ->\ + nonbmp<10428><00ED>dn +namebase: nonbmp<10400><00ED>dn +nameutf8: nonbmpÐCΤn +namezone: xn--nonbmpdn-h2a34747d +failzone1: xn--nonbmpdn-h2a37046d +failzone2: +token: 35393212 +passfail: pass +type: toascii + +===== +desc: 4-1-2-10 nonbmptoascii<1D400><00ED>dn ->\ + nonbmptoasciia<00ED>dn +namebase: nonbmptoascii<1D400><00ED>dn +nameutf8: nonbmptoasciiÝCΤn +namezone: xn--nonbmptoasciiadn-msb +failzone1: xn--nonbmptoasciidn-hpb54112i +failzone2: +token: 78182502 +passfail: pass +type: toascii + +===== +desc: 4-2-1-1 regcomb<0065><0301><00ED>dn ->\ + regcomb<00E9><00ED>dn +namebase: regcomb<0065><0301><00ED>dn +nameutf8: regcombeÌÃdn +namezone: xn--regcombdn-h4a8b +failzone1: xn--regcombedn-r8a794d +failzone2: +token: 87647045 +passfail: pass +type: toascii + +===== +desc: 4-2-1-2 combandcase<0045><0301><00ED>dn ->\ + combandcase<00E9><00ED>dn +namebase: combandcase<0045><0301><00ED>dn +nameutf8: combandcaseEÌÃdn +namezone: xn--combandcasedn-lhb4d +failzone1: xn--combandcaseedn-cmb526f +failzone2: +token: 61741185 +passfail: pass +type: toascii + +===== +desc: 4-2-1-3 adjcomb<00BA><0301><00ED>dn ->\ + adjcomb<00F3><00ED>dn +namebase: adjcomb<00BA><0301><00ED>dn +nameutf8: adjcombºÌÃdn +namezone: xn--adjcombdn-m5a9d +failzone1: xn--adjcombdn-1qa57cp3r +failzone2: +token: 14828402 +passfail: pass +type: toascii + +===== +desc: 4-2-1-4 extcombo<0063><0301><00ED>dn ->\ + extcombo<0107><00ED>dn +namebase: extcombo<0063><0301><00ED>dn +nameutf8: extcombocÌÃdn +namezone: xn--extcombodn-r8a52a +failzone1: xn--extcombocdn-wcb920e +failzone2: +token: 26651277 +passfail: pass +type: toascii + +===== +desc: 4-2-1-5 doublediac1<0075><0308><0301><00ED>dn ->\ + doublediac2<01D8><00ED>dn +namebase: doublediac1<0075><0308><0301><00ED>dn +nameutf8: doublediac1üÌÃdn +namezone: xn--doublediac1dn-6ib836a +failzone1: xn--doublediac1udn-cmb526fnd +failzone2: +token: 30175595 +passfail: pass +type: toascii + +===== +desc: 4-2-1-6 doublediac2<0075><0301><0308><00ED>dn ->\ + doublediac2<01D8><00ED>dn +namebase: doublediac2<0075><0301><0308><00ED>dn +nameutf8: doublediac2uÌ̈Ãdn +namezone: xn--doublediac2dn-6ib8qs73a +failzone1: xn--doublediac2udn-cmb526fod +failzone2: +token: 35606109 +passfail: pass +type: toascii + +===== +desc: 4-2-2-1 newnorm<2F874><00ED>dn ->\ + newnorm<5F33><00ED>dn should not become <5F53> +namebase: newnorm<2F874><00ED>dn +nameutf8: newnorm௡ՃΤn +namezone: xn--newnormdn-m5a7856x +failzone1: xn--newnormdn-m5a9396x +failzone2: xn--newnormdn-m5a9968x +token: 61901810 +passfail: pass +type: toascii + +===== +desc: 4-3-1 If UseSTD3ASCIIRules: Spacing; <icu> \u0020 is prohibited from the output only when UseSTD3ASCIIRules is set </icu> +namebase: <2000><00ED>dn +nameutf8:  Ãdn +namezone: +failzone1: xn--dn-mja3392a +failzone2: +token: 13226878 +passfail: fail +type: toascii + +===== +desc: 4-3-2 Control +namebase: <06DD><00ED>dn-2 +nameutf8: ÛÃdn-2 +namezone: +failzone1: xn--dn-2-upa332g +failzone2: +token: 09873312 +passfail: fail +type: toascii + +===== +desc: 4-3-3 Private use +namebase: <E005><00ED>dn +nameutf8: Ãdn +namezone: +failzone1: xn--dn-mja1659t +failzone2: +token: 03937183 +passfail: fail +type: toascii + +===== +desc: 4-3-4 Private use, non-BMP +namebase: <F0005><00ED>dn +nameutf8: 㰀ƃΤn +namezone: +failzone1: xn--dn-mja7922x +failzone2: +token: 78707823 +passfail: fail +type: toascii + +===== +desc: 4-3-5 Non-character +namebase: <FDDD><00ED>dn +nameutf8: ï·Ãdn +namezone: +failzone1: xn--dn-mja1210x +failzone2: +token: 44432178 +passfail: fail +type: toascii + +===== +desc: 4-3-6 Non-character, non-BMP +namebase: <1FFFE><00ED>dn +nameutf8: ߿߃Τn +namezone: +failzone1: xn--dn-mja7922x +failzone2: +token: 69142686 +passfail: fail +type: toascii + +===== +desc: 4-3-7 Surrogate points +namebase: <D805><00ED>dn +nameutf8: �Ãdn +namezone: +failzone1: xn--dn-mja7922x +failzone2: +token: 05424571 +passfail: fail +type: toascii + +===== +desc: 4-3-8 Inappropriate for plain +namebase: <FFFA><00ED>dn +nameutf8: Ãdn +namezone: +failzone1: xn--dn-mja5822x +failzone2: +token: 44825824 +passfail: fail +type: toascii + +===== +desc: 4-3-9 Inappropriate for canonical +namebase: <2FF5><00ED>dn +nameutf8: ⿵Ãdn +namezone: +failzone1: xn--dn-mja3729b +failzone2: +token: 50926136 +passfail: fail +type: toascii + +===== +desc: 4-3-10 Change display simple +namebase: <206A><00ED>dn +nameutf8: âªÃdn +namezone: +failzone1: xn--dn-mja7533a +failzone2: +token: 57953313 +passfail: fail +type: toascii + +===== +desc: 4-3-11 Change display RTL +namebase: <200F><00ED>dn +nameutf8: â€Ãdn +namezone: +failzone1: xn--dn-mja3992a +failzone2: +token: 30705279 +passfail: fail +type: toascii + +===== +desc: 4-3-12 Language tags +namebase: <E0001><E0045><E004E><0068><0069>idn +nameutf8: 㠀³ƳϨiidn +namezone: +failzone1: xn--hiidn-km43aaa +failzone2: +token: 44598039 +passfail: fail +type: toascii + +===== +desc: 4-4-1 Arabic RandALCat-LCat-RandALCat +namebase: <0628><006F><0638> +nameutf8: بoظ +namezone: +failzone1: xn--o-0mc3c +failzone2: +token: 78233053 +passfail: fail +type: toascii + +===== +desc: 4-4-2 Arabic RandALCat-RandALCat-other +namebase: <0628><0638><006F> +nameutf8: بظo +namezone: +failzone1: xn--o-0mc2c +failzone2: +token: 95299621 +passfail: fail +type: toascii + +===== +desc: 4-4-3 Arabic other-RandALCat-RandALCat +namebase: <006F><0628><0638> +nameutf8: oبظ +namezone: +failzone1: xn--o-1mc2c +failzone2: +token: 79807176 +passfail: fail +type: toascii + +===== +desc: 4-4-4 Hebrew RandALCat-LCat-RandALCat +namebase: <05D1><006F><05E1> +nameutf8: בoס +namezone: +failzone1: xn--o-1hc3c +failzone2: +token: 32229450 +passfail: fail +type: toascii + +===== +desc: 4-4-5 Hebrew RandALCat-RandALCat-other +namebase: <05D1><05E1><006F> +nameutf8: בסo +namezone: +failzone1: xn--o-1hc2c +failzone2: +token: 53213348 +passfail: fail +type: toascii + +===== +desc: 4-4-6 Hebrew other-RandALCat-RandALCat +namebase: <006F><05D1><05E1> +nameutf8: oבס +namezone: +failzone1: xn--o-2hc2c +failzone2: +token: 90835860 +passfail: fail +type: toascii + +===== +desc: 5-1-1 Unassigned in BMP; zone editors should reject +namebase: <0237><00ED>dn +nameutf8: È·Ãdn +namezone: xn--dn-mja33k +failzone1: +failzone2: +token: 83079602 +passfail: pass +type: toascii + +===== +desc: 5-1-2 Unassinged outside BMP; zone editors should reject +namebase: <10205><00ED>dn +nameutf8: ЈƃΤn +namezone: xn--dn-mja7734x +failzone1: xn--dn-mja7922x +failzone2: +token: 03682900 +passfail: pass +type: toascii + +===== +desc: 5-2-1 Newly assigned in BMP; zone editors should reject +namebase: <0234><00ED>dn +nameutf8: È´Ãdn +namezone: xn--dn-mja12k +failzone1: +failzone2: +token: 96637501 +passfail: pass +type: toascii + +===== +desc: 5-2-2 Newly assigned outside of BMP; zone editors should reject +namebase: <10005><00ED>dn +nameutf8: ЀƃΤn +namezone: xn--dn-mja9232x +failzone1: xn--dn-mja7922x +failzone2: +token: 95537699 +passfail: pass +type: toascii
\ No newline at end of file diff --git a/Build/source/libs/icu-xetex/test/testdata/idna_rules.txt b/Build/source/libs/icu-xetex/test/testdata/idna_rules.txt index ebfd6e3be55..7ef6404e951 100644 --- a/Build/source/libs/icu-xetex/test/testdata/idna_rules.txt +++ b/Build/source/libs/icu-xetex/test/testdata/idna_rules.txt @@ -1,8 +1,8 @@ -// Copyright (C) 2003, International Business Machines +// Copyright (C) 2003-2005, International Business Machines // WARNING: This file is machine generated by debug\genidn tool. Please DO NOT edit. -idna_rules{ +idna_rules:table(nofallback){ UnassignedSet{"[ \\u0221 \\u0234-\\u024F \\u02AE-\\u02AF \\u02EF-\\u02FF \\u0350-\\u035F \\u0370-\\u0373 " "\\u0376-\\u0379 \\u037B-\\u037D \\u037F-\\u0383 \\u038B \\u038D \\u03A2 \\u03CF " diff --git a/Build/source/libs/icu-xetex/test/testdata/iscii.bin b/Build/source/libs/icu-xetex/test/testdata/iscii.bin index 2c4944c1c16..88051f09455 100644 --- a/Build/source/libs/icu-xetex/test/testdata/iscii.bin +++ b/Build/source/libs/icu-xetex/test/testdata/iscii.bin @@ -1,19 +1,19 @@ -//*******************************************************************************
-//*
-//*Copyright(C)1998-2000InternationalBusinessMachines
-//*Corporationandothers.AllRightsReserved.
-//*
-//*******************************************************************************
-iscii{
- str{
- " ï4ï3ÍÝï4ï3Æá×è³å .³á .¬³ .¤ÅèÍÍÆ .³á ¤ÆÝ×ÚÏ 1990 ³ ³¢ÈèÍÞ½Ï-ÈèÏÊ¢ÅÛ ×Þ¸ÆÚ"
- "ÈèÏÁÚÑÜ .³á .ÍåµÄÚÆ .³á .ÉÑ×èÔÏÞÈ .ÔÛÕèÔ .Ìᢠ.×ÚÑÚÆÚ .2200 ¤ÏÊ ÏÝÈÍá ÌÞÑèÍ"
- "³Ü .4Ô×èÂÝ°¢ .4³Ú .4¨ÂèÈÚÄÆ .4ØåµÚ, .3ºÊ³Û .3³¢ÈèÍÞ½Ï .3³Ú .3³ÝÑ .3ÍåµÄÚÆ .3¦××á"
- "³ØÛ ./ºèÍÚÄÚ ./ØåµÚê ./¤ÆÝ×¢ÅÚÆ ./³Ü ./¸ÏÌ ×ÜÌÚ°¢ ÈÏ ÈØÝ¢¸Æá ³á ÑÛ¬ ³¢ÈèÍÞ½Ï"
- "¬³ ./¥Ì ./ºÏÞÏ ./ºâ×Ú ÊÆ µÍÚ Øâê ËÚÏ ÌᢠËÜ, ´Ú×³Ï ÌæºÞÄÚ ×ϳÚÏ"
- "Æá, ³¢ÈèÍÞ½Ï ³á ÈèÏÍåµ ÈÏ ºÊÏÄ×è ¬¿é ѵÚÍÜ Øâ, ³Û¢ÂÝ ¦×³á ×ÏȽ Äæ¿é"
- "ѵÚÆá .2³á .2ÑÛ¬ .2³èÍÚ .2×ÈÚ½ .2ÏÚ×èÂÚ .2¨ÈÑÊèÅ .Øâ, .¤ÃÔÚ .ÔÛÕèÔ .Ìᢠ.³¢ÈèÍÞ½Ï .³Ü"
- "×ÉÑÂÚ .3Ô .3ÔÛÉÑÂÚ .3×á .3×ʳ .3Ñá .3³Ï .3³èÍÚ .3ØÌ .3¦×³Ú .3ÍݳèÂÛÈÞÏèÁ .2ÔÛ×èÂÚÏ "
- "¤Èá³èÖÛ ³Ï ׳ᢵá ? "
- }
-}
\ No newline at end of file +//******************************************************************************* +//* +//*Copyright (C)1998-2006 International Business Machines +//*Corporation and others.All Rights Reserved. +//* +//******************************************************************************* +iscii:table(nofallback){ + str{ + " ï4ï3ÍÝï4ï3Æá×è³å .³á .¬³ .¤ÅèÍÍÆ .³á ¤ÆÝ×ÚÏ 1990 ³ ³¢ÈèÍÞ½Ï-ÈèÏÊ¢ÅÛ ×Þ¸ÆÚ" + "ÈèÏÁÚÑÜ .³á .ÍåµÄÚÆ .³á .ÉÑ×èÔÏÞÈ .ÔÛÕèÔ .Ìᢠ.×ÚÑÚÆÚ .2200 ¤ÏÊ ÏÝÈÍá ÌÞÑèÍ" + "³Ü .4Ô×èÂÝ°¢ .4³Ú .4¨ÂèÈÚÄÆ .4ØåµÚ, .3ºÊ³Û .3³¢ÈèÍÞ½Ï .3³Ú .3³ÝÑ .3ÍåµÄÚÆ .3¦××á" + "³ØÛ ./ºèÍÚÄÚ ./ØåµÚê ./¤ÆÝ×¢ÅÚÆ ./³Ü ./¸ÏÌ ×ÜÌÚ°¢ ÈÏ ÈØÝ¢¸Æá ³á ÑÛ¬ ³¢ÈèÍÞ½Ï" + "¬³ ./¥Ì ./ºÏÞÏ ./ºâ×Ú ÊÆ µÍÚ Øâê ËÚÏ ÌᢠËÜ, ´Ú×³Ï ÌæºÞÄÚ ×ϳÚÏ" + "Æá, ³¢ÈèÍÞ½Ï ³á ÈèÏÍåµ ÈÏ ºÊÏÄ×è ¬¿é ѵÚÍÜ Øâ, ³Û¢ÂÝ ¦×³á ×ÏȽ Äæ¿é" + "ѵÚÆá .2³á .2ÑÛ¬ .2³èÍÚ .2×ÈÚ½ .2ÏÚ×èÂÚ .2¨ÈÑÊèÅ .Øâ, .¤ÃÔÚ .ÔÛÕèÔ .Ìᢠ.³¢ÈèÍÞ½Ï .³Ü" + "×ÉÑÂÚ .3Ô .3ÔÛÉÑÂÚ .3×á .3×ʳ .3Ñá .3³Ï .3³èÍÚ .3ØÌ .3¦×³Ú .3ÍݳèÂÛÈÞÏèÁ .2ÔÛ×èÂÚÏ " + "¤Èá³èÖÛ ³Ï ׳ᢵá ? " + } +} diff --git a/Build/source/libs/icu-xetex/test/testdata/letest.xml b/Build/source/libs/icu-xetex/test/testdata/letest.xml new file mode 100644 index 00000000000..e3de0f0897e --- /dev/null +++ b/Build/source/libs/icu-xetex/test/testdata/letest.xml @@ -0,0 +1,1048 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Copyright (c) 1999-2006 International Business Machines + Corporation and others. All rights reserved. + + WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT + UNLESS YOU REALLY KNOW WHAT YOU'RE DOING. + + file name: letest.xml + generated on: 07/27/2006 04:42:26 PM Hawaiian Standard Time + generated by: gendata.cpp +--> + +<layout-tests> + <test-case id="Ghita" script="deva"> + <test-font name="raghu.ttf" version="Version 0.99" checksum="0x541C94C7"/> + + <test-text>शà¥à¤°à¥€à¤®à¤¦à¥ à¤à¤—वदà¥à¤—ीता अधà¥à¤¯à¤¾à¤¯ अरà¥à¤œà¥à¤¨ विषाद योग धृतराषà¥à¤Ÿà¥à¤° उवाचृ धरà¥à¤®à¤•à¥à¤·à¥‡à¤¤à¥à¤°à¥‡ कà¥à¤°à¥à¤•à¥à¤·à¥‡à¤¤à¥à¤°à¥‡ समवेता यà¥à¤¯à¥à¤¤à¥à¤¸à¤µà¤ƒ मामकाः पाणà¥à¤¡à¤µà¤¾à¤¶à¥à¤šà¥ˆà¤µ किमकà¥à¤°à¥à¤µà¤¤ संजव</test-text> + + <result-glyphs> + 0x0000012E, 0x0000FFFF, 0x0000FFFF, 0x00000222, 0x00000098, 0x0000026E, 0x0000FFFF, 0x00000003, + 0x00000097, 0x00000082, 0x0000009D, 0x000001A5, 0x0000FFFF, 0x0000FFFF, 0x00000222, 0x0000008F, + 0x00000221, 0x00000003, 0x0000005C, 0x000000DA, 0x0000FFFF, 0x00000099, 0x00000221, 0x00000099, + 0x00000003, 0x0000005C, 0x00000087, 0x000001D5, 0x0000005B, 0x0000FFFF, 0x00000093, 0x00000003, + 0x000001D2, 0x0000009D, 0x0000009F, 0x00000221, 0x00000091, 0x00000003, 0x00000099, 0x0000022A, + 0x00000082, 0x00000003, 0x00000092, 0x000001D9, 0x0000008F, 0x0000009A, 0x00000221, 0x000001B6, + 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000060, 0x0000009D, 0x00000221, + 0x00000085, 0x000001D9, 0x00000003, 0x00000092, 0x00000098, 0x0000005B, 0x0000FFFF, 0x000000A2, + 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x0000011F, 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x00000003, + 0x00000080, 0x000001D5, 0x0000009A, 0x000001FD, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x0000022F, + 0x0000011F, 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x00000003, 0x000000A0, 0x00000098, 0x0000009D, + 0x0000022F, 0x0000008F, 0x00000221, 0x00000003, 0x00000099, 0x000001D5, 0x00000099, 0x000001D5, + 0x000000D7, 0x0000FFFF, 0x000000A0, 0x0000009D, 0x0000022C, 0x00000003, 0x00000098, 0x00000221, + 0x00000098, 0x00000080, 0x00000221, 0x0000022C, 0x00000003, 0x00000094, 0x00000221, 0x000000D6, + 0x0000FFFF, 0x0000008C, 0x0000009D, 0x00000221, 0x000001B1, 0x0000FFFF, 0x0000FFFF, 0x00000230, + 0x0000009D, 0x00000003, 0x000001D1, 0x00000080, 0x00000098, 0x00000080, 0x000001D5, 0x0000009D, + 0x0000005B, 0x0000FFFF, 0x0000008F, 0x00000003, 0x000000A0, 0x00000232, 0x00000087, 0x0000009D + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000002, 0x00000001, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, + 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, + 0x00000018, 0x00000019, 0x0000001C, 0x0000001D, 0x0000001A, 0x0000001B, 0x0000001E, 0x0000001F, + 0x00000021, 0x00000020, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, + 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000033, 0x00000032, 0x00000034, 0x00000035, 0x00000036, 0x00000037, + 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003E, 0x0000003C, 0x0000003D, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000045, 0x00000044, 0x00000046, 0x00000047, + 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000052, 0x00000051, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, + 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, + 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, + 0x00000078, 0x00000079, 0x0000007B, 0x0000007A, 0x0000007C, 0x0000007D, 0x0000007E, 0x00000081, + 0x0000007F, 0x00000080, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 9.468750, 0.000000, 9.468750, 0.000000, 9.468750, 0.000000, + 13.125000, 0.000000, 22.593750, 0.000000, 30.562500, 0.000000, 30.562500, 0.000000, + 36.562500, 0.000000, 46.031250, 0.000000, 55.500000, 0.000000, 63.468750, 0.000000, + 71.437500, 0.000000, 71.437500, 0.000000, 71.437500, 0.000000, 75.093750, 0.000000, + 83.062500, 0.000000, 86.718750, 0.000000, 92.718750, 0.000000, 102.656250, 0.000000, + 109.921875, 0.000000, 109.921875, 0.000000, 119.390625, 0.000000, 123.046875, 0.000000, + 132.515625, 0.000000, 138.515625, 0.000000, 148.453125, 0.000000, 158.203125, -0.011719, + 158.203125, 0.263672, 157.921875, 0.000000, 157.921875, 0.000000, 167.390625, 0.000000, + 173.390625, 0.000000, 177.750000, 0.000000, 185.718750, 0.000000, 193.687500, 0.000000, + 197.343750, 0.000000, 205.312500, 0.000000, 211.312500, 0.000000, 220.781250, 0.000000, + 224.859375, 0.000000, 234.328125, 0.000000, 240.328125, 0.000000, 250.224609, -0.011719, + 249.796875, 0.000000, 257.765625, 0.000000, 264.281250, 0.000000, 267.937500, 0.000000, + 276.281250, 0.000000, 276.281250, 0.000000, 276.281250, 0.000000, 276.281250, 0.000000, + 276.281250, 0.000000, 282.281250, 0.000000, 290.250000, 0.000000, 298.218750, 0.000000, + 301.875000, 0.000000, 311.859375, -0.011719, 311.343750, 0.000000, 317.343750, 0.000000, + 326.812500, 0.000000, 336.644531, 0.263672, 336.281250, 0.000000, 336.281250, 0.000000, + 347.156250, 0.000000, 347.156250, 0.000000, 346.353516, 0.275391, 347.156250, 0.000000, + 355.125000, 0.000000, 355.125000, 0.000000, 355.263672, 0.263672, 355.125000, 0.000000, + 361.125000, 0.000000, 368.824219, -0.011719, 372.000000, 0.000000, 378.515625, 0.000000, + 379.875000, 0.000000, 390.750000, 0.000000, 390.750000, 0.000000, 389.947266, 0.275391, + 390.750000, 0.000000, 398.718750, 0.000000, 398.718750, 0.000000, 398.857422, 0.263672, + 398.718750, 0.000000, 404.718750, 0.000000, 414.187500, 0.000000, 423.656250, 0.000000, + 430.769531, 0.263672, 431.625000, 0.000000, 439.593750, 0.000000, 443.250000, 0.000000, + 449.250000, 0.000000, 458.859375, -0.011719, 458.718750, 0.000000, 468.328125, -0.011719, + 468.187500, 0.000000, 474.117188, 0.000000, 474.117188, 0.000000, 483.585938, 0.000000, + 491.554688, 0.000000, 495.914063, 0.000000, 501.914063, 0.000000, 511.382813, 0.000000, + 515.039063, 0.000000, 524.507813, 0.000000, 535.382813, 0.000000, 539.039063, 0.000000, + 543.398438, 0.000000, 549.398438, 0.000000, 557.367188, 0.000000, 561.023438, 0.000000, + 568.289063, 0.000000, 568.289063, 0.000000, 576.257813, 0.000000, 584.226563, 0.000000, + 587.882813, 0.000000, 598.757813, 0.000000, 598.757813, 0.000000, 598.628906, 0.263672, + 598.757813, 0.000000, 606.726563, 0.000000, 612.726563, 0.000000, 617.085938, 0.000000, + 627.960938, 0.000000, 637.429688, 0.000000, 645.128906, -0.011719, 648.304688, 0.000000, + 656.566406, 0.263672, 656.273438, 0.000000, 656.273438, 0.000000, 664.242188, 0.000000, + 670.242188, 0.000000, 679.429688, 0.966797, 679.710938, 0.000000, 689.179688, 0.000000, + 697.148438, 0.000000 + </result-positions> + </test-case> + + <test-case id="Arabic" script="arab"> + <test-font name="CODE2000.TTF" version="Version 1.15" checksum="0x1B2AD10D"/> + + <test-text>أساسًا، تتعامل الØواسيب Ùقط مع الأرقام، وتقوم بتخزين الأØر٠والمØار٠الأخرى بعد أن تÙعطي رقما معينا لكل واØد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمØارÙØŒ ولم يوجد نظام تشÙير واØد ÙŠØتوي على جميع المØار٠الضرورية</test-text> + + <result-glyphs> + 0x0000C6ED, 0x0000C74C, 0x0000C706, 0x0000C746, 0x0000C707, 0x0000C719, 0x0000C738, 0x0000C6E6, + 0x00000003, 0x0000C72A, 0x0000C706, 0x0000C6E7, 0x0000C6FD, 0x0000C73D, 0x0000C738, 0x0000C6E6, + 0x00000003, 0x0000C723, 0x0000C74D, 0x0000C73D, 0x0000C6F8, 0x00000003, 0x0000C749, 0x0000C739, + 0x0000C724, 0x00000003, 0x0000C74A, 0x0000C747, 0x0000C6F1, 0x0000C6FD, 0x0000C74C, 0x00000003, + 0x0000C703, 0x0000C6FC, 0x0000C6E6, 0x0000C746, 0x00000003, 0x0000C707, 0x0000C74D, 0x0000C72D, + 0x0000C711, 0x0000C6F0, 0x00000003, 0x0000C73A, 0x0000C6E7, 0x0000C721, 0x0000C740, 0x00000003, + 0x0000C703, 0x0000C6F8, 0x0000C747, 0x0000C74C, 0x00000003, 0x0000C73B, 0x0000C738, 0x0000C746, + 0x00000003, 0x00000534, 0x0000C72A, 0x0000C706, 0x0000C6E7, 0x0000C6FD, 0x0000C73D, 0x0000C739, + 0x0000C738, 0x00000003, 0x0000C73A, 0x0000C6E7, 0x0000C730, 0x0000C706, 0x0000FFFE, 0x0000C750, + 0x0000C6E6, 0x00000003, 0x0000C742, 0x0000C705, 0x0000C744, 0x00000003, 0x0000C713, 0x0000C74D, + 0x0000C715, 0x0000C701, 0x0000C6F0, 0x0000C746, 0x00000003, 0x0000C707, 0x0000C74D, 0x0000C72D, + 0x0000C711, 0x0000C6F1, 0x0000C739, 0x0000C738, 0x00000003, 0x0000C6ED, 0x0000C73D, 0x0000C721, + 0x0000C740, 0x0000FFFE, 0x0000C750, 0x0000C6E6, 0x00000003, 0x0000C6EE, 0x0000C6E7, 0x0000053C, + 0x0000C73C, 0x00000003, 0x0000C732, 0x0000C6E7, 0x0000C741, 0x0000C744, 0x00000003, 0x0000C73E, + 0x0000C6E7, 0x0000C734, 0x00000003, 0x00000534, 0x00000005, 0x0000C702, 0x0000C747, 0x0000C735, + 0x00000561, 0x0000C740, 0x0000C747, 0x0000C74C, 0x00000005, 0x00000003, 0x0000C722, 0x0000C6E6, + 0x0000C707, 0x0000C6F1, 0x0000C700, 0x0000C6E6, 0x00000003, 0x0000C737, 0x0000C6EB, 0x0000C730, + 0x0000C746, 0x00000003, 0x00000011, 0x0000C6E7, 0x0000C745, 0x0000C741, 0x0000C73C, 0x00000003, + 0x0000C703, 0x0000C6FC, 0x0000C6E6, 0x0000C746, 0x00000003, 0x0000C737, 0x0000C735, 0x0000C738, + 0x00000003, 0x0000C6E7, 0x0000C741, 0x0000C74D, 0x0000C725, 0x0000C73C, 0x00000003, 0x0000C6E7, + 0x0000C73D, 0x0000C730, 0x0000C706, 0x00000003, 0x0000C74B, 0x0000C71D, 0x0000C725, 0x00000560, + 0x0000C6F0, 0x00000003, 0x0000C73E, 0x0000C6DC, 0x00000003, 0x0000C703, 0x0000C725, 0x0000C6EA, + 0x00000003, 0x0000C748, 0x0000C707, 0x0000C700, 0x0000FFFE, 0x0000C750, 0x0000C6E6, 0x00000003, + 0x0000C72A, 0x0000C706, 0x0000C6E7, 0x0000C6FD, 0x0000C73D, 0x0000C738, 0x0000C6E6, 0x0000C746, + 0x00000003, 0x0000C72A, 0x0000C707, 0x0000C6FC, 0x0000FFFE, 0x0000C750, 0x0000C6E6, 0x00000003, + 0x0000C73F, 0x0000C74C, 0x0000C709, 0x0000C701, 0x0000C6F1, 0x0000C6EA, 0x00000003, 0x0000C73A, + 0x0000C747, 0x0000C731, 0x0000C6F0, 0x0000C746, 0x00000003, 0x00000534, 0x0000C73A, 0x0000C6E7, + 0x0000C730, 0x0000C706, 0x0000FFFE, 0x0000C750, 0x0000C6E6, 0x00000003, 0x0000C723, 0x0000C73C, + 0x00000003, 0x0000C71B, 0x0000C731, 0x0000C72C, 0x00000003, 0x0000C6E9, 0x0000C74D, 0x0000C70C, + 0x0000C6E6, 0x0000C747, 0x0000C6FD, 0x0000C738, 0x0000C6E6, 0x00000003, 0x0000C737, 0x0000C73C, + 0x0000C6E7, 0x0000C725, 0x0000C6F1, 0x0000C6F0, 0x00000003, 0x00000534, 0x0000C6E7, 0x0000055C, + 0x0000C70C, 0x0000C6E7, 0x0000C70C, 0x0000C6DC + </result-glyphs> + + <result-indices> + 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4, + 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC, + 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4, + 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC, + 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4, + 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC, + 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4, + 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC, + 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4, + 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC, + 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4, + 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C, + 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094, + 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C, + 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084, + 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C, + 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074, + 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C, + 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064, + 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C, + 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054, + 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C, + 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044, + 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C, + 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034, + 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C, + 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024, + 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C, + 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014, + 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C, + 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004, + 0x00000003, 0x00000002, 0x00000001, 0x00000000 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 4.007813, 0.000000, 8.226563, 0.000000, 12.679688, 0.000000, + 18.679688, 0.000000, 23.132813, 0.000000, 31.289063, 0.000000, 34.312500, 0.000000, + 36.375000, 0.000000, 41.062500, 0.000000, 50.296875, 0.000000, 54.750000, 0.000000, + 56.859375, 0.000000, 62.367188, 0.000000, 66.632813, 0.000000, 69.656250, 0.000000, + 71.718750, 0.000000, 76.406250, 0.000000, 81.421875, 0.000000, 85.664063, 0.000000, + 89.929688, 0.000000, 95.742188, 0.000000, 100.429688, 0.000000, 108.796875, 0.000000, + 112.171875, 0.000000, 115.734375, 0.000000, 120.421875, 0.000000, 128.765625, 0.000000, + 134.765625, 0.000000, 139.007813, 0.000000, 144.515625, 0.000000, 148.734375, 0.000000, + 153.421875, 0.000000, 157.359375, 0.000000, 163.171875, 0.000000, 165.234375, 0.000000, + 171.234375, 0.000000, 175.921875, 0.000000, 180.375000, 0.000000, 184.617188, 0.000000, + 188.085938, 0.000000, 195.117188, 0.000000, 199.312500, 0.000000, 204.000000, 0.000000, + 208.007813, 0.000000, 210.117188, 0.000000, 217.054688, 0.000000, 220.429688, 0.000000, + 225.117188, 0.000000, 229.054688, 0.000000, 234.867188, 0.000000, 240.867188, 0.000000, + 245.085938, 0.000000, 249.773438, 0.000000, 253.781250, 0.000000, 256.804688, 0.000000, + 262.804688, 0.000000, 267.492188, 0.000000, 271.007813, 0.000000, 280.242188, 0.000000, + 284.695313, 0.000000, 286.804688, 0.000000, 292.312500, 0.000000, 296.578125, 0.000000, + 299.953125, 0.000000, 302.976563, 0.000000, 307.664063, 0.000000, 311.671875, 0.000000, + 313.781250, 0.000000, 317.882813, 0.000000, 322.335938, 0.000000, 322.335938, 0.000000, + 328.500000, 0.000000, 330.562500, 0.000000, 335.250000, 0.000000, 339.140625, 0.000000, + 343.078125, 0.000000, 348.984375, 0.000000, 353.671875, 0.000000, 366.445313, 0.000000, + 370.687500, 0.000000, 378.843750, 0.000000, 384.351563, 0.000000, 388.546875, 0.000000, + 394.546875, 0.000000, 399.234375, 0.000000, 403.687500, 0.000000, 407.929688, 0.000000, + 411.398438, 0.000000, 418.429688, 0.000000, 422.671875, 0.000000, 426.046875, 0.000000, + 429.070313, 0.000000, 433.757813, 0.000000, 437.765625, 0.000000, 442.031250, 0.000000, + 448.968750, 0.000000, 452.343750, 0.000000, 452.343750, 0.000000, 458.507813, 0.000000, + 460.570313, 0.000000, 465.257813, 0.000000, 474.492188, 0.000000, 476.601563, 0.000000, + 484.968750, 0.000000, 489.234375, 0.000000, 493.921875, 0.000000, 501.562500, 0.000000, + 503.671875, 0.000000, 507.890625, 0.000000, 513.796875, 0.000000, 518.484375, 0.000000, + 525.796875, 0.000000, 527.906250, 0.000000, 533.578125, 0.000000, 538.265625, 0.000000, + 541.781250, 0.000000, 547.171875, 0.000000, 550.710938, 0.000000, 556.710938, 0.000000, + 564.492188, 0.000000, 564.492188, 0.000000, 567.867188, 0.000000, 573.867188, 0.000000, + 578.085938, 0.000000, 583.476563, 0.000000, 588.164063, 0.000000, 593.976563, 0.000000, + 596.039063, 0.000000, 600.492188, 0.000000, 604.734375, 0.000000, 610.546875, 0.000000, + 612.609375, 0.000000, 617.296875, 0.000000, 623.695313, 0.000000, 627.937500, 0.000000, + 632.039063, 0.000000, 638.039063, 0.000000, 642.726563, 0.000000, 646.054688, 0.000000, + 648.164063, 0.000000, 651.914063, 0.000000, 656.132813, 0.000000, 660.398438, 0.000000, + 665.085938, 0.000000, 669.023438, 0.000000, 674.835938, 0.000000, 676.898438, 0.000000, + 682.898438, 0.000000, 687.585938, 0.000000, 693.984375, 0.000000, 701.765625, 0.000000, + 704.789063, 0.000000, 709.476563, 0.000000, 711.585938, 0.000000, 715.804688, 0.000000, + 720.046875, 0.000000, 723.515625, 0.000000, 727.781250, 0.000000, 732.468750, 0.000000, + 734.578125, 0.000000, 738.843750, 0.000000, 742.945313, 0.000000, 747.398438, 0.000000, + 752.085938, 0.000000, 760.453125, 0.000000, 767.390625, 0.000000, 770.859375, 0.000000, + 770.859375, 0.000000, 775.054688, 0.000000, 779.742188, 0.000000, 787.054688, 0.000000, + 789.398438, 0.000000, 794.085938, 0.000000, 798.023438, 0.000000, 801.492188, 0.000000, + 804.937500, 0.000000, 809.625000, 0.000000, 817.968750, 0.000000, 822.421875, 0.000000, + 828.234375, 0.000000, 828.234375, 0.000000, 834.398438, 0.000000, 836.460938, 0.000000, + 841.148438, 0.000000, 850.382813, 0.000000, 854.835938, 0.000000, 856.945313, 0.000000, + 862.453125, 0.000000, 866.718750, 0.000000, 869.742188, 0.000000, 871.804688, 0.000000, + 877.804688, 0.000000, 882.492188, 0.000000, 891.726563, 0.000000, 896.179688, 0.000000, + 901.992188, 0.000000, 901.992188, 0.000000, 908.156250, 0.000000, 910.218750, 0.000000, + 914.906250, 0.000000, 922.382813, 0.000000, 926.601563, 0.000000, 931.054688, 0.000000, + 936.562500, 0.000000, 940.804688, 0.000000, 944.250000, 0.000000, 948.937500, 0.000000, + 952.945313, 0.000000, 958.945313, 0.000000, 962.414063, 0.000000, 966.609375, 0.000000, + 972.609375, 0.000000, 977.296875, 0.000000, 980.812500, 0.000000, 984.820313, 0.000000, + 986.929688, 0.000000, 991.031250, 0.000000, 995.484375, 0.000000, 995.484375, 0.000000, + 1001.648438, 0.000000, 1003.710938, 0.000000, 1008.398438, 0.000000, 1013.414063, 0.000000, + 1017.679688, 0.000000, 1022.367188, 0.000000, 1030.312500, 0.000000, 1033.781250, 0.000000, + 1037.882813, 0.000000, 1042.570313, 0.000000, 1051.921875, 0.000000, 1056.164063, 0.000000, + 1062.984375, 0.000000, 1065.046875, 0.000000, 1071.046875, 0.000000, 1076.554688, 0.000000, + 1079.578125, 0.000000, 1081.640625, 0.000000, 1086.328125, 0.000000, 1092.726563, 0.000000, + 1096.992188, 0.000000, 1099.101563, 0.000000, 1102.570313, 0.000000, 1106.812500, 0.000000, + 1111.007813, 0.000000, 1115.695313, 0.000000, 1119.210938, 0.000000, 1121.320313, 0.000000, + 1121.320313, 0.000000, 1128.140625, 0.000000, 1130.250000, 0.000000, 1137.070313, 0.000000, + 1139.414063, 0.000000 + </result-positions> + </test-case> + + <test-case id="Unicode Arabic" script="arab"> + <test-font name="LucidaSansRegular.ttf" version="Version 1.20 - October 2000" checksum="0xF5D9BA6D"/> + + <test-text>أساسًا، تتعامل الØواسيب Ùقط مع الأرقام، وتقوم بتخزين الأØر٠والمØار٠الأخرى بعد أن تÙعطي رقما معينا لكل واØد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمØارÙØŒ ولم يوجد نظام تشÙير واØد ÙŠØتوي على جميع المØار٠الضرورية</test-text> + + <result-glyphs> + 0x00000872, 0x000008D1, 0x000003F9, 0x0000040B, 0x0000088C, 0x0000089E, 0x000008BD, 0x000003EF, + 0x00000003, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF, + 0x00000003, 0x000008A8, 0x000008D2, 0x000008C2, 0x0000087D, 0x00000003, 0x000008CE, 0x000008BE, + 0x000008A9, 0x00000003, 0x0000040D, 0x000008CC, 0x00000876, 0x00000882, 0x000008D1, 0x00000003, + 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2, + 0x00000896, 0x00000875, 0x00000003, 0x00000408, 0x0000086C, 0x000008A6, 0x000008C5, 0x00000003, + 0x00000888, 0x0000087D, 0x000008CC, 0x000008D1, 0x00000003, 0x000008C0, 0x000008BD, 0x0000040B, + 0x00000003, 0x000003E6, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BE, + 0x000008BD, 0x00000003, 0x00000408, 0x0000086C, 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5, + 0x000003EF, 0x00000003, 0x0000040A, 0x0000088A, 0x000008C9, 0x00000003, 0x00000898, 0x000008D2, + 0x0000089A, 0x00000886, 0x00000875, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2, + 0x00000896, 0x00000876, 0x000008BE, 0x000008BD, 0x00000003, 0x00000872, 0x000008C2, 0x000008A6, + 0x000008C5, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000003F2, 0x0000086C, 0x0000086A, + 0x000008C1, 0x00000003, 0x00000406, 0x0000086C, 0x000008C6, 0x000008C9, 0x00000003, 0x00000409, + 0x0000086C, 0x000008B9, 0x00000003, 0x000003E6, 0x00000005, 0x000003F7, 0x000008CC, 0x000008BA, + 0x00000413, 0x000008C5, 0x000008CC, 0x000008D1, 0x00000005, 0x00000003, 0x00000401, 0x000003EF, + 0x0000088C, 0x00000876, 0x00000885, 0x000003EF, 0x00000003, 0x000008BC, 0x00000870, 0x000008B5, + 0x0000040B, 0x00000003, 0x00000011, 0x0000086C, 0x000008CA, 0x000008C6, 0x000008C1, 0x00000003, + 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x000008BC, 0x000008BA, 0x000008BD, + 0x00000003, 0x0000086C, 0x000008C6, 0x000008D2, 0x000008AA, 0x000008C1, 0x00000003, 0x0000086C, + 0x000008C2, 0x000008B5, 0x000003F9, 0x00000003, 0x000008D0, 0x000008A2, 0x000008AA, 0x00000412, + 0x00000875, 0x00000003, 0x00000409, 0x000003EB, 0x00000003, 0x00000888, 0x000008AA, 0x0000086F, + 0x00000003, 0x0000040C, 0x0000088C, 0x00000885, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, + 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF, 0x0000040B, + 0x00000003, 0x00000404, 0x0000088C, 0x00000881, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, + 0x000008C4, 0x000008D1, 0x0000088E, 0x00000886, 0x00000876, 0x0000086F, 0x00000003, 0x00000408, + 0x000008CC, 0x000008B6, 0x00000875, 0x0000040B, 0x00000003, 0x000003E6, 0x00000408, 0x0000086C, + 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000008A8, 0x000008C1, + 0x00000003, 0x000008A0, 0x000008B6, 0x000008B1, 0x00000003, 0x0000086E, 0x000008D2, 0x00000891, + 0x000003EF, 0x000008CC, 0x00000882, 0x000008BD, 0x000003EF, 0x00000003, 0x000008BC, 0x000008C1, + 0x0000086C, 0x000008AA, 0x00000876, 0x00000875, 0x00000003, 0x000003E6, 0x0000086C, 0x0000040E, + 0x00000891, 0x0000086C, 0x00000891, 0x000003EB + </result-glyphs> + + <result-indices> + 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4, + 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC, + 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4, + 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC, + 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4, + 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC, + 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4, + 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC, + 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4, + 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC, + 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4, + 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C, + 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094, + 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C, + 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084, + 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C, + 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074, + 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C, + 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064, + 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C, + 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054, + 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C, + 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044, + 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C, + 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034, + 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C, + 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024, + 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C, + 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014, + 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C, + 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004, + 0x00000003, 0x00000002, 0x00000001, 0x00000000 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 6.316406, 0.000000, 10.382813, 0.000000, 15.492188, 0.000000, + 21.035156, 0.000000, 27.058594, 0.000000, 39.527344, 0.000000, 43.792969, 0.000000, + 47.408203, 0.000000, 51.205078, 0.000000, 66.216797, 0.000000, 71.326172, 0.000000, + 74.695313, 0.000000, 83.367188, 0.000000, 90.826172, 0.000000, 95.091797, 0.000000, + 98.707031, 0.000000, 102.503906, 0.000000, 109.962891, 0.000000, 114.949219, 0.000000, + 122.408203, 0.000000, 130.687500, 0.000000, 134.484375, 0.000000, 145.787109, 0.000000, + 150.773438, 0.000000, 156.884766, 0.000000, 160.681641, 0.000000, 172.277344, 0.000000, + 177.919922, 0.000000, 182.906250, 0.000000, 191.578125, 0.000000, 195.644531, 0.000000, + 199.441406, 0.000000, 206.507813, 0.000000, 214.787109, 0.000000, 218.402344, 0.000000, + 223.945313, 0.000000, 227.742188, 0.000000, 233.765625, 0.000000, 238.751953, 0.000000, + 245.185547, 0.000000, 257.982422, 0.000000, 262.048828, 0.000000, 265.845703, 0.000000, + 272.654297, 0.000000, 276.023438, 0.000000, 285.240234, 0.000000, 289.306641, 0.000000, + 293.103516, 0.000000, 300.169922, 0.000000, 308.449219, 0.000000, 314.091797, 0.000000, + 318.158203, 0.000000, 321.955078, 0.000000, 329.572266, 0.000000, 333.837891, 0.000000, + 339.380859, 0.000000, 343.177734, 0.000000, 346.974609, 0.000000, 361.986328, 0.000000, + 367.095703, 0.000000, 370.464844, 0.000000, 379.136719, 0.000000, 386.595703, 0.000000, + 391.582031, 0.000000, 395.847656, 0.000000, 399.644531, 0.000000, 406.453125, 0.000000, + 409.822266, 0.000000, 415.523438, 0.000000, 420.632813, 0.000000, 420.632813, 0.000000, + 427.441406, 0.000000, 431.056641, 0.000000, 434.853516, 0.000000, 441.357422, 0.000000, + 448.423828, 0.000000, 455.912109, 0.000000, 459.708984, 0.000000, 479.255859, 0.000000, + 484.242188, 0.000000, 496.710938, 0.000000, 505.382813, 0.000000, 509.449219, 0.000000, + 514.992188, 0.000000, 518.789063, 0.000000, 524.812500, 0.000000, 529.798828, 0.000000, + 536.232422, 0.000000, 549.029297, 0.000000, 554.015625, 0.000000, 559.001953, 0.000000, + 563.267578, 0.000000, 567.064453, 0.000000, 573.380859, 0.000000, 580.839844, 0.000000, + 590.056641, 0.000000, 594.123047, 0.000000, 594.123047, 0.000000, 600.931641, 0.000000, + 604.546875, 0.000000, 608.343750, 0.000000, 620.636719, 0.000000, 624.005859, 0.000000, + 628.992188, 0.000000, 635.830078, 0.000000, 639.626953, 0.000000, 653.361328, 0.000000, + 656.730469, 0.000000, 661.716797, 0.000000, 669.205078, 0.000000, 673.001953, 0.000000, + 683.777344, 0.000000, 687.146484, 0.000000, 692.660156, 0.000000, 696.457031, 0.000000, + 700.253906, 0.000000, 704.736328, 0.000000, 711.105469, 0.000000, 716.748047, 0.000000, + 722.994141, 0.000000, 722.994141, 0.000000, 727.060547, 0.000000, 732.703125, 0.000000, + 736.769531, 0.000000, 741.251953, 0.000000, 745.048828, 0.000000, 752.507813, 0.000000, + 756.123047, 0.000000, 762.146484, 0.000000, 767.132813, 0.000000, 775.412109, 0.000000, + 779.027344, 0.000000, 782.824219, 0.000000, 794.203125, 0.000000, 799.189453, 0.000000, + 804.890625, 0.000000, 810.433594, 0.000000, 814.230469, 0.000000, 818.027344, 0.000000, + 821.396484, 0.000000, 828.128906, 0.000000, 833.115234, 0.000000, 839.953125, 0.000000, + 843.750000, 0.000000, 850.816406, 0.000000, 859.095703, 0.000000, 862.710938, 0.000000, + 868.253906, 0.000000, 872.050781, 0.000000, 883.429688, 0.000000, 889.675781, 0.000000, + 893.941406, 0.000000, 897.738281, 0.000000, 901.107422, 0.000000, 906.093750, 0.000000, + 911.080078, 0.000000, 917.800781, 0.000000, 924.638672, 0.000000, 928.435547, 0.000000, + 931.804688, 0.000000, 939.263672, 0.000000, 944.964844, 0.000000, 950.074219, 0.000000, + 953.871094, 0.000000, 965.173828, 0.000000, 974.390625, 0.000000, 981.111328, 0.000000, + 981.111328, 0.000000, 985.177734, 0.000000, 988.974609, 0.000000, 999.750000, 0.000000, + 1003.365234, 0.000000, 1007.162109, 0.000000, 1014.228516, 0.000000, 1020.949219, 0.000000, + 1025.015625, 0.000000, 1028.812500, 0.000000, 1040.408203, 0.000000, 1046.431641, 0.000000, + 1054.710938, 0.000000, 1054.710938, 0.000000, 1061.519531, 0.000000, 1065.134766, 0.000000, + 1068.931641, 0.000000, 1083.943359, 0.000000, 1089.052734, 0.000000, 1092.421875, 0.000000, + 1101.093750, 0.000000, 1108.552734, 0.000000, 1112.818359, 0.000000, 1116.433594, 0.000000, + 1121.976563, 0.000000, 1125.773438, 0.000000, 1140.785156, 0.000000, 1146.808594, 0.000000, + 1155.087891, 0.000000, 1155.087891, 0.000000, 1161.896484, 0.000000, 1165.511719, 0.000000, + 1169.308594, 0.000000, 1180.541016, 0.000000, 1184.607422, 0.000000, 1190.630859, 0.000000, + 1199.302734, 0.000000, 1204.289063, 0.000000, 1208.355469, 0.000000, 1212.152344, 0.000000, + 1218.960938, 0.000000, 1224.603516, 0.000000, 1231.037109, 0.000000, 1235.103516, 0.000000, + 1240.646484, 0.000000, 1244.443359, 0.000000, 1248.240234, 0.000000, 1255.048828, 0.000000, + 1258.417969, 0.000000, 1264.119141, 0.000000, 1269.228516, 0.000000, 1269.228516, 0.000000, + 1276.037109, 0.000000, 1279.652344, 0.000000, 1283.449219, 0.000000, 1290.908203, 0.000000, + 1297.746094, 0.000000, 1301.542969, 0.000000, 1311.427734, 0.000000, 1317.861328, 0.000000, + 1323.562500, 0.000000, 1327.359375, 0.000000, 1341.492188, 0.000000, 1346.478516, 0.000000, + 1357.904297, 0.000000, 1361.519531, 0.000000, 1367.162109, 0.000000, 1375.833984, 0.000000, + 1380.099609, 0.000000, 1383.714844, 0.000000, 1387.511719, 0.000000, 1398.890625, 0.000000, + 1405.728516, 0.000000, 1409.097656, 0.000000, 1415.818359, 0.000000, 1420.804688, 0.000000, + 1424.871094, 0.000000, 1428.667969, 0.000000, 1432.464844, 0.000000, 1435.833984, 0.000000, + 1435.833984, 0.000000, 1447.259766, 0.000000, 1450.628906, 0.000000, 1462.054688, 0.000000, + 1465.669922, 0.000000 + </result-positions> + </test-case> + + <test-case id="Thai" script="thai"> + <test-font name="angsd___.ttf" version="Version 2.1 - July 1995" checksum="0x49B67200"/> + + <test-text>บทที่๑พายุไซโคลนโดโรธีà¸à¸²à¸¨à¸±à¸¢à¸à¸¢à¸¹à¹ˆà¸—่ามà¸à¸¥à¸²à¸‡à¸—ุ่งใหà¸à¹ˆà¹ƒà¸™à¹à¸„นซัสà¸à¸±à¸šà¸¥à¸¸à¸‡à¹€à¸®à¸™à¸£à¸µà¸Šà¸²à¸§à¹„ร่à¹à¸¥à¸°à¸›à¹‰à¸²à¹€à¸à¹‡à¸¡à¸ รรยาชาวไร่บ้านขà¸à¸‡à¸žà¸§à¸à¹€à¸‚าหลังเล็à¸à¹€à¸žà¸£à¸²à¸°à¹„ม้สร้างบ้านต้à¸à¸‡à¸‚นมาด้วยเà¸à¸§à¸µà¸¢à¸™à¹€à¸›à¹‡à¸™à¸£à¸°à¸¢à¸°à¸—างหลายไมล์</test-text> + + <result-glyphs> + 0x000000F3, 0x000000F0, 0x000000F0, 0x0000010E, 0x0000011D, 0x00000126, 0x000000F7, 0x0000010B, + 0x000000FB, 0x00000111, 0x00000119, 0x000000E4, 0x00000117, 0x000000DD, 0x000000FE, 0x000000F2, + 0x00000117, 0x000000ED, 0x00000117, 0x000000FC, 0x000000F1, 0x0000010E, 0x00000106, 0x0000010B, + 0x00000101, 0x0000010A, 0x000000FB, 0x00000106, 0x000000FB, 0x00000112, 0x0000013B, 0x000000F0, + 0x0000013B, 0x0000010B, 0x000000FA, 0x000000DA, 0x000000FE, 0x0000010B, 0x000000E0, 0x000000F0, + 0x00000111, 0x0000013B, 0x000000E0, 0x00000118, 0x00000104, 0x000000E6, 0x0000013B, 0x00000118, + 0x000000F2, 0x00000116, 0x000000DD, 0x000000F2, 0x000000E4, 0x0000010A, 0x00000103, 0x000000DA, + 0x0000010A, 0x000000F3, 0x000000FE, 0x00000111, 0x000000E0, 0x00000115, 0x00000107, 0x000000F2, + 0x000000FC, 0x0000010E, 0x000000E3, 0x0000010B, 0x00000100, 0x00000119, 0x000000FC, 0x0000013B, + 0x00000116, 0x000000FE, 0x00000109, 0x000000F4, 0x00000137, 0x0000010B, 0x00000115, 0x00000106, + 0x0000011C, 0x000000FA, 0x000000F9, 0x000000FC, 0x000000FC, 0x000000FB, 0x0000010B, 0x000000E3, + 0x0000010B, 0x00000100, 0x00000119, 0x000000FC, 0x0000013B, 0x000000F3, 0x0000013C, 0x0000010B, + 0x000000F2, 0x000000DB, 0x00000106, 0x000000E0, 0x000000F7, 0x00000100, 0x000000DA, 0x00000115, + 0x000000DB, 0x0000010B, 0x00000104, 0x000000FE, 0x0000010A, 0x000000E0, 0x00000115, 0x000000FE, + 0x0000011C, 0x000000DA, 0x00000115, 0x000000F7, 0x000000FC, 0x0000010B, 0x00000109, 0x00000119, + 0x000000FA, 0x0000013C, 0x00000103, 0x000000FC, 0x0000013C, 0x0000010B, 0x000000E0, 0x000000F3, + 0x0000013C, 0x0000010B, 0x000000F2, 0x000000EE, 0x0000013C, 0x00000106, 0x000000E0, 0x000000DB, + 0x000000F2, 0x000000FA, 0x0000010B, 0x000000ED, 0x0000013C, 0x00000100, 0x000000FB, 0x00000115, + 0x000000DA, 0x00000100, 0x0000010E, 0x000000FB, 0x000000F2, 0x00000115, 0x000000F4, 0x00000143, + 0x000000F2, 0x000000FC, 0x00000109, 0x000000FB, 0x00000109, 0x000000F0, 0x0000010B, 0x000000E0, + 0x00000104, 0x000000FE, 0x0000010B, 0x000000FB, 0x00000119, 0x000000FA, 0x000000FE, 0x0000013F + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, + 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, + 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, + 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, + 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, + 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, + 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, + 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, + 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, + 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, + 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 5.399414, 0.000000, 10.798828, 0.000000, 16.198242, 0.000000, + 16.198242, 0.000000, 16.198242, 0.000000, 21.046875, 0.000000, 26.616211, 0.000000, + 30.035156, 0.000000, 34.151367, 0.000000, 34.151367, 0.000000, 38.279297, 0.000000, + 43.558594, 0.000000, 47.663086, 0.000000, 52.438477, 0.000000, 57.178711, 0.000000, + 62.698242, 0.000000, 66.802734, 0.000000, 71.601563, 0.000000, 75.706055, 0.000000, + 79.810547, 0.000000, 84.369141, 0.000000, 84.369141, 0.000000, 89.097656, 0.000000, + 92.516602, 0.000000, 97.195313, 0.000000, 97.195313, 0.000000, 101.311523, 0.000000, + 106.040039, 0.000000, 110.156250, 0.000000, 110.156250, 0.000000, 110.156250, 0.000000, + 115.555664, 0.000000, 115.555664, 0.000000, 118.974609, 0.000000, 124.013672, 0.000000, + 128.765625, 0.000000, 133.505859, 0.000000, 136.924805, 0.000000, 140.704102, 0.000000, + 146.103516, 0.000000, 146.103516, 0.000000, 146.103516, 0.000000, 149.882813, 0.000000, + 153.553711, 0.000000, 159.158203, 0.000000, 165.421875, 0.000000, 165.421875, 0.000000, + 169.092773, 0.000000, 174.612305, 0.000000, 179.135742, 0.000000, 183.911133, 0.000000, + 189.430664, 0.000000, 194.709961, 0.000000, 194.709961, 0.000000, 199.989258, 0.000000, + 204.741211, 0.000000, 204.741211, 0.000000, 210.140625, 0.000000, 214.880859, 0.000000, + 214.880859, 0.000000, 218.660156, 0.000000, 220.675781, 0.000000, 225.128906, 0.000000, + 230.648438, 0.000000, 234.752930, 0.000000, 234.752930, 0.000000, 239.613281, 0.000000, + 243.032227, 0.000000, 247.280273, 0.000000, 251.408203, 0.000000, 255.512695, 0.000000, + 255.512695, 0.000000, 260.036133, 0.000000, 264.776367, 0.000000, 269.071289, 0.000000, + 274.470703, 0.000000, 274.470703, 0.000000, 277.889648, 0.000000, 279.905273, 0.000000, + 284.633789, 0.000000, 284.633789, 0.000000, 289.672852, 0.000000, 294.641602, 0.000000, + 298.746094, 0.000000, 302.850586, 0.000000, 306.966797, 0.000000, 310.385742, 0.000000, + 315.246094, 0.000000, 318.665039, 0.000000, 322.913086, 0.000000, 327.041016, 0.000000, + 331.145508, 0.000000, 331.145508, 0.000000, 336.544922, 0.000000, 336.544922, 0.000000, + 339.963867, 0.000000, 345.483398, 0.000000, 350.258789, 0.000000, 354.987305, 0.000000, + 358.766602, 0.000000, 364.335938, 0.000000, 368.583984, 0.000000, 373.335938, 0.000000, + 375.351563, 0.000000, 380.126953, 0.000000, 383.545898, 0.000000, 389.150391, 0.000000, + 393.890625, 0.000000, 393.890625, 0.000000, 397.669922, 0.000000, 399.685547, 0.000000, + 404.425781, 0.000000, 404.425781, 0.000000, 409.177734, 0.000000, 411.193359, 0.000000, + 416.762695, 0.000000, 420.867188, 0.000000, 424.286133, 0.000000, 428.581055, 0.000000, + 432.708984, 0.000000, 437.748047, 0.000000, 437.748047, 0.000000, 443.027344, 0.000000, + 447.131836, 0.000000, 447.131836, 0.000000, 450.550781, 0.000000, 454.330078, 0.000000, + 459.729492, 0.000000, 459.729492, 0.000000, 463.148438, 0.000000, 468.667969, 0.000000, + 473.478516, 0.000000, 473.478516, 0.000000, 478.207031, 0.000000, 481.986328, 0.000000, + 486.761719, 0.000000, 492.281250, 0.000000, 497.320313, 0.000000, 500.739258, 0.000000, + 505.538086, 0.000000, 505.538086, 0.000000, 509.786133, 0.000000, 513.902344, 0.000000, + 515.917969, 0.000000, 520.669922, 0.000000, 524.917969, 0.000000, 524.917969, 0.000000, + 529.034180, 0.000000, 534.553711, 0.000000, 536.569336, 0.000000, 541.968750, 0.000000, + 541.968750, 0.000000, 547.488281, 0.000000, 551.592773, 0.000000, 555.887695, 0.000000, + 560.003906, 0.000000, 564.298828, 0.000000, 569.698242, 0.000000, 573.117188, 0.000000, + 576.896484, 0.000000, 582.500977, 0.000000, 587.241211, 0.000000, 590.660156, 0.000000, + 594.776367, 0.000000, 598.904297, 0.000000, 603.943359, 0.000000, 608.683594, 0.000000, + 608.683594, 0.000000 + </result-positions> + </test-case> + + <test-case id="Arabic Simple" script="arab"> + <test-text>أساسًا، تتعامل الØواسيب Ùقط مع الأرقام، وتقوم بتخزين الأØر٠والمØار٠الأخرى بعد أن تÙعطي رقما معينا لكل واØد منها. وقبل اختراع "يونÙكود"ØŒ كان هناك مئات الأنظمة للتشÙير وتخصيص هذه الأرقام للمØارÙØŒ ولم يوجد نظام تشÙير واØد ÙŠØتوي على جميع المØار٠الضرورية</test-text> + + <result-glyphs> + 0x0000FE94, 0x0000FEF3, 0x00000631, 0x00000648, 0x0000FFFE, 0x0000FD2C, 0x0000FEDF, 0x00000627, + 0x00000020, 0x00000641, 0x00000631, 0x0000FE8E, 0x0000FFFE, 0x0000FFFE, 0x0000FD88, 0x00000627, + 0x00000020, 0x0000FECA, 0x0000FEF4, 0x0000FFFE, 0x0000FCA8, 0x00000020, 0x0000FFFE, 0x0000FC86, + 0x0000FECB, 0x00000020, 0x0000064A, 0x0000FEEE, 0x0000FE98, 0x0000FFFE, 0x0000FCDB, 0x00000020, + 0x0000FEAA, 0x0000FEA3, 0x00000627, 0x00000648, 0x00000020, 0x0000FFFE, 0x0000FC91, 0x0000FED4, + 0x0000FEB8, 0x0000FE97, 0x00000020, 0x00000645, 0x0000FE8E, 0x0000FEC8, 0x0000FEE7, 0x00000020, + 0x0000FEAA, 0x0000FE9F, 0x0000FEEE, 0x0000FEF3, 0x00000020, 0x0000FFFE, 0x0000FC42, 0x00000648, + 0x00000020, 0x0000060C, 0x00000641, 0x00000631, 0x0000FE8E, 0x0000FEA4, 0x0000FFFE, 0x0000FCED, + 0x0000FEDF, 0x00000020, 0x00000645, 0x0000FE8E, 0x0000FED7, 0x00000631, 0x0000FFFE, 0x0000FEF7, + 0x00000627, 0x00000020, 0x00000647, 0x0000FEAC, 0x0000FEEB, 0x00000020, 0x0000FEBA, 0x0000FEF4, + 0x0000FEBC, 0x0000FFFE, 0x0000FCA3, 0x00000648, 0x00000020, 0x0000FFFE, 0x0000FC91, 0x0000FED4, + 0x0000FEB8, 0x0000FE98, 0x0000FEE0, 0x0000FEDF, 0x00000020, 0x0000FE94, 0x0000FFFE, 0x0000FD3B, + 0x0000FEE7, 0x0000FFFE, 0x0000FEF7, 0x00000627, 0x00000020, 0x0000062A, 0x0000FFFE, 0x0000FBEB, + 0x0000FEE3, 0x00000020, 0x00000643, 0x0000FE8E, 0x0000FEE8, 0x0000FEEB, 0x00000020, 0x00000646, + 0x0000FFFE, 0x0000FC37, 0x00000020, 0x0000060C, 0x00000022, 0x0000062F, 0x0000FEEE, 0x0000FEDC, + 0x00000650, 0x0000FEE7, 0x0000FEEE, 0x0000FEF3, 0x00000022, 0x00000020, 0x00000639, 0x00000627, + 0x0000FFFE, 0x0000FC70, 0x0000FEA7, 0x00000627, 0x00000020, 0x0000FEDE, 0x0000FE92, 0x0000FED7, + 0x00000648, 0x00000020, 0x0000002E, 0x0000FE8E, 0x0000FFFE, 0x0000FCEF, 0x0000FEE3, 0x00000020, + 0x0000FEAA, 0x0000FEA3, 0x00000627, 0x00000648, 0x00000020, 0x0000FFFE, 0x0000FC81, 0x0000FEDF, + 0x00000020, 0x0000FE8E, 0x0000FEE8, 0x0000FEF4, 0x0000FECC, 0x0000FEE3, 0x00000020, 0x0000FE8E, + 0x0000FFFE, 0x0000FCC3, 0x00000631, 0x00000020, 0x0000FFFE, 0x0000FD12, 0x0000FECC, 0x0000064F, + 0x0000FE97, 0x00000020, 0x00000646, 0x00000623, 0x00000020, 0x0000FEAA, 0x0000FECC, 0x0000FE91, + 0x00000020, 0x00000649, 0x0000FEAE, 0x0000FEA7, 0x0000FFFE, 0x0000FEF7, 0x00000627, 0x00000020, + 0x00000641, 0x00000631, 0x0000FE8E, 0x0000FFFE, 0x0000FFFE, 0x0000FD88, 0x00000627, 0x00000648, + 0x00000020, 0x00000641, 0x0000FEAE, 0x0000FEA3, 0x0000FFFE, 0x0000FEF7, 0x00000627, 0x00000020, + 0x0000FEE6, 0x0000FEF3, 0x0000FEB0, 0x0000FEA8, 0x0000FE98, 0x0000FE91, 0x00000020, 0x00000645, + 0x0000FEEE, 0x0000FED8, 0x0000FE97, 0x00000648, 0x00000020, 0x0000060C, 0x00000645, 0x0000FE8E, + 0x0000FED7, 0x00000631, 0x0000FFFE, 0x0000FEF7, 0x00000627, 0x00000020, 0x0000FECA, 0x0000FEE3, + 0x00000020, 0x0000FEC2, 0x0000FED8, 0x0000FED3, 0x00000020, 0x0000FE90, 0x0000FEF4, 0x0000FEB3, + 0x00000627, 0x0000FEEE, 0x0000FFFE, 0x0000FCCA, 0x00000627, 0x00000020, 0x0000FEDE, 0x0000FEE3, + 0x0000FE8E, 0x0000FECC, 0x0000FE98, 0x0000FE97, 0x00000020, 0x0000060C, 0x0000FE8E, 0x0000064B, + 0x0000FEB3, 0x0000FE8E, 0x0000FEB3, 0x00000623 + </result-glyphs> + + <result-indices> + 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4, + 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC, + 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4, + 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC, + 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4, + 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC, + 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4, + 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC, + 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4, + 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC, + 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4, + 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C, + 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094, + 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C, + 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084, + 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C, + 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074, + 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C, + 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064, + 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C, + 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054, + 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C, + 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044, + 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C, + 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034, + 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C, + 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024, + 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C, + 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014, + 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C, + 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004, + 0x00000003, 0x00000002, 0x00000001, 0x00000000 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, + 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, + 96.000000, 0.000000, 108.000000, 0.000000, 120.000000, 0.000000, 132.000000, 0.000000, + 144.000000, 0.000000, 156.000000, 0.000000, 168.000000, 0.000000, 180.000000, 0.000000, + 192.000000, 0.000000, 204.000000, 0.000000, 216.000000, 0.000000, 228.000000, 0.000000, + 240.000000, 0.000000, 252.000000, 0.000000, 264.000000, 0.000000, 276.000000, 0.000000, + 288.000000, 0.000000, 300.000000, 0.000000, 312.000000, 0.000000, 324.000000, 0.000000, + 336.000000, 0.000000, 348.000000, 0.000000, 360.000000, 0.000000, 372.000000, 0.000000, + 384.000000, 0.000000, 396.000000, 0.000000, 408.000000, 0.000000, 420.000000, 0.000000, + 432.000000, 0.000000, 444.000000, 0.000000, 456.000000, 0.000000, 468.000000, 0.000000, + 480.000000, 0.000000, 492.000000, 0.000000, 504.000000, 0.000000, 516.000000, 0.000000, + 528.000000, 0.000000, 540.000000, 0.000000, 552.000000, 0.000000, 564.000000, 0.000000, + 576.000000, 0.000000, 588.000000, 0.000000, 600.000000, 0.000000, 612.000000, 0.000000, + 624.000000, 0.000000, 636.000000, 0.000000, 648.000000, 0.000000, 660.000000, 0.000000, + 672.000000, 0.000000, 684.000000, 0.000000, 696.000000, 0.000000, 708.000000, 0.000000, + 720.000000, 0.000000, 732.000000, 0.000000, 744.000000, 0.000000, 756.000000, 0.000000, + 768.000000, 0.000000, 780.000000, 0.000000, 792.000000, 0.000000, 804.000000, 0.000000, + 816.000000, 0.000000, 828.000000, 0.000000, 840.000000, 0.000000, 852.000000, 0.000000, + 864.000000, 0.000000, 876.000000, 0.000000, 888.000000, 0.000000, 900.000000, 0.000000, + 912.000000, 0.000000, 924.000000, 0.000000, 936.000000, 0.000000, 948.000000, 0.000000, + 960.000000, 0.000000, 972.000000, 0.000000, 984.000000, 0.000000, 996.000000, 0.000000, + 1008.000000, 0.000000, 1020.000000, 0.000000, 1032.000000, 0.000000, 1044.000000, 0.000000, + 1056.000000, 0.000000, 1068.000000, 0.000000, 1080.000000, 0.000000, 1092.000000, 0.000000, + 1104.000000, 0.000000, 1116.000000, 0.000000, 1128.000000, 0.000000, 1140.000000, 0.000000, + 1152.000000, 0.000000, 1164.000000, 0.000000, 1176.000000, 0.000000, 1188.000000, 0.000000, + 1200.000000, 0.000000, 1212.000000, 0.000000, 1224.000000, 0.000000, 1236.000000, 0.000000, + 1248.000000, 0.000000, 1260.000000, 0.000000, 1272.000000, 0.000000, 1284.000000, 0.000000, + 1296.000000, 0.000000, 1308.000000, 0.000000, 1320.000000, 0.000000, 1332.000000, 0.000000, + 1344.000000, 0.000000, 1356.000000, 0.000000, 1368.000000, 0.000000, 1380.000000, 0.000000, + 1392.000000, 0.000000, 1404.000000, 0.000000, 1416.000000, 0.000000, 1428.000000, 0.000000, + 1440.000000, 0.000000, 1440.000000, 0.000000, 1452.000000, 0.000000, 1464.000000, 0.000000, + 1476.000000, 0.000000, 1488.000000, 0.000000, 1500.000000, 0.000000, 1512.000000, 0.000000, + 1524.000000, 0.000000, 1536.000000, 0.000000, 1548.000000, 0.000000, 1560.000000, 0.000000, + 1572.000000, 0.000000, 1584.000000, 0.000000, 1596.000000, 0.000000, 1608.000000, 0.000000, + 1620.000000, 0.000000, 1632.000000, 0.000000, 1644.000000, 0.000000, 1656.000000, 0.000000, + 1668.000000, 0.000000, 1680.000000, 0.000000, 1692.000000, 0.000000, 1704.000000, 0.000000, + 1716.000000, 0.000000, 1728.000000, 0.000000, 1740.000000, 0.000000, 1752.000000, 0.000000, + 1764.000000, 0.000000, 1776.000000, 0.000000, 1788.000000, 0.000000, 1800.000000, 0.000000, + 1812.000000, 0.000000, 1824.000000, 0.000000, 1836.000000, 0.000000, 1848.000000, 0.000000, + 1860.000000, 0.000000, 1872.000000, 0.000000, 1884.000000, 0.000000, 1896.000000, 0.000000, + 1908.000000, 0.000000, 1920.000000, 0.000000, 1932.000000, 0.000000, 1944.000000, 0.000000, + 1956.000000, 0.000000, 1968.000000, 0.000000, 1980.000000, 0.000000, 1992.000000, 0.000000, + 1992.000000, 0.000000, 2004.000000, 0.000000, 2016.000000, 0.000000, 2028.000000, 0.000000, + 2040.000000, 0.000000, 2052.000000, 0.000000, 2064.000000, 0.000000, 2076.000000, 0.000000, + 2088.000000, 0.000000, 2100.000000, 0.000000, 2112.000000, 0.000000, 2124.000000, 0.000000, + 2136.000000, 0.000000, 2148.000000, 0.000000, 2160.000000, 0.000000, 2172.000000, 0.000000, + 2184.000000, 0.000000, 2196.000000, 0.000000, 2208.000000, 0.000000, 2220.000000, 0.000000, + 2232.000000, 0.000000, 2244.000000, 0.000000, 2256.000000, 0.000000, 2268.000000, 0.000000, + 2280.000000, 0.000000, 2292.000000, 0.000000, 2304.000000, 0.000000, 2316.000000, 0.000000, + 2328.000000, 0.000000, 2340.000000, 0.000000, 2352.000000, 0.000000, 2364.000000, 0.000000, + 2376.000000, 0.000000, 2388.000000, 0.000000, 2400.000000, 0.000000, 2412.000000, 0.000000, + 2424.000000, 0.000000, 2436.000000, 0.000000, 2448.000000, 0.000000, 2460.000000, 0.000000, + 2472.000000, 0.000000, 2484.000000, 0.000000, 2496.000000, 0.000000, 2508.000000, 0.000000, + 2520.000000, 0.000000, 2532.000000, 0.000000, 2544.000000, 0.000000, 2556.000000, 0.000000, + 2568.000000, 0.000000, 2580.000000, 0.000000, 2592.000000, 0.000000, 2604.000000, 0.000000, + 2616.000000, 0.000000, 2628.000000, 0.000000, 2640.000000, 0.000000, 2652.000000, 0.000000, + 2664.000000, 0.000000, 2676.000000, 0.000000, 2688.000000, 0.000000, 2700.000000, 0.000000, + 2712.000000, 0.000000, 2724.000000, 0.000000, 2736.000000, 0.000000, 2748.000000, 0.000000, + 2760.000000, 0.000000, 2772.000000, 0.000000, 2784.000000, 0.000000, 2796.000000, 0.000000, + 2808.000000, 0.000000, 2820.000000, 0.000000, 2832.000000, 0.000000, 2844.000000, 0.000000, + 2856.000000, 0.000000, 2868.000000, 0.000000, 2880.000000, 0.000000, 2892.000000, 0.000000, + 2904.000000, 0.000000, 2916.000000, 0.000000, 2928.000000, 0.000000, 2940.000000, 0.000000, + 2940.000000, 0.000000, 2952.000000, 0.000000, 2964.000000, 0.000000, 2976.000000, 0.000000, + 2988.000000, 0.000000 + </result-positions> + </test-case> + + <test-case id="Matra Test" script="deva"> + <test-font name="Devamt.ttf" version="Version 1.02" checksum="0x2AB199ED"/> + + <test-text>à¥à¤‚ ं॑</test-text> + + <result-glyphs> + 0x00000130, 0x00000105, 0x000000C9, 0x00000003, 0x00000130, 0x000000C9, 0x00000328 + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000003, 0x00000004 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 6.046875, 0.000000, 6.046875, 0.000000, 7.201172, 0.000000, + 10.201172, 0.000000, 16.248047, 0.000000, 16.248047, 0.000000, 17.402344, 0.000000 + </result-positions> + </test-case> + + <test-case id="Deva Stress Test" script="deva"> + <test-font name="Devamt.ttf" version="Version 1.02" checksum="0x2AB199ED"/> + + <test-text>कठकं कः क॑ क॒ कà¤à¥‘ कं॒ कà¤à¤‚ः क॒॑</test-text> + + <result-glyphs> + 0x000000DB, 0x000000C8, 0x00000003, 0x000000DB, 0x000000C9, 0x00000003, 0x000000DB, 0x000000CA, + 0x00000003, 0x000000DB, 0x00000113, 0x00000003, 0x000000DB, 0x00000114, 0x00000003, 0x000000DB, + 0x000000C8, 0x00000328, 0x00000003, 0x000000DB, 0x00000114, 0x000000C9, 0x00000003, 0x000000DB, + 0x000000C8, 0x00000130, 0x000000C9, 0x00000130, 0x000000CA, 0x00000003, 0x000000DB, 0x00000113, + 0x00000130, 0x00000114 + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, + 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000015, 0x00000014, 0x00000016, 0x00000017, + 0x00000018, 0x00000019, 0x00000019, 0x0000001A, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, + 0x0000001E, 0x0000001E + </result-indices> + + <result-positions> + 0.000000, 0.000000, 6.052734, 0.000000, 8.003906, 0.000000, 11.003906, 0.000000, + 17.056641, 0.000000, 19.007813, 0.000000, 22.007813, 0.000000, 30.011719, 0.000000, + 33.539063, 0.000000, 36.539063, 0.000000, 42.591797, 0.000000, 44.542969, 0.000000, + 47.542969, 0.000000, 55.546875, 0.000000, 55.546875, 0.000000, 58.546875, 0.000000, + 64.599609, 0.000000, 64.599609, 0.000000, 66.550781, 0.000000, 69.550781, 0.000000, + 77.554688, 0.000000, 75.603516, 0.000000, 77.554688, 0.000000, 80.554688, 0.000000, + 86.607422, 0.000000, 88.558594, 0.000000, 94.605469, 0.000000, 95.759766, 0.000000, + 102.960938, 0.000000, 106.488281, 0.000000, 109.488281, 0.000000, 115.541016, 0.000000, + 117.492188, 0.000000, 124.693359, 0.000000, 124.693359, 0.000000 + </result-positions> + </test-case> + + <test-case id="Deva Test" script="deva"> + <test-font name="Devamt.ttf" version="Version 1.02" checksum="0x2AB199ED"/> + + <test-text>रू क़ॠकà¥à¤· कà¥à¤•à¤¿ कà¥à¤°à¤¿ टà¥à¤°à¤¿ हिनà¥à¤¦à¥€ रà¥à¤•à¥à¤°à¤¿à¤‚ कà¥à¤·à¤¤à¥à¤°à¤œà¥à¤žà¤¤à¥à¤°à¤•à¥à¤· शà¥à¤° थà¥à¤° शà¥à¤° कके रà¥à¤•à¥‡à¤‚ केूकूेकेृ रà¥à¤•à¥‚ क़ क कॠकà¥à¤· कà¥à¤·à¥ कà¥à¤·à¥à¤• ज़ ज जॠजà¥à¤ž जà¥à¤žà¥ जà¥à¤žà¥à¤• रà¥à¤• रà¥à¤•à¥à¤• डà¥à¤° कà¥à¤• क़à¥à¤• क़à¥à¤• क़ॠकà¥à¤·à¥à¤• कà¥à¤·à¥ तà¥à¤°à¥à¤• दà¥à¤¦ कि हि रू रॠरà¥à¤•à¥‡ रà¥à¤•à¤‚ कॠकॠके दà¥à¤¦à¥à¤¦ क़à¥à¤· कà¥à¤· रà¥à¤•à¥à¤·à¥‡ दà¥à¤¦à¤¤à¥à¤°à¥à¤• जà¥à¤ž कà¥à¤¤à¥à¤µ जà¥à¤žà¥à¤• रà¥à¤•à¤ रà¥à¤•à¤¿à¤ रà¥à¤•à¥‡à¤ रà¥à¤•à¥à¤°à¤¿à¤ हिंदी हà¥à¤®à¤¿à¤¹à¥à¤¯à¤¿à¤–ि ङà¥à¤• ङà¥à¤® ङà¥à¤•à¥à¤¤ ङà¥à¤– ङà¥à¤— ङà¥à¤˜ ङà¥à¤•à¥à¤· ङà¥à¤•à¥à¤·à¥à¤µ ङà¥à¤•à¥à¤·à¥à¤¯ रà¥à¤•à¥à¤¤à¥à¤µà¤¿ रà¥à¤°à¥à¤°à¥à¤° कै के कॠकू कृ कॅ कॆ हॠहू हॆ है हे</test-text> + + <result-glyphs> + 0x00000238, 0x0000FFFF, 0x00000003, 0x00000117, 0x00000111, 0x00000003, 0x00000156, 0x0000FFFF, + 0x0000FFFF, 0x00000003, 0x000002CF, 0x00000269, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000002CF, + 0x000001A3, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000002CE, 0x000001AD, 0x0000FFFF, 0x0000FFFF, + 0x00000003, 0x000002D0, 0x000000FF, 0x00000170, 0x0000FFFF, 0x000000EC, 0x00000104, 0x00000003, + 0x00000308, 0x000001A3, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, + 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x000001B2, 0x0000FFFF, 0x0000FFFF, 0x00000157, 0x0000FFFF, + 0x0000FFFF, 0x000001B2, 0x0000FFFF, 0x0000FFFF, 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x00000003, + 0x000001C1, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000001B3, 0x0000FFFF, 0x0000FFFF, 0x00000003, + 0x000001C1, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000DB, 0x000000DB, 0x00000340, 0x00000003, + 0x000000DB, 0x00000343, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000DB, 0x00000340, + 0x00000130, 0x00000106, 0x000000DB, 0x00000106, 0x00000130, 0x0000010B, 0x000000DB, 0x00000340, + 0x00000130, 0x00000107, 0x00000003, 0x000000DB, 0x00000106, 0x00000158, 0x0000FFFF, 0x00000003, + 0x00000117, 0x00000003, 0x000000DB, 0x00000003, 0x000000DB, 0x00000111, 0x00000003, 0x00000156, + 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x00000111, 0x00000003, + 0x0000017F, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x00000003, 0x0000011A, + 0x0000FFFF, 0x00000003, 0x000000E2, 0x00000003, 0x000000E2, 0x00000111, 0x00000003, 0x00000157, + 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000157, 0x0000FFFF, 0x0000FFFF, 0x00000111, 0x00000003, + 0x00000180, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x000000DB, 0x00000158, + 0x0000FFFF, 0x00000003, 0x00000269, 0x0000FFFF, 0x0000FFFF, 0x00000158, 0x0000FFFF, 0x00000003, + 0x000001AF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000269, 0x0000FFFF, 0x0000FFFF, 0x00000003, + 0x00000181, 0x0000FFFF, 0x000000DB, 0x00000003, 0x00000181, 0x0000FFFF, 0x000000DB, 0x00000003, + 0x00000117, 0x00000111, 0x00000003, 0x0000017F, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, + 0x00000003, 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x00000111, 0x00000003, 0x000001F8, 0x0000FFFF, + 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x000002A4, 0x0000FFFF, 0x0000FFFF, 0x00000003, + 0x000002CF, 0x000000DB, 0x00000003, 0x000002D0, 0x000000FF, 0x00000003, 0x00000238, 0x0000FFFF, + 0x00000003, 0x00000237, 0x0000FFFF, 0x00000003, 0x000000DB, 0x00000342, 0x0000FFFF, 0x0000FFFF, + 0x00000003, 0x000000DB, 0x00000256, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000DB, 0x00000111, + 0x00000003, 0x000000DB, 0x00000105, 0x00000003, 0x000000DB, 0x00000340, 0x00000003, 0x0000016E, + 0x0000FFFF, 0x000002A4, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000181, 0x0000FFFF, 0x000000FD, + 0x00000003, 0x00000156, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000156, 0x0000FFFF, 0x0000FFFF, + 0x00000245, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000002A4, 0x0000FFFF, 0x0000FFFF, 0x000001F8, + 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x00000157, 0x0000FFFF, 0x0000FFFF, + 0x00000003, 0x0000015D, 0x0000FFFF, 0x0000016C, 0x0000FFFF, 0x000000FB, 0x00000003, 0x00000180, + 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x000000DB, 0x00000003, 0x000000DB, 0x00000256, 0x0000FFFF, + 0x0000FFFF, 0x00000003, 0x00000308, 0x000000DB, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, + 0x000000DB, 0x00000343, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000308, 0x000001A3, + 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000002E3, 0x000000FF, + 0x0000FFFF, 0x000000EC, 0x00000104, 0x00000003, 0x000002D7, 0x000002C6, 0x0000FFFF, 0x0000FFFF, + 0x000002D7, 0x000002C7, 0x0000FFFF, 0x0000FFFF, 0x000002D4, 0x000000DC, 0x00000003, 0x0000026E, + 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000272, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000273, + 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x0000026F, 0x0000FFFF, 0x0000FFFF, + 0x00000003, 0x00000270, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000271, 0x0000FFFF, 0x0000FFFF, + 0x00000003, 0x00000274, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000275, + 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000276, + 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000304, + 0x0000015D, 0x0000FFFF, 0x0000016C, 0x0000FFFF, 0x000000FB, 0x0000FFFF, 0x0000FFFF, 0x00000003, + 0x000000F6, 0x00000111, 0x000001BD, 0x0000FFFF, 0x0000FFFF, 0x00000158, 0x0000FFFF, 0x00000003, + 0x000000DB, 0x0000010C, 0x00000003, 0x000000DB, 0x00000340, 0x00000003, 0x000000DB, 0x00000105, + 0x00000003, 0x000000DB, 0x00000106, 0x00000003, 0x000000DB, 0x00000107, 0x00000003, 0x000000DB, + 0x00000109, 0x00000003, 0x000000DB, 0x0000033C, 0x00000003, 0x0000022F, 0x0000FFFF, 0x00000003, + 0x00000230, 0x0000FFFF, 0x00000003, 0x000000FF, 0x0000010A, 0x00000003, 0x000000FF, 0x0000010C, + 0x00000003, 0x000000FF, 0x0000010B + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, + 0x00000008, 0x00000009, 0x0000000D, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000E, 0x00000012, + 0x0000000F, 0x00000011, 0x00000010, 0x00000013, 0x00000017, 0x00000014, 0x00000016, 0x00000015, + 0x00000018, 0x0000001A, 0x00000019, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000025, 0x00000022, 0x00000024, 0x00000023, 0x00000020, 0x00000021, 0x00000026, 0x00000027, + 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002D, 0x0000002C, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000033, 0x00000032, 0x00000034, 0x00000035, 0x00000036, 0x00000037, + 0x00000038, 0x0000003A, 0x00000039, 0x0000003B, 0x0000003C, 0x0000003E, 0x0000003D, 0x0000003F, + 0x00000040, 0x00000042, 0x00000041, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, + 0x0000004A, 0x0000004B, 0x00000048, 0x00000049, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000053, 0x00000054, 0x00000055, + 0x00000056, 0x00000056, 0x00000057, 0x0000005A, 0x0000005B, 0x00000058, 0x00000059, 0x0000005C, + 0x0000005D, 0x0000005E, 0x0000005F, 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, + 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, + 0x0000006D, 0x0000006E, 0x0000006F, 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, + 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, + 0x0000007D, 0x0000007E, 0x0000007F, 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, + 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008D, 0x0000008B, + 0x0000008C, 0x0000008E, 0x00000091, 0x00000092, 0x00000093, 0x0000008F, 0x00000090, 0x00000094, + 0x00000095, 0x00000097, 0x00000096, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, + 0x0000009D, 0x0000009E, 0x0000009F, 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, + 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, + 0x000000AD, 0x000000AE, 0x000000AF, 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, + 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000BA, 0x000000BB, 0x000000BC, + 0x000000BE, 0x000000BD, 0x000000BF, 0x000000C1, 0x000000C0, 0x000000C2, 0x000000C3, 0x000000C4, + 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000CB, 0x000000CC, 0x000000C9, 0x000000CA, + 0x000000CD, 0x000000D0, 0x000000CE, 0x000000CF, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, + 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, + 0x000000DD, 0x000000DE, 0x000000DF, 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, + 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EC, 0x000000ED, 0x000000EE, + 0x000000EF, 0x000000EA, 0x000000EB, 0x000000F0, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, + 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, + 0x000000FD, 0x000000FE, 0x000000FF, 0x00000100, 0x00000101, 0x00000102, 0x00000103, 0x00000104, + 0x00000105, 0x00000106, 0x00000107, 0x00000108, 0x00000109, 0x0000010C, 0x0000010A, 0x0000010B, + 0x0000010D, 0x0000010E, 0x00000112, 0x00000111, 0x0000010F, 0x00000110, 0x00000113, 0x00000114, + 0x00000117, 0x00000118, 0x00000115, 0x00000116, 0x00000119, 0x0000011A, 0x00000120, 0x0000011D, + 0x0000011F, 0x0000011E, 0x0000011B, 0x0000011C, 0x00000121, 0x00000122, 0x00000124, 0x00000123, + 0x00000125, 0x00000126, 0x00000127, 0x00000128, 0x0000012C, 0x00000129, 0x0000012A, 0x0000012B, + 0x00000130, 0x0000012D, 0x0000012E, 0x0000012F, 0x00000132, 0x00000131, 0x00000133, 0x00000134, + 0x00000135, 0x00000136, 0x00000137, 0x00000138, 0x00000139, 0x0000013A, 0x0000013B, 0x0000013C, + 0x0000013D, 0x0000013E, 0x0000013F, 0x00000140, 0x00000141, 0x00000142, 0x00000143, 0x00000144, + 0x00000145, 0x00000146, 0x00000147, 0x00000148, 0x00000149, 0x0000014A, 0x0000014B, 0x0000014C, + 0x0000014D, 0x0000014E, 0x0000014F, 0x00000150, 0x00000151, 0x00000152, 0x00000153, 0x00000154, + 0x00000155, 0x00000156, 0x00000157, 0x00000158, 0x00000159, 0x0000015A, 0x0000015B, 0x0000015C, + 0x0000015D, 0x0000015E, 0x0000015F, 0x00000160, 0x00000161, 0x00000162, 0x00000163, 0x0000016B, + 0x00000166, 0x00000167, 0x00000168, 0x00000169, 0x0000016A, 0x00000164, 0x00000165, 0x0000016C, + 0x0000016F, 0x00000170, 0x00000171, 0x00000173, 0x00000172, 0x0000016D, 0x0000016E, 0x00000174, + 0x00000175, 0x00000176, 0x00000177, 0x00000178, 0x00000179, 0x0000017A, 0x0000017B, 0x0000017C, + 0x0000017D, 0x0000017E, 0x0000017F, 0x00000180, 0x00000181, 0x00000182, 0x00000183, 0x00000184, + 0x00000185, 0x00000186, 0x00000187, 0x00000188, 0x00000189, 0x0000018A, 0x0000018B, 0x0000018C, + 0x0000018D, 0x0000018E, 0x0000018F, 0x00000190, 0x00000191, 0x00000192, 0x00000193, 0x00000194, + 0x00000195, 0x00000196, 0x00000197 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 8.707031, 0.000000, 8.707031, 0.000000, 11.707031, 0.000000, + 17.759766, 0.000000, 19.710938, 0.000000, 22.710938, 0.000000, 30.955078, 0.000000, + 30.955078, 0.000000, 30.955078, 0.000000, 33.955078, 0.000000, 37.318359, 0.000000, + 45.322266, 0.000000, 45.322266, 0.000000, 45.322266, 0.000000, 48.322266, 0.000000, + 51.685547, 0.000000, 59.689453, 0.000000, 59.689453, 0.000000, 59.689453, 0.000000, + 62.689453, 0.000000, 66.052734, 0.000000, 72.082031, 0.000000, 72.082031, 0.000000, + 72.082031, 0.000000, 75.082031, 0.000000, 78.445313, 0.000000, 84.996094, 0.000000, + 89.015625, 0.000000, 89.015625, 0.000000, 95.408203, 0.000000, 98.771484, 0.000000, + 101.771484, 0.000000, 105.134766, 0.000000, 113.138672, 0.000000, 113.138672, 0.000000, + 113.138672, 0.000000, 113.138672, 0.000000, 113.138672, 0.000000, 113.138672, 0.000000, + 116.138672, 0.000000, 124.382813, 0.000000, 124.382813, 0.000000, 124.382813, 0.000000, + 131.507813, 0.000000, 131.507813, 0.000000, 131.507813, 0.000000, 139.095703, 0.000000, + 139.095703, 0.000000, 139.095703, 0.000000, 146.220703, 0.000000, 146.220703, 0.000000, + 146.220703, 0.000000, 154.464844, 0.000000, 154.464844, 0.000000, 154.464844, 0.000000, + 157.464844, 0.000000, 165.433594, 0.000000, 165.433594, 0.000000, 165.433594, 0.000000, + 168.433594, 0.000000, 175.851563, 0.000000, 175.851563, 0.000000, 175.851563, 0.000000, + 178.851563, 0.000000, 186.820313, 0.000000, 186.820313, 0.000000, 186.820313, 0.000000, + 189.820313, 0.000000, 197.824219, 0.000000, 203.876953, 0.000000, 205.828125, 0.000000, + 208.828125, 0.000000, 214.880859, 0.000000, 216.832031, 0.000000, 216.832031, 0.000000, + 216.832031, 0.000000, 216.832031, 0.000000, 219.832031, 0.000000, 225.884766, 0.000000, + 227.835938, 0.000000, 233.882813, 0.000000, 235.037109, 0.000000, 241.089844, 0.000000, + 243.041016, 0.000000, 249.087891, 0.000000, 250.242188, 0.000000, 256.294922, 0.000000, + 258.246094, 0.000000, 264.292969, 0.000000, 265.447266, 0.000000, 268.447266, 0.000000, + 274.500000, 0.000000, 274.505859, 0.000000, 276.451172, 0.000000, 276.451172, 0.000000, + 279.451172, 0.000000, 287.455078, 0.000000, 290.455078, 0.000000, 298.458984, 0.000000, + 301.458984, 0.000000, 307.511719, 0.000000, 309.462891, 0.000000, 312.462891, 0.000000, + 320.707031, 0.000000, 320.707031, 0.000000, 320.707031, 0.000000, 323.707031, 0.000000, + 331.951172, 0.000000, 331.951172, 0.000000, 331.951172, 0.000000, 331.951172, 0.000000, + 334.951172, 0.000000, 340.705078, 0.000000, 340.705078, 0.000000, 340.705078, 0.000000, + 340.705078, 0.000000, 348.708984, 0.000000, 351.708984, 0.000000, 354.708984, 0.000000, + 362.724609, 0.000000, 362.724609, 0.000000, 365.724609, 0.000000, 373.740234, 0.000000, + 376.740234, 0.000000, 384.755859, 0.000000, 384.755859, 0.000000, 387.755859, 0.000000, + 395.343750, 0.000000, 395.343750, 0.000000, 395.343750, 0.000000, 398.343750, 0.000000, + 405.931641, 0.000000, 405.931641, 0.000000, 405.931641, 0.000000, 405.931641, 0.000000, + 408.931641, 0.000000, 414.052734, 0.000000, 414.052734, 0.000000, 414.052734, 0.000000, + 414.052734, 0.000000, 422.056641, 0.000000, 425.056641, 0.000000, 431.115234, 0.000000, + 433.060547, 0.000000, 433.060547, 0.000000, 436.060547, 0.000000, 444.064453, 0.000000, + 444.064453, 0.000000, 442.119141, 0.000000, 444.064453, 0.000000, 444.064453, 0.000000, + 447.064453, 0.000000, 454.060547, 0.000000, 454.060547, 0.000000, 454.060547, 0.000000, + 457.060547, 0.000000, 465.064453, 0.000000, 465.064453, 0.000000, 465.064453, 0.000000, + 468.064453, 0.000000, 474.339844, 0.000000, 474.339844, 0.000000, 482.343750, 0.000000, + 485.343750, 0.000000, 491.619141, 0.000000, 491.619141, 0.000000, 499.623047, 0.000000, + 502.623047, 0.000000, 508.675781, 0.000000, 510.626953, 0.000000, 513.626953, 0.000000, + 519.380859, 0.000000, 519.380859, 0.000000, 519.380859, 0.000000, 519.380859, 0.000000, + 527.384766, 0.000000, 530.384766, 0.000000, 538.628906, 0.000000, 538.628906, 0.000000, + 538.628906, 0.000000, 538.628906, 0.000000, 541.628906, 0.000000, 546.427734, 0.000000, + 546.427734, 0.000000, 546.427734, 0.000000, 546.427734, 0.000000, 554.431641, 0.000000, + 557.431641, 0.000000, 564.064453, 0.000000, 564.064453, 0.000000, 564.064453, 0.000000, + 567.064453, 0.000000, 570.427734, 0.000000, 578.431641, 0.000000, 581.431641, 0.000000, + 584.794922, 0.000000, 591.345703, 0.000000, 594.345703, 0.000000, 603.052734, 0.000000, + 603.052734, 0.000000, 606.052734, 0.000000, 612.667969, 0.000000, 612.667969, 0.000000, + 615.667969, 0.000000, 621.720703, 0.000000, 623.671875, 0.000000, 623.671875, 0.000000, + 623.671875, 0.000000, 626.671875, 0.000000, 632.736328, 0.000000, 634.675781, 0.000000, + 634.675781, 0.000000, 634.675781, 0.000000, 637.675781, 0.000000, 643.728516, 0.000000, + 645.679688, 0.000000, 648.679688, 0.000000, 654.732422, 0.000000, 656.683594, 0.000000, + 659.683594, 0.000000, 665.736328, 0.000000, 667.687500, 0.000000, 670.687500, 0.000000, + 677.080078, 0.000000, 677.080078, 0.000000, 683.712891, 0.000000, 683.712891, 0.000000, + 683.712891, 0.000000, 686.712891, 0.000000, 692.988281, 0.000000, 692.988281, 0.000000, + 700.054688, 0.000000, 703.054688, 0.000000, 711.298828, 0.000000, 711.298828, 0.000000, + 711.298828, 0.000000, 714.298828, 0.000000, 722.542969, 0.000000, 722.542969, 0.000000, + 722.542969, 0.000000, 722.542969, 0.000000, 722.542969, 0.000000, 722.542969, 0.000000, + 725.542969, 0.000000, 732.175781, 0.000000, 732.175781, 0.000000, 732.175781, 0.000000, + 736.974609, 0.000000, 736.974609, 0.000000, 736.974609, 0.000000, 736.974609, 0.000000, + 744.978516, 0.000000, 747.978516, 0.000000, 755.566406, 0.000000, 755.566406, 0.000000, + 755.566406, 0.000000, 758.566406, 0.000000, 764.841797, 0.000000, 764.841797, 0.000000, + 768.673828, 0.000000, 768.673828, 0.000000, 775.541016, 0.000000, 778.541016, 0.000000, + 783.662109, 0.000000, 783.662109, 0.000000, 783.662109, 0.000000, 783.662109, 0.000000, + 791.666016, 0.000000, 794.666016, 0.000000, 800.730469, 0.000000, 802.669922, 0.000000, + 802.669922, 0.000000, 802.669922, 0.000000, 805.669922, 0.000000, 809.033203, 0.000000, + 817.037109, 0.000000, 817.037109, 0.000000, 817.037109, 0.000000, 817.037109, 0.000000, + 820.037109, 0.000000, 826.089844, 0.000000, 828.041016, 0.000000, 828.041016, 0.000000, + 828.041016, 0.000000, 828.041016, 0.000000, 831.041016, 0.000000, 834.404297, 0.000000, + 842.408203, 0.000000, 842.408203, 0.000000, 842.408203, 0.000000, 842.408203, 0.000000, + 842.408203, 0.000000, 842.408203, 0.000000, 845.408203, 0.000000, 848.771484, 0.000000, + 855.322266, 0.000000, 855.322266, 0.000000, 861.714844, 0.000000, 865.078125, 0.000000, + 868.078125, 0.000000, 871.441406, 0.000000, 881.167969, 0.000000, 881.167969, 0.000000, + 881.167969, 0.000000, 884.531250, 0.000000, 894.257813, 0.000000, 894.257813, 0.000000, + 894.257813, 0.000000, 897.621094, 0.000000, 906.175781, 0.000000, 909.175781, 0.000000, + 919.007813, 0.000000, 919.007813, 0.000000, 919.007813, 0.000000, 922.007813, 0.000000, + 932.349609, 0.000000, 932.349609, 0.000000, 932.349609, 0.000000, 935.349609, 0.000000, + 945.181641, 0.000000, 945.181641, 0.000000, 945.181641, 0.000000, 945.181641, 0.000000, + 945.181641, 0.000000, 948.181641, 0.000000, 958.330078, 0.000000, 958.330078, 0.000000, + 958.330078, 0.000000, 961.330078, 0.000000, 970.892578, 0.000000, 970.892578, 0.000000, + 970.892578, 0.000000, 973.892578, 0.000000, 983.455078, 0.000000, 983.455078, 0.000000, + 983.455078, 0.000000, 986.455078, 0.000000, 996.017578, 0.000000, 996.017578, 0.000000, + 996.017578, 0.000000, 996.017578, 0.000000, 996.017578, 0.000000, 999.017578, 0.000000, + 1009.347656, 0.000000, 1009.347656, 0.000000, 1009.347656, 0.000000, 1009.347656, 0.000000, + 1009.347656, 0.000000, 1009.347656, 0.000000, 1009.347656, 0.000000, 1012.347656, 0.000000, + 1022.027344, 0.000000, 1022.027344, 0.000000, 1022.027344, 0.000000, 1022.027344, 0.000000, + 1022.027344, 0.000000, 1022.027344, 0.000000, 1022.027344, 0.000000, 1025.027344, 0.000000, + 1028.390625, 0.000000, 1034.666016, 0.000000, 1034.666016, 0.000000, 1038.498047, 0.000000, + 1038.498047, 0.000000, 1045.365234, 0.000000, 1045.365234, 0.000000, 1045.365234, 0.000000, + 1048.365234, 0.000000, 1053.697266, 0.000000, 1054.195313, 0.000000, 1060.025391, 0.000000, + 1060.025391, 0.000000, 1059.322266, 0.000000, 1060.025391, 0.000000, 1060.025391, 0.000000, + 1063.025391, 0.000000, 1069.078125, 0.000000, 1071.029297, 0.000000, 1074.029297, 0.000000, + 1080.082031, 0.000000, 1082.033203, 0.000000, 1085.033203, 0.000000, 1091.085938, 0.000000, + 1093.037109, 0.000000, 1096.037109, 0.000000, 1102.089844, 0.000000, 1104.041016, 0.000000, + 1107.041016, 0.000000, 1113.093750, 0.000000, 1115.044922, 0.000000, 1118.044922, 0.000000, + 1124.097656, 0.000000, 1126.048828, 0.000000, 1129.048828, 0.000000, 1135.101563, 0.000000, + 1137.052734, 0.000000, 1140.052734, 0.000000, 1146.603516, 0.000000, 1146.603516, 0.000000, + 1149.603516, 0.000000, 1156.154297, 0.000000, 1156.154297, 0.000000, 1159.154297, 0.000000, + 1165.623047, 0.000000, 1165.705078, 0.000000, 1168.705078, 0.000000, 1175.173828, 0.000000, + 1175.255859, 0.000000, 1178.255859, 0.000000, 1184.724609, 0.000000, 1184.806641, 0.000000 + </result-positions> + </test-case> + + <test-case id="Japanese Han" script="hani" lang="JAN"> + <test-font name="ARIALUNI.TTF" version="Version 1.00" checksum="0x58081551"/> + + <test-text>ä¸åŽäººæ°‘共和国 å°æ¹¾ ä¸è¯äººæ°‘共和國 臺ç£</test-text> + + <result-glyphs> + 0x000020BC, 0x000025DD, 0x00002149, 0x00003EA0, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003, + 0x0000267F, 0x0000410D, 0x00000003, 0x000020BC, 0x0000567E, 0x00002149, 0x00003EA0, 0x00002400, + 0x0000271B, 0x0000299A, 0x00000003, 0x00005489, 0x000042F2 + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, + 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, + 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, + 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000, + 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000, + 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000, + 214.001953, 0.000000, 226.001953, 0.000000 + </result-positions> + </test-case> + + <test-case id="Korean Han" script="hani" lang="KOR"> + <test-font name="ARIALUNI.TTF" version="Version 1.00" checksum="0x58081551"/> + + <test-text>ä¸åŽäººæ°‘共和国 å°æ¹¾ ä¸è¯äººæ°‘共和國 臺ç£</test-text> + + <result-glyphs> + 0x000020BC, 0x000025DD, 0x00002149, 0x00003EA0, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003, + 0x0000267F, 0x0000410D, 0x00000003, 0x000020BC, 0x00007492, 0x00002149, 0x00003EA0, 0x00002400, + 0x0000271B, 0x0000299A, 0x00000003, 0x00005489, 0x000042F2 + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, + 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, + 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, + 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000, + 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000, + 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000, + 214.001953, 0.000000, 226.001953, 0.000000 + </result-positions> + </test-case> + + <test-case id="Traditional Han" script="hani" lang="ZHT"> + <test-font name="ARIALUNI.TTF" version="Version 1.00" checksum="0x58081551"/> + + <test-text>ä¸åŽäººæ°‘共和国 å°æ¹¾ ä¸è¯äººæ°‘共和國 臺ç£</test-text> + + <result-glyphs> + 0x000020BC, 0x000025DD, 0x00002149, 0x000079EB, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003, + 0x00007677, 0x0000410D, 0x00000003, 0x000020BC, 0x00007E26, 0x00002149, 0x000079EB, 0x00002400, + 0x0000271B, 0x0000299A, 0x00000003, 0x00007D8F, 0x00007A97 + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, + 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, + 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, + 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000, + 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000, + 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000, + 214.001953, 0.000000, 226.001953, 0.000000 + </result-positions> + </test-case> + + <test-case id="Simplified Han" script="hani" lang="ZHS"> + <test-font name="ARIALUNI.TTF" version="Version 1.00" checksum="0x58081551"/> + + <test-text>ä¸åŽäººæ°‘共和国 å°æ¹¾ ä¸è¯äººæ°‘共和國 臺ç£</test-text> + + <result-glyphs> + 0x000020BC, 0x000025DD, 0x00002149, 0x000079EB, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003, + 0x00007677, 0x00008886, 0x00000003, 0x000020BC, 0x0000567E, 0x00002149, 0x000079EB, 0x00002400, + 0x0000271B, 0x0000299A, 0x00000003, 0x00007D8F, 0x00007A97 + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, + 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, + 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, + 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000, + 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000, + 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000, + 214.001953, 0.000000, 226.001953, 0.000000 + </result-positions> + </test-case> + + <test-case id="Deva locl Hindi" script="deva" lang="HIN"> + <test-font name="TestFont1.otf" version="Version 001.000 " checksum="0x75B4A535"/> + + <test-text>शङ़à¥</test-text> + + <result-glyphs> + 0x00000002, 0x00000001, 0x00000006, 0x0000FFFF + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 7.572000, 0.000000, 15.108000, 0.000000, 15.108000, 0.000000, + 15.108000, 0.000000 + </result-positions> + </test-case> + + <test-case id="Deva locl Marathi" script="deva" lang="MAR"> + <test-font name="TestFont1.otf" version="Version 001.000 " checksum="0x75B4A535"/> + + <test-text>शङ़à¥</test-text> + + <result-glyphs> + 0x00000005, 0x00000001, 0x00000006, 0x0000FFFF + </result-glyphs> + + <result-indices> + 0x00000000, 0x00000001, 0x00000002, 0x00000003 + </result-indices> + + <result-positions> + 0.000000, 0.000000, 7.392000, 0.000000, 14.927999, 0.000000, 14.927999, 0.000000, + 14.927999, 0.000000 + </result-positions> + </test-case> + +</layout-tests> diff --git a/Build/source/libs/icu-xetex/test/testdata/ra.xlf b/Build/source/libs/icu-xetex/test/testdata/ra.xlf new file mode 100644 index 00000000000..86a56080a31 --- /dev/null +++ b/Build/source/libs/icu-xetex/test/testdata/ra.xlf @@ -0,0 +1,247 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE xliff SYSTEM "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd"> +<xliff version = "1.0"> + <file xml:space = "preserve" source-language = "en" datatype = "ICUResourceBundle" original = "ra.txt" tool = "genrb" date = "2006-01-17T20:58:58Z"> + <header></header> + <body> + <group restype = "table" xml:space = "preserve" id = "ra" > + <!--These are top level comments for the bundle. Tag name: ra--> + <note> Comments for tag named ra</note> + <group restype = "array" xml:space = "preserve" id = "TestArray" resname="TestArray"> + <!--Top level comments for Tag name: TestArray--> + <note> This resource is for Tag name: Array</note> + <trans-unit xml:space = "preserve" id = "TestArray_0" translate="yes"> + <!--comments for un-named string--> + <source >abcde</source> + <note> This resource is un-named string</note> + </trans-unit> + <trans-unit restype = "int" xml:space = "preserve" id = "TestArray_1" translate="yes"> + <!--comments for un-named int--> + <source>1</source> + <note> This resource is un-named int</note> + </trans-unit> + <bin-unit restype = "bin" id = "TestArray_2" mime-type = "application" translate="yes"> + <!--comments for un-named binary--> + <bin-source> + <internal-file form = "application" crc = "-2140397846">12312312</internal-file> + </bin-source> + <note> This resource is for un-named binary</note> + </bin-unit> + </group> + <bin-unit restype = "import" id = "TestImpport" mime-type = "application" resname = "TestImpport" translate="yes"> + <!--comments for TestImport--> + <bin-source> + <external-file href = "importtest.bin"/> + </bin-source> + <note> This resource is for TestImport</note> + </bin-unit> + <trans-unit xml:space = "preserve" id = "TestInclude" resname = "TestInclude" translate="yes"> + <!--comments for TestInclude--> + <source >#-------------------------------------------------------------------- +# Copyright (c) 1999-2004, International Business Machines +# Corporation and others. All Rights Reserved. +#-------------------------------------------------------------------- + +# InterIndic-Bengali +#:: NFD (NFC) ; +\uE001>\u0981; # SIGN CANDRABINDU +\uE002>\u0982; # SIGN ANUSVARA +\uE003>\u0983; # SIGN VISARGA +\uE005>\u0985; # LETTER A +\uE006>\u0986; # LETTER AA +\uE007>\u0987; # LETTER I +\uE008>\u0988; # LETTER II +\uE009>\u0989; # LETTER U +\uE00A>\u098A; # LETTER UU +\uE00B>\u098B; # LETTER VOCALIC R +\uE00C>\u098C; # LETTER VOCALIC L +\uE00D>\u098F; # FALLBACK +\uE00E>\u098F; # FALLBACK +\uE00F>\u098F; # LETTER E +\uE010>\u0990; # LETTER AI +\uE011>\u0993; # FALLBACK +\uE012>\u0993; # FALLBACK +\uE013>\u0993; # LETTER O +\uE014>\u0994; # LETTER AU +\uE015>\u0995; # LETTER KA +\uE016>\u0996; # LETTER KHA +\uE017>\u0997; # LETTER GA +\uE018>\u0998; # LETTER GHA +\uE019>\u0999; # LETTER NGA +\uE01A>\u099A; # LETTER CA +\uE01B>\u099B; # LETTER CHA +\uE01C>\u099C; # LETTER JA +\uE01D>\u099D; # LETTER JHA +\uE01E>\u099E; # LETTER NYA +\uE01F>\u099F; # LETTER TTA +\uE020>\u09A0; # LETTER TTHA +\uE021>\u09A1; # LETTER DDA +\uE022>\u09A2; # LETTER DDHA +\uE023>\u09A3; # LETTER NNA +\uE024>\u09A4; # LETTER TA +\uE025>\u09A5; # LETTER THA +\uE026>\u09A6; # LETTER DA +\uE027>\u09A7; # LETTER DHA +\uE028>\u09A8; # LETTER NA +\uE029>\u09A8\u09BC; # REMAP (indicExceptions.txt): \u09a9>\u09a8 = LETTER NNNA>LETTER NA +\uE02A>\u09AA; # LETTER PA +\uE02B>\u09AB; # LETTER PHA +\uE02C>\u09AC; # LETTER BA +\uE02D>\u09AD; # LETTER BHA +\uE02E>\u09AE; # LETTER MA +\uE02F>\u09AF; # LETTER YA +\uE030>\u09B0; # LETTER RA +\uE031>\u09B0\u09BC; # FALLBACK to RA +\uE032>\u09B2; # LETTER LA +\uE033>\u09B2; # REMAP (indicExceptions.txt): \u09b3>\u09b2 = LETTER LLA>LETTER LA +\uE034>\u09B2; # REMAP (indicExceptions.txt): \u09b4>\u09b2 = LETTER LLLA>LETTER LA +\uE035>\u09AC; # REMAP (indicExceptions.txt): \u09b5>\u09ac = LETTER VA>LETTER BA +\uE036>\u09B6; # LETTER SHA +\uE037>\u09B7; # LETTER SSA +\uE038>\u09B8; # LETTER SA +\uE039>\u09B9; # LETTER HA +\uE03C>\u09BC; # SIGN NUKTA +\uE03D>; # FALLBACK BLOW AWAY AVAGRAHA +\uE03E>\u09BE; # VOWEL SIGN AA +\uE03F>\u09BF; # VOWEL SIGN I +\uE040>\u09C0; # VOWEL SIGN II +\uE041>\u09C1; # VOWEL SIGN U +\uE042>\u09C2; # VOWEL SIGN UU +\uE043>\u09C3; # VOWEL SIGN VOCALIC R +\uE044>\u09C4; # VOWEL SIGN VOCALIC RR +\uE045>\u09C7; # REMAP (indicExceptions.txt): \u09c5>\u09c7 = VOWEL SIGN CANDRA E>VOWEL SIGN E +\uE046>\u09C7; # FALLBACK +\uE047>\u09C7; # VOWEL SIGN E +\uE048>\u09C8; # VOWEL SIGN AI +\uE049>\u09C7\u09BE; # REMAP (indicExceptions.txt): \u09c9>\u09cb = VOWEL SIGN CANDRA O>VOWEL SIGN O +\uE04A>\u09C7\u09BE; # FALLBACK +\uE04B>\u09C7\u09BE; # VOWEL SIGN O +\uE04C>\u09C7\u09D7; # VOWEL SIGN AU +\uE04D>\u09CD; # SIGN VIRAMA +\uE050>\u0993\u0982; # InterIndic-Bengali: OM +\ue051>; +\ue052>; +\ue053>; +\ue054>; +\uE055>; # LENGTH MARK +\uE056>\u09C8; # REMAP (indicExceptions.txt): \u09d6>\u09c8 = AI LENGTH MARK>VOWEL SIGN AI +\uE057>\u09D7; # AU LENGTH MARK +\uE058>\u0995\u09BC; # FALLBACK +\uE059>\u0996\u09BC; # REMAP (indicExceptions.txt): \u09d9>\u0996 = LETTER KHHA>LETTER KHA +\uE05A>\u0997\u09BC; # REMAP (indicExceptions.txt): \u09da>\u0997 = LETTER GHHA>LETTER GA +\uE05B>\u099C\u09BC; # REMAP (indicExceptions.txt): \u09db>\u099c = LETTER ZA>LETTER JA +\uE05C>\u09A1\u09BC; # FALLBACK +\uE05D>\u09A2\u09BC; # LETTER RHA +\uE05E>\u09AB\u09BC; # REMAP (indicExceptions.txt): \u09de>\u09ab = LETTER FA>LETTER PHA +\uE05F>\u09AF\u09BC; # LETTER YYA +\uE060>\u09E0; # LETTER VOCALIC RR +\uE061>\u09E1; # LETTER VOCALIC LL +\uE062>\u09E2; # VOWEL SIGN VOCALIC L +\uE063>\u09E3; # VOWEL SIGN VOCALIC LL +\uE064>\u0964; # DANDA +\uE065>\u0965; # DOUBLE DANDA +\uE066>\u09E6; # DIGIT ZERO +\uE067>\u09E7; # DIGIT ONE +\uE068>\u09E8; # DIGIT TWO +\uE069>\u09E9; # DIGIT THREE +\uE06A>\u09EA; # DIGIT FOUR +\uE06B>\u09EB; # DIGIT FIVE +\uE06C>\u09EC; # DIGIT SIX +\uE06D>\u09ED; # DIGIT SEVEN +\uE06E>\u09EE; # DIGIT EIGHT +\uE06F>\u09EF; # DIGIT NINE +\ue070>; # ABBREVIATION SIGN +\ue071>\u09F0; # LETTER RA WITH MIDDLE DIAGONAL +\ue072>\u09F1; # LETTER RA WITH LOWER DIAGONAL +\ue073>\u09F2; # RUPEE MARK +\ue074>\u09F3; # RUPEE SIGN +\ue075>\u09F4; # CURRENCY NUMERATOR ONE +\ue076>\u09F5; # CURRENCY NUMERATOR TWO +\ue077>\u09F6; # CURRENCY NUMERATOR THREE +\ue078>\u09F7; # CURRENCY NUMERATOR FOUR +\ue079>\u09F8; # CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR +\ue07A>\u09F9; # CURRENCY DENOMINATOR SIXTEEN +\ue07B>\u09FA; # ISSHAR +\uE07C>; # TIPPI +\uE07D>; # ADDAK +\uE07E>; # IRI +\uE07F>; # URA +\uE080>; # EK ONKAR + +0 > \u09E6; # FALLBACK FOR TAMIL +1 > \u09E7; + + + + + + + + + + + +# :: NFC (NFD) ; +# eof +</source> + <note> This resource is for TestInclude</note> + </trans-unit> + <group restype = "array" xml:space = "preserve" id = "TestIntVector" resname="TestIntVector"> + <!--comments for TestIntVector--> + <note> This resource is for TestIntVector</note> + <trans-unit xml:space = "preserve" id = "TestIntVector_0" translate="yes"> + <!--comments for element 1--> + <source >1</source> + <note> This resource is for element 1</note> + </trans-unit> + <trans-unit xml:space = "preserve" id = "TestIntVector_1" translate="yes"> + <!--comments for element 2--> + <source >2</source> + <note> This resource is for element 2</note> + </trans-unit> + <trans-unit xml:space = "preserve" id = "TestIntVector_2" translate="yes"> + <!--comments for element 3--> + <source >3</source> + <note> This resource is for element 3</note> + </trans-unit> + </group> + <group restype = "table" xml:space = "preserve" id = "TestTable" resname="TestTable" > + <!--Top level comments for TestTable. Tag name: TestTable--> + <note> This resource is for TestTable</note> + <trans-unit xml:space = "preserve" id = "TestTable_test3" resname = "test3" translate="yes"> + <!--Tag name: test3--> + <source >jasldjfa</source> + <note> This resource is for test3</note> + </trans-unit> + <trans-unit xml:space = "preserve" id = "TestTable_test4" resname = "test4" translate="yes"> + <!--Tag name: test4--> + <source >asdfasdf</source> + <note> This resource is for test4</note> + </trans-unit> + <trans-unit restype = "int" xml:space = "preserve" id = "TestTable_test5" resname = "test5" translate="yes"> + <!--Tag name: test5--> + <source>1</source> + <note> This resource is for test5</note> + </trans-unit> + <bin-unit restype = "bin" id = "TestTable_test6" mime-type = "application" resname = "test6" translate="yes"> + <!--Tag name: test6--> + <bin-source> + <internal-file form = "application" crc = "480784534">0102</internal-file> + </bin-source> + <note> This resource is for test6</note> + </bin-unit> + </group> + <trans-unit xml:space = "preserve" id = "test1" resname = "test1" translate="yes"> + <!--Top level comments for the string.Tag name: test1--> + <source >The {0} job named {1}</source> + <note> {0} represents the position of OSNAME and {1} represents the position of job name e.g: The OS/400 job named SYSLOG</note> + </trans-unit> + <trans-unit xml:space = "preserve" id = "test2" resname = "test2" translate="yes"> + <!--Tag name: test2--> + <source >some translatable stuff</source> + <note> This resource is for test2</note> + </trans-unit> + </group> + </body> + </file> +</xliff> diff --git a/Build/source/libs/icu-xetex/test/testdata/rbbitst.txt b/Build/source/libs/icu-xetex/test/testdata/rbbitst.txt index bdb45db0c74..adaddce18f5 100644 --- a/Build/source/libs/icu-xetex/test/testdata/rbbitst.txt +++ b/Build/source/libs/icu-xetex/test/testdata/rbbitst.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2001-2004 International Business Machines +# Copyright (c) 2001-2006 International Business Machines # Corporation and others. All Rights Reserved. # # RBBI Test Data @@ -12,6 +12,7 @@ # <sent> any following data is for sentence break testing # <line> any following data is for line break testing # <char> any following data is for char break testing +# <locale local_name> Switch to the named locale at the next occurence of <word>, <sent>, etc. # <data> ... </data> test data. May span multiple lines. # <> Break position, status == 0 # • Break position, status == 0 (Bullet, \u2022) @@ -22,7 +23,7 @@ # -# Temp debugging tests +# Temp debugging tests <line> # to test for bug #4097920 <data>•dog,cat,mouse •(one)•(two)\n<100></data> @@ -87,6 +88,8 @@ # (Requires special casing in implementation, which is why it gets a test.) <data>•\uffff•\uffff• •a•</data> +# Treat Japanese Half Width voicing marks as combining +<data>•A\uff9e•B\uff9f\uff9e\uff9f•C•</data> ######################################################################################## # @@ -156,7 +159,7 @@ <data>•abc<200>\u4e01<400>\u4e02<400>\u3005<200>\u4e03<400>\u4e03<400>abc<200> •</data> -<data>•\u06c9\uc799<200>\ufffa•</data> +<data>•\u06c9\uc799\ufffa<200></data> # # Try some words from other scripts. @@ -185,6 +188,11 @@ # <data>•\u8527<400>\u02ba<200>\u0027\u0d42•\u00b7•\u09ea<100></data> +# +# Jitterbug 5276 - treat Japanese half width voicing marks as Grapheme Extend +# +<data>•A\uff9e\uff9fBC<200> •1\uff9e\uff9f23<100></data> + ######################################################################################## # # @@ -217,19 +225,19 @@ doing? •This\n<100> costs $20,00,000. •</data> "This isn't it." •Hi! \ •This is a simple sample sentence. •(This is it.) •This is a simple sample sentence. •\ "This isn't it." •\ -Hi! •This is a simple sample sentence. •It does not have to make any sense as you can see. •Nel mezzo del cammin di nostra vita, mi ritrovai in una selva oscura. •Che la dritta via aveo smarrita. •He said, that I said, that you said!•! •Don't rock the boat.\u2029•Because I am the daddy, that is why. -•Not on my time (el timo.)•! •</data> +Hi! •This is a simple sample sentence. •It does not have to make any sense as you can see. •Nel mezzo del cammin di nostra vita, mi ritrovai in una selva oscura. •Che la dritta via aveo smarrita. •He said, that I said, that you said!! •Don't rock the boat.\u2029•Because I am the daddy, that is why. +•Not on my time (el timo.)! •</data> -<data>•Hello. •So what!•!\u2029•"But now," he said, \ +<data>•Hello. •So what!!\u2029•"But now," he said, \ "I know!" •\ -Harris thumbed down several, including "Away We Go" (which became the huge success Oklahoma!)•. •One species, B. anthracis, is highly virulent. +Harris thumbed down several, including "Away We Go" (which became the huge success Oklahoma!). •One species, B. anthracis, is highly virulent. •Wolf said about Sounder:\ "Beautifully thought-out and directed." •\ Have you ever said, "This is where\tI shall live"? •He answered, \ -"You may not!" •Another popular saying is: "How do you do?"•. \n•\ +"You may not!" •Another popular saying is: "How do you do?". \n•\ Yet another popular saying is: \ 'I'm fine thanks.' •\ -What is the proper use of the abbreviation pp.•? •Yes, I am definatelly 12" tall!•!\ +What is the proper use of the abbreviation pp.? •Yes, I am definatelly 12" tall!!\ •Now\r<100>is\n<100>the\r\n<100>time\n<100>\r<100>for\r<100>\r<100></data> <data>•No breaks when . is surrounded by UPPER.Case letters. •</data> @@ -245,13 +253,13 @@ What is the proper use of the abbreviation pp.•? •Yes, I am definatelly 12" # Treat fullwidth variants of .!? the same as their # normal counterparts # -<data>•I know I'm right\uff0e •Right\uff1f •Right\uff01 •</data>" +<data>•I know I'm right\uff0e •Right\uff1f •Right\uff01 •</data> # # Don't break sentences at boundary between CJK and digits # -<data>•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165\u9de8\u97e48888\u821c\u8165\u7fc8\u51ce\u306d\ue30b\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46\u97e5\u7751\u3002•Bye, now<100></data>" +<data>•\u5487\u67ff\ue591\u5017\u61b3\u60a1\u9510\u8165\u9de8\u97e48888\u821c\u8165\u7fc8\u51ce\u306d\ue30b\u2494\u56d8\u4ec0\u60b1\u8560\u51ba\u611d\u57b6\u2510\u5d46\u97e5\u7751\u3002•Bye, now<100></data> # # Breaks around '(' following a sentence TERM. (Rule 9) @@ -310,7 +318,7 @@ What is the proper use of the abbreviation pp.•? •Yes, I am definatelly 12" # Regression test for bug #1984, Sentence break in Arabic text. <data>\ -•\u0623\u0633\u0627\u0633\u064b\u0627\u060c\u0020\u062a\u062a\u0639\u0627"\u0645\u0644\u0020\u0627\u0644\u062d\u0648\u0627\u0633\u064a\u0628\u0020"\u0641\u0642\u0637\u0020\u0645\u0639\u0020\u0627\u0644\u0623\u0631\u0642\u0627\u0645\u060c\u0648\u062a\u0642\u0648\u0645\u0020\u0628\u062a\u062e\u0632\u064a\u0646\u0020\u0627\u0644\u0623\u062d\u0631\u0641\u0020\u0648\u0627\u0644\u0645\u062d\u0627\u0631\u0641\u0020\u0627\u0644\u0623\u062e\u0631\u0649\u0020\u0628\u0639\u062f\u0020\u0623\u0646\u062a\u064f\u0639\u0637\u064a\u0020\u0631\u0642\u0645\u0627\u0020\u0645\u0639\u064a\u0646\u0627\u0020\u0644\u0643\u0644\u0020\u0648\u0627\u062d\u062f\u0020\u0645\u0646\u0647\u0627\u002e\u0020•\u0648\u0642\u0628\u0644\u0020\u0627\u062e\u062a\u0631\u0627\u0639\u0022\u064a\u0648\u0646\u0650\u0643\u0648\u062f\u0022\u060c\u0020\u0643\u0627\u0646\u0020\u0647\u0646\u0627\u0643\u0020\u0645\u0626\u0627\u062a\u0020\u0627\u0644\u0623\u0646\u0638\u0645\u0629\u0020\u0644\u0644\u062a\u0634\u0641\u064a\u0631\u0648\u062a\u062e\u0635\u064a\u0635\u0020\u0647\u0630\u0647\u0020\u0627\u0644\u0623\u0631\u0642\u0627\u0645\u0020\u0644\u0644\u0645\u062d\u0627\u0631\u0641\u060c\u0020\u0648\u0644\u0645\u0020\u064a\u0648\u062c\u062f\u0020\u0646\u0638\u0627\u0645\u062a\u0634\u0641\u064a\u0020\u0639\u0644\u0649\u0020\u062c\u0645\u064a\u0639\u0020\u0627\u0644\u0645\u062d\u0627\u0631\u0641\u0020\u0627\u0644\u0636\u0631\u0648\u0631\u064a\u0629. •</data>" +•\u0623\u0633\u0627\u0633\u064b\u0627\u060c\u0020\u062a\u062a\u0639\u0627"\u0645\u0644\u0020\u0627\u0644\u062d\u0648\u0627\u0633\u064a\u0628\u0020"\u0641\u0642\u0637\u0020\u0645\u0639\u0020\u0627\u0644\u0623\u0631\u0642\u0627\u0645\u060c\u0648\u062a\u0642\u0648\u0645\u0020\u0628\u062a\u062e\u0632\u064a\u0646\u0020\u0627\u0644\u0623\u062d\u0631\u0641\u0020\u0648\u0627\u0644\u0645\u062d\u0627\u0631\u0641\u0020\u0627\u0644\u0623\u062e\u0631\u0649\u0020\u0628\u0639\u062f\u0020\u0623\u0646\u062a\u064f\u0639\u0637\u064a\u0020\u0631\u0642\u0645\u0627\u0020\u0645\u0639\u064a\u0646\u0627\u0020\u0644\u0643\u0644\u0020\u0648\u0627\u062d\u062f\u0020\u0645\u0646\u0647\u0627\u002e\u0020•\u0648\u0642\u0628\u0644\u0020\u0627\u062e\u062a\u0631\u0627\u0639\u0022\u064a\u0648\u0646\u0650\u0643\u0648\u062f\u0022\u060c\u0020\u0643\u0627\u0646\u0020\u0647\u0646\u0627\u0643\u0020\u0645\u0626\u0627\u062a\u0020\u0627\u0644\u0623\u0646\u0638\u0645\u0629\u0020\u0644\u0644\u062a\u0634\u0641\u064a\u0631\u0648\u062a\u062e\u0635\u064a\u0635\u0020\u0647\u0630\u0647\u0020\u0627\u0644\u0623\u0631\u0642\u0627\u0645\u0020\u0644\u0644\u0645\u062d\u0627\u0631\u0641\u060c\u0020\u0648\u0644\u0645\u0020\u064a\u0648\u062c\u062f\u0020\u0646\u0638\u0627\u0645\u062a\u0634\u0641\u064a\u0020\u0639\u0644\u0649\u0020\u062c\u0645\u064a\u0639\u0020\u0627\u0644\u0645\u062d\u0627\u0631\u0641\u0020\u0627\u0644\u0636\u0631\u0648\u0631\u064a\u0629. •</data> # Try a few more of the less common sentence endings. <data>•Hello, world\u3002 •Hello, world\u1803 •Hello, world\u2048 •Hello, world\u203c •Let's end here. •</data> @@ -473,7 +481,7 @@ What is the proper use of the abbreviation pp.•? •Yes, I am definatelly 12" <data>•\u4e01•\ud840\udc01•\u4e02•abc •\ue000 •\udb80\udc01•</data> # Regression for bug 836 -<data>•AAA•(AAA •</data> +<data>•AAA(AAA •</data> # Try some words from other scripts. # Greek, Cyrillic, Hebrew, Arabic, Arabic, Georgian, Latin @@ -499,3 +507,26 @@ What is the proper use of the abbreviation pp.•? •Yes, I am definatelly 12" <data>•'•start •with •a •case-•ignorable •cha'r'a'cter•</data> + +########################################################################################## +# +# Thai Tests +# +########################################################################################## +<locale th> +<word> +# +# Test data originally from the test code source file +# // @suwit -- Thai sample data from GVT Guideline +# +<data>•\u0E2B\u0E19\u0E36\u0E48\u0E07<200>\u0E04\u0E33<200>\u0E44\u0E17\u0E22<200>\ +\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16<200>\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A<200>\ +\u0E14\u0E49\u0E27\u0E22<200>\u0e2b\u0e25\u0e32\u0e22<200>\ +\u0e1e\u0e22\u0e32\u0e07\u0e04\u0e4c<200></data> + +# +# Jitterbug 3671 Test Case +# +<data>•สวัสดี<200>ครับ<200>สบาย<200>ดี<200>ไหม<200> •ครับ<200></data> + + diff --git a/Build/source/libs/icu-xetex/test/testdata/regextst.txt b/Build/source/libs/icu-xetex/test/testdata/regextst.txt index ec7ca044801..38c3d42bdab 100644 --- a/Build/source/libs/icu-xetex/test/testdata/regextst.txt +++ b/Build/source/libs/icu-xetex/test/testdata/regextst.txt @@ -508,6 +508,28 @@ "\b....\b." "<0>イãƒãƒãƒ¼?</0>" # +# Bug 4058 ICU Unicode Set patterns have an odd feature - +# A $ as the last character before the close bracket means match +# a \uffff, which means off the end of the string in transliterators. +# Doesn't make much sense for regex, but works that way anyhow. +# +"[\$](P|C|D);" "<0>$<1>P</1>;</0>" +"[$](P|C|D);" "<0>\uffff<1>P</1>;</0>" +"[$](P|C|D);" "$P;" +"[$$](P|C|D);" "<0>$<1>P</1>;</0>" + +# +# bug 4888 Flag settings lost in some cases. +# +"((a){2})|(#)" is "no" +"((a){2})|(#)" is "<0><1>a<2>a</2></1></0>#" +"((a){2})|(#)" is "a<0><3>#</3></0>" + +"((a|b){2})|c" is "<0>c</0>" +"((a|b){2})|c" is "<0>C</0>" +"((a|b){2})|c" s "C" + +# # Random debugging, Temporary # #"^(?:a?b?)*$" "a--" diff --git a/Build/source/libs/icu-xetex/test/testdata/structLocale.txt b/Build/source/libs/icu-xetex/test/testdata/structLocale.txt index fe1086a2a07..6df6655cab8 100644 --- a/Build/source/libs/icu-xetex/test/testdata/structLocale.txt +++ b/Build/source/libs/icu-xetex/test/testdata/structLocale.txt @@ -1,6 +1,6 @@ // *************************************************************************** // * -// * Copyright (C) 2004-2005 International Business Machines +// * Copyright (C) 2004-2006 International Business Machines // * Corporation and others. All Rights Reserved. // * // *************************************************************************** @@ -9,7 +9,7 @@ // Since ICU doesn't follow the traditional fallback model where all keys fallback to root, // root can't be used to validate the structure. // This file was generated from en.txt, and all ".*" were replaced with "". -structLocale{ +structLocale:table(nofallback){ BreakDictionaryData:bin {00} Countries{ 001{""} @@ -27,6 +27,7 @@ structLocale{ 021{""} 029{""} 030{""} + 034{""} 035{""} 039{""} 053{""} @@ -35,6 +36,7 @@ structLocale{ 061{""} 062{""} 142{""} + 143{""} 145{""} 150{""} 151{""} @@ -124,6 +126,7 @@ structLocale{ GD{""} GE{""} GF{""} + GG{""} GH{""} GI{""} GL{""} @@ -146,12 +149,14 @@ structLocale{ ID{""} IE{""} IL{""} + IM{""} IN{""} IO{""} IQ{""} IR{""} IS{""} IT{""} + JE{""} JM{""} JO{""} JP{""} @@ -226,7 +231,9 @@ structLocale{ PW{""} PY{""} QA{""} + QE{""} QO{""} + QU{""} RE{""} RO{""} RU{""} @@ -287,6 +294,7 @@ structLocale{ ZA{""} ZM{""} ZW{""} + ZZ{""} } Currencies{ ADP{ @@ -361,6 +369,10 @@ structLocale{ "", "", } + AZN{ + "", + "", + } BAD{ "", "", @@ -941,6 +953,10 @@ structLocale{ "", "", } + MZN{ + "", + "", + } NAD{ "", "", @@ -1033,6 +1049,10 @@ structLocale{ "", "", } + RON{ + "", + "", + } RUB{ "", "", @@ -1370,6 +1390,7 @@ structLocale{ af{""} afa{""} afh{""} + ain{""} ak{""} akk{""} ale{""} @@ -1378,6 +1399,7 @@ structLocale{ am{""} an{""} ang{""} + anp{""} apa{""} ar{""} arc{""} @@ -1427,6 +1449,7 @@ structLocale{ cai{""} car{""} cau{""} + cch{""} ce{""} ceb{""} cel{""} @@ -1498,6 +1521,8 @@ structLocale{ fr{""} frm{""} fro{""} + frr{""} + frs{""} fur{""} fy{""} ga{""} @@ -1517,6 +1542,7 @@ structLocale{ got{""} grb{""} grc{""} + gsw{""} gu{""} gv{""} gwi{""} @@ -1564,10 +1590,13 @@ structLocale{ kaa{""} kab{""} kac{""} + kaj{""} kam{""} kar{""} kaw{""} kbd{""} + kcg{""} + kfo{""} kg{""} kha{""} khi{""} @@ -1585,6 +1614,7 @@ structLocale{ kpe{""} kr{""} krc{""} + krl{""} kro{""} kru{""} ks{""} @@ -1716,6 +1746,7 @@ structLocale{ rom{""} root{""} ru{""} + rup{""} rw{""} sa{""} sad{""} @@ -1835,6 +1866,7 @@ structLocale{ znd{""} zu{""} zun{""} + zxx{""} } LocaleScript{ "", @@ -1976,6 +2008,7 @@ structLocale{ chinese{""} gregorian{""} hebrew{""} + persian{""} islamic{""} islamic-civil{""} japanese{""} @@ -1994,6 +2027,7 @@ structLocale{ 1901{""} 1996{""} POSIX{""} + POLYTONI{""} REVISED{""} BOONT{""} GAULISH{""} @@ -2001,6 +2035,7 @@ structLocale{ HAKKA{""} LOJBAN{""} NEDIS{""} + SAAHO{""} ROZAJ{""} SCOUSE{""} XIANG{""} @@ -2049,14 +2084,86 @@ structLocale{ "", } } + coptic{ + monthNames{ + format{ + abbreviated{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + wide{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + } + } + } default{""} + ethiopic{ + monthNames{ + format{ + abbreviated{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + wide{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + } + } + } gregorian{ AmPmMarkers{ "", "", } DateTimeElements:intvector{ - 1, + 2, 1, } DateTimePatterns{ @@ -2070,6 +2177,34 @@ structLocale{ "", "", } + appendItems{ + Day{"{0} ({2}: {1})"} + Day-Of-Week{"{0} {1}"} + Era{"{0} {1}"} + Hour{"{0} ({2}: {1})"} + Minute{"{0} ({2}: {1})"} + Month{"{0} ({2}: {1})"} + Quarter{"{0} ({2}: {1})"} + Second{"{0} ({2}: {1})"} + Timezone{"{0} {1}"} + Week{"{0} ({2}: {1})"} + Year{"{0} {1}"} + } + availableFormats{ + HHmm{""} + HHmmss{""} + KKmm{"KK:mm a"} + KKmmss{"KK:mm:ss a"} + MMMM{""} + MMMdd{""} + mmssSS{""} + ww{""} + yyMM{""} + yyMMMEEEd{""} + yyMMMd{""} + yyMd{""} + yyQQQQ{""} + } dayNames{ default{""} format{ @@ -2143,6 +2278,96 @@ structLocale{ "" } } + fields{ + day{ + dn{"Day"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + dayperiod{ + dn{"Dayperiod"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + era{ + dn{"Era"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + hour{ + dn{"Hour"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + minute{ + dn{"Minute"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + month{ + dn{"Month"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + second{ + dn{"Second"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + week{ + dn{"Week"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + weekday{ + dn{"Day of the Week"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + year{ + dn{"Year"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + zone{ + dn{"Zone"} + relative{ + "-1"{""} + "0"{""} + "1"{""} + } + } + } monthNames{ default{""} format{ @@ -2236,6 +2461,22 @@ structLocale{ } } } + quarters{ + format{ + abbreviated{ + "", + "", + "", + "", + } + wide{ + "", + "", + "", + "", + } + } + } weekend:intvector{ 7, 0, @@ -2277,20 +2518,224 @@ structLocale{ } } islamic{ + DateTimeElements:intvector{ + 1, + 1, + } + DateTimePatterns{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + eras{ + abbreviated{ + "", + } + wide{ + "", + } + } + monthNames{ + default{""} + format{ + abbreviated{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + default{""} + narrow{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + wide{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + } + stand-alone{ + abbreviated{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + default{""} + narrow{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + wide{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + } + } + } + persian{ + DateTimeElements:intvector{ + 1, + 1, + } + DateTimePatterns{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + } eras{ abbreviated{ "", } wide{ "", - "" } } monthNames{ default{""} format{ - abbreviated:alias{"structLocale/calendar/islamic/monthNames/format/wide"} + abbreviated{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + default{""} + narrow{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + wide{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } + } + stand-alone{ + abbreviated{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } default{""} + narrow{ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + } wide{ "", "", @@ -2567,15 +3012,5268 @@ structLocale{ } } } + layout{ + casing{""} + characters{""} + lines{""} + } localPatternChars{""} + measurementSystemNames{ + US{"US"} + metric{"Metric"} + } + messages{ + nostr{""} + yesstr{""} + yesexpr{""} + noexpr{""} + } zoneStrings{ - { - "", - "", - "", - "", - "", - "", + hoursFormat{""} + hourFormat{""} + gmtFormat{""} + regionFormat{""} + fallbackFormat{""} + abbreviationFallback{""} + preferenceOrdering:array{""} + singleCountries:array{""} + "ACT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "AET"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "AGT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "ART"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "AST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Abidjan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Accra"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Addis_Ababa"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Algiers"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Asmera"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Bamako"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Bangui"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Banjul"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Bissau"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Blantyre"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Brazzaville"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Bujumbura"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Cairo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Casablanca"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Ceuta"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Conakry"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Dakar"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Dar_es_Salaam"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Djibouti"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Douala"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:El_Aaiun"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Freetown"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Gaborone"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Harare"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Johannesburg"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Kampala"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Khartoum"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Kigali"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Kinshasa"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Lagos"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Libreville"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Lome"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Luanda"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Lubumbashi"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Lusaka"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Malabo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Maputo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Maseru"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Mbabane"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Mogadishu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Monrovia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Nairobi"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Ndjamena"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Niamey"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Nouakchott"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Ouagadougou"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Porto-Novo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Sao_Tome"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Timbuktu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Tripoli"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Tunis"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Africa:Windhoek"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Adak"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Anchorage"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Anguilla"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Antigua"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Araguaina"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:Buenos_Aires"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:Catamarca"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:ComodRivadavia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:Cordoba"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:Jujuy"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:La_Rioja"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:Mendoza"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:Rio_Gallegos"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:San_Juan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:Tucuman"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Argentina:Ushuaia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Aruba"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Asuncion"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Atka"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Bahia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Barbados"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Belem"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Belize"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Boa_Vista"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Bogota"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Boise"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Buenos_Aires"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Cambridge_Bay"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Campo_Grande"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Cancun"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Caracas"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Catamarca"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Cayenne"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Cayman"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Chicago"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Chihuahua"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Coral_Harbour"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Cordoba"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Costa_Rica"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Cuiaba"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Curacao"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Danmarkshavn"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Dawson"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Dawson_Creek"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Denver"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Detroit"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Dominica"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Edmonton"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Eirunepe"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:El_Salvador"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Ensenada"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Fort_Wayne"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Fortaleza"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Glace_Bay"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Godthab"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Goose_Bay"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Grand_Turk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Grenada"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Guadeloupe"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Guatemala"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Guayaquil"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Guyana"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Halifax"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Havana"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Hermosillo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Indiana:Indianapolis"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Indiana:Knox"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Indiana:Marengo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Indiana:Petersburg"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Indiana:Vevay"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Indiana:Vincennes"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Indianapolis"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Inuvik"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Iqaluit"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Jamaica"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Jujuy"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Juneau"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Kentucky:Louisville"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Kentucky:Monticello"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Knox_IN"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:La_Paz"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Lima"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Los_Angeles"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Louisville"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Maceio"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Managua"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Manaus"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Martinique"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Mazatlan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Mendoza"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Menominee"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Merida"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Mexico_City"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Miquelon"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Moncton"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Monterrey"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Montevideo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Montreal"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Montserrat"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Nassau"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:New_York"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Nipigon"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Nome"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Noronha"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:North_Dakota:Center"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Panama"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Pangnirtung"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Paramaribo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Phoenix"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Port-au-Prince"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Port_of_Spain"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Porto_Acre"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Porto_Velho"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Puerto_Rico"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Rainy_River"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Rankin_Inlet"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Recife"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Regina"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Rio_Branco"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Rosario"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Santiago"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Santo_Domingo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Sao_Paulo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Scoresbysund"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Shiprock"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:St_Johns"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:St_Kitts"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:St_Lucia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:St_Thomas"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:St_Vincent"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Swift_Current"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Tegucigalpa"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Thule"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Thunder_Bay"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Tijuana"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Toronto"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Tortola"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Vancouver"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Virgin"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Whitehorse"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Winnipeg"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Yakutat"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "America:Yellowknife"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:Casey"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:Davis"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:DumontDUrville"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:Mawson"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:McMurdo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:Palmer"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:Rothera"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:South_Pole"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:Syowa"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Antarctica:Vostok"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Arctic:Longyearbyen"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Aden"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Almaty"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Amman"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Anadyr"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Aqtau"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Aqtobe"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Ashgabat"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Ashkhabad"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Baghdad"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Bahrain"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Baku"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Bangkok"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Beirut"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Bishkek"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Brunei"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Calcutta"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Choibalsan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Chongqing"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Chungking"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Colombo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Dacca"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Damascus"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Dhaka"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Dili"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Dubai"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Dushanbe"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Gaza"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Harbin"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Hong_Kong"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Hovd"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Irkutsk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Istanbul"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Jakarta"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Jayapura"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Jerusalem"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Kabul"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Kamchatka"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Karachi"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Kashgar"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Katmandu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Krasnoyarsk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Kuala_Lumpur"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Kuching"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Kuwait"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Macao"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Macau"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Magadan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Makassar"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Manila"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Muscat"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Nicosia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Novosibirsk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Omsk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Oral"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Phnom_Penh"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Pontianak"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Pyongyang"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Qatar"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Qyzylorda"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Rangoon"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Riyadh"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Riyadh87"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Riyadh88"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Riyadh89"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Saigon"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Sakhalin"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Samarkand"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Seoul"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Shanghai"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Singapore"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Taipei"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Tashkent"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Tbilisi"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Tehran"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Tel_Aviv"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Thimbu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Thimphu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Tokyo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Ujung_Pandang"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Ulaanbaatar"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Ulan_Bator"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Urumqi"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Vientiane"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Vladivostok"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Yakutsk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Yekaterinburg"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Asia:Yerevan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Azores"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Bermuda"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Canary"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Cape_Verde"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Faeroe"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Jan_Mayen"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Madeira"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Reykjavik"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:South_Georgia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:St_Helena"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Atlantic:Stanley"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:ACT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Adelaide"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Brisbane"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Broken_Hill"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Canberra"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Currie"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Darwin"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Hobart"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:LHI"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Lindeman"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Lord_Howe"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Melbourne"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:NSW"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:North"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Perth"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Queensland"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:South"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Sydney"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Tasmania"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Victoria"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:West"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Australia:Yancowinna"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "BET"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "BST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Brazil:Acre"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Brazil:DeNoronha"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Brazil:East"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Brazil:West"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "CAT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "CET"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "CNT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "CST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "CST6CDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "CTT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:Atlantic"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:Central"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:East-Saskatchewan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:Eastern"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:Mountain"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:Newfoundland"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:Pacific"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:Saskatchewan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Canada:Yukon"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Chile:Continental"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Chile:EasterIsland"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Cuba"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "EAT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "ECT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "EET"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "EST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "EST5EDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Egypt"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Eire"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+0"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+1"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+10"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+11"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+12"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+2"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+3"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+4"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+5"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+6"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+7"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+8"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT+9"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-0"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-1"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-10"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-11"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-12"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-13"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-14"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-2"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-3"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-4"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-5"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-6"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-7"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-8"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT-9"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:GMT0"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:Greenwich"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:UCT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:UTC"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:Universal"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Etc:Zulu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Amsterdam"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Andorra"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Athens"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Belfast"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Belgrade"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Berlin"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Bratislava"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Brussels"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Bucharest"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Budapest"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Chisinau"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Copenhagen"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Dublin"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Gibraltar"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Helsinki"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Istanbul"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Kaliningrad"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Kiev"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Lisbon"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Ljubljana"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:London"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Luxembourg"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Madrid"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Malta"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Mariehamn"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Minsk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Monaco"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Moscow"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Nicosia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Oslo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Paris"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Prague"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Riga"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Rome"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Samara"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:San_Marino"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Sarajevo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Simferopol"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Skopje"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Sofia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Stockholm"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Tallinn"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Tirane"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Tiraspol"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Uzhgorod"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Vaduz"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Vatican"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Vienna"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Vilnius"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Warsaw"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Zagreb"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Zaporozhye"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Europe:Zurich"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Factory"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "GB"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "GB-Eire"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "GMT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "GMT+0"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "GMT-0"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "GMT0"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Greenwich"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "HST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Hongkong"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "IET"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "IST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Iceland"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Antananarivo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Chagos"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Christmas"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Cocos"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Comoro"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Kerguelen"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Mahe"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Maldives"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Mauritius"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Mayotte"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Indian:Reunion"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Iran"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Israel"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "JST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Jamaica"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Japan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Kwajalein"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Libya"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "MET"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "MIT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "MST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "MST7MDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Mexico:BajaNorte"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Mexico:BajaSur"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Mexico:General"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Mideast:Riyadh87"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Mideast:Riyadh88"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Mideast:Riyadh89"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "NET"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "NST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "NZ"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "NZ-CHAT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Navajo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "PLT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "PNT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "PRC"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "PRT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "PST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "PST8PDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Apia"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Auckland"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Chatham"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Easter"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Efate"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Enderbury"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Fakaofo"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Fiji"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Funafuti"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Galapagos"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Gambier"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Guadalcanal"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Guam"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Honolulu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Johnston"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Kiritimati"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Kosrae"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Kwajalein"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Majuro"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Marquesas"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Midway"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Nauru"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Niue"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Norfolk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Noumea"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Pago_Pago"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Palau"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Pitcairn"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Ponape"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Port_Moresby"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Rarotonga"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Saipan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Samoa"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Tahiti"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Tarawa"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Tongatapu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Truk"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Wake"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Wallis"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Pacific:Yap"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Poland"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Portugal"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "ROC"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "ROK"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Singapore"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:AST4"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:AST4ADT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:CST6"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:CST6CDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:EST5"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:EST5EDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:HST10"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:MST7"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:MST7MDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:PST8"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:PST8PDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:YST9"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "SystemV:YST9YDT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Turkey"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "UCT"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Alaska"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Aleutian"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Arizona"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Central"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:East-Indiana"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Eastern"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Hawaii"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Indiana-Starke"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Michigan"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Mountain"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Pacific"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Pacific-New"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "US:Samoa"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "UTC"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Universal"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "VST"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "W-SU"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "WET"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} + } + "Zulu"{ + ld{""} + lg{""} + ls{""} + sd{""} + sg{""} + ss{""} + ec{""} } } } diff --git a/Build/source/libs/icu-xetex/test/testdata/te.txt b/Build/source/libs/icu-xetex/test/testdata/te.txt index e665ae48a9b..3a83c82cf4e 100644 --- a/Build/source/libs/icu-xetex/test/testdata/te.txt +++ b/Build/source/libs/icu-xetex/test/testdata/te.txt @@ -107,6 +107,59 @@ te a3{"a23"} a4{"a24"} } + zoneStrings{ + { + "Pacific/Honolulu", + "Hawaii Standard Time", + "HST", + "Hawaii Daylight Time", + "HDT", + "Honolulu", + "Hawaii Time", + "HT", + } + { + "America/Anchorage", + "Alaska Standard Time", + "AKST", + "Alaska Daylight Time", + "AKDT", + "Anchorage", + "Alaska Time", + "AKT", + } + { + "America/Los_Angeles", + "Pacific Standard Time", + "PST", + "Pacific Daylight Time", + "PDT", + "Los Angeles", + "Pacific Time", + "PT", + } + { + "America/Phoenix", + "Mountain Standard Time", + "MST", + "Mountain Daylight Time", + "MDT", + "Phoenix", + "Mountain Time", + "MT", + } + { + "America/Denver", + "Mountain Standard Time", + "MST", + "Mountain Daylight Time", + "MDT", + "Denver", + "Mountain Time", + "MT", + } + } + } //eof diff --git a/Build/source/libs/icu-xetex/test/testdata/testaliases.txt b/Build/source/libs/icu-xetex/test/testdata/testaliases.txt index 9e0ef764c19..1ae48be88cf 100644 --- a/Build/source/libs/icu-xetex/test/testdata/testaliases.txt +++ b/Build/source/libs/icu-xetex/test/testdata/testaliases.txt @@ -1,6 +1,6 @@ //******************************************************************************* //* -//* Copyright (C) 2002-2005, International Business Machines +//* Copyright (C) 2002-2006, International Business Machines //* Corporation and others. All Rights Reserved. //* //******************************************************************************* @@ -9,7 +9,7 @@ // This is a test resource to check whether the aliasing mechanism works // as advertised -testaliases +testaliases:table(nofallback) { // This should produce an error - circular alias aaa:alias { "testaliases/aab" } // Test circular dependency protection @@ -28,7 +28,7 @@ testaliases LocaleScript:alias { "/ICUDATA/ja/LocaleScript" } // aliasing using position - BreakDictionaryData:alias { "/ICUDATA/th" } // Referencing corresponding resource in another bundle + boundaries:alias { "/ICUDATA-brkitr/ja" } // Referencing corresponding resource in another bundle // aliasing arrays zoneTests { @@ -45,18 +45,18 @@ testaliases // WARNING: this test assumes that on all platforms digits sort normally // if not, the test may fail testGetStringByKeyAliasing { - KeyAlias0PST:alias { "/ICUDATA/en/zoneStrings/15/0" } //"America/Los_Angeles", - KeyAlias1PacificStandardTime:alias { "/ICUDATA/en/zoneStrings/15/1" } //"Pacific Standard Time", - KeyAlias2PDT:alias { "/ICUDATA/en/zoneStrings/15/4" } //"PDT", - KeyAlias3LosAngeles:alias { "/ICUDATA/en/zoneStrings/15/5" } //"Los Angeles", + KeyAlias0PST:alias { "te/zoneStrings/2/0" } //"America/Los_Angeles", + KeyAlias1PacificStandardTime:alias { "te/zoneStrings/2/1" } //"Pacific Standard Time", + KeyAlias2PDT:alias { "te/zoneStrings/2/4" } //"PDT", + KeyAlias3LosAngeles:alias { "te/zoneStrings/2/5" } //"Los Angeles", } testGetStringByIndexAliasing { - :alias { "/ICUDATA/en/zoneStrings/15/0" } //"America/Los_Angeles", - :alias { "/ICUDATA/en/zoneStrings/15/1" } //"Pacific Standard Time", - :alias { "/ICUDATA/en/zoneStrings/15/4" } //"PDT", - :alias { "/ICUDATA/en/zoneStrings/15/5" } //"Los Angeles", + :alias { "te/zoneStrings/2/0" } //"America/Los_Angeles", + :alias { "te/zoneStrings/2/1" } //"Pacific Standard Time", + :alias { "te/zoneStrings/2/4" } //"PDT", + :alias { "te/zoneStrings/2/5" } //"Los Angeles", } - + testAliasToTree:alias{"/ICUDATA-coll/en/collations"} } diff --git a/Build/source/libs/icu-xetex/test/testdata/testdata.mak b/Build/source/libs/icu-xetex/test/testdata/testdata.mak index 1e53ede98c6..a50b183e257 100644 --- a/Build/source/libs/icu-xetex/test/testdata/testdata.mak +++ b/Build/source/libs/icu-xetex/test/testdata/testdata.mak @@ -1,5 +1,5 @@ #********************************************************************** -#* Copyright (C) 1999-2005, International Business Machines Corporation +#* Copyright (C) 1999-2006, International Business Machines Corporation #* and others. All Rights Reserved. #********************************************************************** # @@ -8,7 +8,7 @@ .SUFFIXES : .res .txt TESTPKG=testdata -TESTDT=$(TESTPKG)_ +TESTDT=$(TESTPKG) ALL : "$(TESTDATAOUT)\testdata.dat" @@ -23,43 +23,43 @@ ALL : "$(TESTDATAOUT)\testdata.dat" # icu26e_testtypes.res is the same, but icuswapped to big-endian EBCDIC # markus 2003nov21 -"$(TESTDATAOUT)\testdata.dat" : "$(TESTDATABLD)\casing.res" "$(TESTDATABLD)\conversion.res" "$(TESTDATABLD)\icuio.res" "$(TESTDATABLD)\mc.res" "$(TESTDATABLD)\structLocale.res" "$(TESTDATABLD)\root.res" "$(TESTDATABLD)\sh.res" "$(TESTDATABLD)\sh_YU.res" "$(TESTDATABLD)\te.res" "$(TESTDATABLD)\te_IN.res" "$(TESTDATABLD)\te_IN_REVISED.res" "$(TESTDATABLD)\testaliases.res" "$(TESTDATABLD)\testtypes.res" "$(TESTDATABLD)\testempty.res" "$(TESTDATABLD)\$(TESTDT)iscii.res" "$(TESTDATABLD)\$(TESTDT)idna_rules.res" "$(TESTDATABLD)\DataDrivenCollationTest.res" "$(TESTDATABLD)\$(TESTDT)test.icu" "$(TESTDATABLD)\$(TESTDT)testtable32.res" "$(TESTDATABLD)\$(TESTDT)test1.cnv" "$(TESTDATABLD)\$(TESTDT)test3.cnv" "$(TESTDATABLD)\$(TESTDT)test4.cnv" "$(TESTDATABLD)\$(TESTDT)test4x.cnv" "$(TESTDATABLD)\$(TESTDT)ibm9027.cnv" "$(TESTDATABLD)\$(TESTDT)nfscsi.spp" "$(TESTDATABLD)\$(TESTDT)nfscss.spp" "$(TESTDATABLD)\$(TESTDT)nfscis.spp" "$(TESTDATABLD)\$(TESTDT)nfsmxs.spp" "$(TESTDATABLD)\$(TESTDT)nfsmxp.spp" +"$(TESTDATAOUT)\testdata.dat" : "$(TESTDATABLD)\casing.res" "$(TESTDATABLD)\conversion.res" "$(TESTDATABLD)\icuio.res" "$(TESTDATABLD)\mc.res" "$(TESTDATABLD)\structLocale.res" "$(TESTDATABLD)\root.res" "$(TESTDATABLD)\sh.res" "$(TESTDATABLD)\sh_YU.res" "$(TESTDATABLD)\te.res" "$(TESTDATABLD)\te_IN.res" "$(TESTDATABLD)\te_IN_REVISED.res" "$(TESTDATABLD)\testaliases.res" "$(TESTDATABLD)\testtypes.res" "$(TESTDATABLD)\testempty.res" "$(TESTDATABLD)\iscii.res" "$(TESTDATABLD)\idna_rules.res" "$(TESTDATABLD)\DataDrivenCollationTest.res" "$(TESTDATABLD)\test.icu" "$(TESTDATABLD)\testtable32.res" "$(TESTDATABLD)\test1.cnv" "$(TESTDATABLD)\test3.cnv" "$(TESTDATABLD)\test4.cnv" "$(TESTDATABLD)\test4x.cnv" "$(TESTDATABLD)\ibm9027.cnv" "$(TESTDATABLD)\nfscsi.spp" "$(TESTDATABLD)\nfscss.spp" "$(TESTDATABLD)\nfscis.spp" "$(TESTDATABLD)\nfsmxs.spp" "$(TESTDATABLD)\nfsmxp.spp" @echo Building test data - @copy "$(TESTDATABLD)\$(TESTDT)te.res" "$(TESTDATAOUT)\$(TESTDT)nam.typ" - @copy "$(TESTDATA)\$(TESTDT)icu26_testtypes.res" "$(TESTDATABLD)" - @copy "$(TESTDATA)\$(TESTDT)icu26e_testtypes.res" "$(TESTDATABLD)" - @"$(ICUP)\bin\pkgdata" -f -v -m common -c -p"$(TESTPKG)" -d "$(TESTDATAOUT)" -T "$(TESTDATABLD)" -s "$(TESTDATABLD)" << -$(TESTDT)casing.res -$(TESTDT)conversion.res -$(TESTDT)mc.res -$(TESTDT)root.res -$(TESTDT)testtable32.res -$(TESTDT)sh.res -$(TESTDT)sh_YU.res -$(TESTDT)te.res -$(TESTDT)te_IN.res -$(TESTDT)te_IN_REVISED.res -$(TESTDT)testtypes.res -$(TESTDT)icu26_testtypes.res -$(TESTDT)icu26e_testtypes.res -$(TESTDT)testempty.res -$(TESTDT)testaliases.res -$(TESTDT)structLocale.res -$(TESTDT)icuio.res -$(TESTDT)iscii.res -$(TESTDT)DataDrivenCollationTest.res -$(TESTDT)test.icu -$(TESTDT)test1.cnv -$(TESTDT)test3.cnv -$(TESTDT)test4.cnv -$(TESTDT)test4x.cnv -$(TESTDT)ibm9027.cnv -$(TESTDT)idna_rules.res -$(TESTDT)nfscsi.spp -$(TESTDT)nfscss.spp -$(TESTDT)nfscis.spp -$(TESTDT)nfsmxs.spp -$(TESTDT)nfsmxp.spp + @copy "$(TESTDATABLD)\te.res" "$(TESTDATAOUT)\$(TESTDT)\nam.typ" + @copy "$(TESTDATA)\icu26_testtypes.res" "$(TESTDATABLD)" + @copy "$(TESTDATA)\icu26e_testtypes.res" "$(TESTDATABLD)" + "$(ICUP)\bin\pkgdata" -f -v -m common -c -p"$(TESTPKG)" -d "$(TESTDATAOUT)" -T "$(TESTDATABLD)" -s "$(TESTDATABLD)" << +casing.res +conversion.res +mc.res +root.res +testtable32.res +sh.res +sh_YU.res +te.res +te_IN.res +te_IN_REVISED.res +testtypes.res +icu26_testtypes.res +icu26e_testtypes.res +testempty.res +testaliases.res +structLocale.res +icuio.res +iscii.res +DataDrivenCollationTest.res +test.icu +test1.cnv +test3.cnv +test4.cnv +test4x.cnv +ibm9027.cnv +idna_rules.res +nfscsi.spp +nfscss.spp +nfscis.spp +nfsmxs.spp +nfsmxp.spp << @@ -68,72 +68,72 @@ $(TESTDT)nfsmxp.spp # The -q option is there on purpose, so we don't see it normally. {$(TESTDATA)}.txt.res:: @echo Making Test Resource Bundle files $< - @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -t -p"$(TESTPKG)" -q -s"$(TESTDATA)" -d"$(TESTDATABLD)" $< + @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -q -s"$(TESTDATA)" -d"$(TESTDATABLD)" $< -"$(TESTDATABLD)\$(TESTDT)iscii.res": "$(TESTDATA)\iscii.bin" +"$(TESTDATABLD)\iscii.res": "$(TESTDATA)\iscii.bin" @echo Making Test Resource Bundle file with encoding ISCII,version=0 - @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -p"$(TESTPKG)" -q -s"$(TESTDATA)" -eISCII,version=0 -d"$(TESTDATABLD)" iscii.bin + @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -s"$(TESTDATA)" -eISCII,version=0 -d"$(TESTDATABLD)" iscii.bin -"$(TESTDATABLD)\$(TESTDT)idna_rules.res": "$(TESTDATA)\idna_rules.txt" +"$(TESTDATABLD)\idna_rules.res": "$(TESTDATA)\idna_rules.txt" @echo Making Test Resource Bundle file for IDNA reference implementation - @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -p"$(TESTPKG)" -q -s"$(TESTDATA)" -d"$(TESTDATABLD)" idna_rules.txt + @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -s"$(TESTDATA)" -d"$(TESTDATABLD)" idna_rules.txt -"$(TESTDATABLD)\$(TESTDT)test.icu" : {"$(ICUTOOLS)\gentest\$(CFG)"}gentest.exe +"$(TESTDATABLD)\test.icu" : {"$(ICUTOOLS)\gentest\$(CFG)"}gentest.exe "$(ICUTOOLS)\gentest\$(CFG)\gentest" -d"$(TESTDATABLD)" # testtable32 resource file "$(TESTDATABLD)\testtable32.txt" : {"$(ICUTOOLS)\gentest\$(CFG)"}gentest.exe "$(ICUTOOLS)\gentest\$(CFG)\gentest" -r -d"$(TESTDATABLD)" -"$(TESTDATABLD)\$(TESTDT)testtable32.res": "$(TESTDATABLD)\testtable32.txt" +"$(TESTDATABLD)\testtable32.res": "$(TESTDATABLD)\testtable32.txt" @echo Making Test Resource Bundle file for IDNA reference implementation - @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -p"$(TESTPKG)" -q -s"$(TESTDATABLD)" -d"$(TESTDATABLD)" testtable32.txt + @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -s"$(TESTDATABLD)" -d"$(TESTDATABLD)" testtable32.txt # Targets for nfscsi.spp -"$(TESTDATABLD)\$(TESTDT)nfscsi.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cs_prep_ci.txt" +"$(TESTDATABLD)\nfscsi.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cs_prep_ci.txt" @echo Building $@ - @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscsi -p "$(TESTPKG)" -u 3.2.0 nfs4_cs_prep_ci.txt + @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscsi -u 3.2.0 nfs4_cs_prep_ci.txt # Targets for nfscss.spp -"$(TESTDATABLD)\$(TESTDT)nfscss.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cs_prep_cs.txt" +"$(TESTDATABLD)\nfscss.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cs_prep_cs.txt" @echo Building $@ - @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscss -p "$(TESTPKG)" -u 3.2.0 nfs4_cs_prep_cs.txt + @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscss -u 3.2.0 nfs4_cs_prep_cs.txt # Targets for nfscis.spp -"$(TESTDATABLD)\$(TESTDT)nfscis.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cis_prep.txt" +"$(TESTDATABLD)\nfscis.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_cis_prep.txt" @echo Building $@ - @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscis -p "$(TESTPKG)" -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_cis_prep.txt + @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfscis -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_cis_prep.txt # Targets for nfsmxs.spp -"$(TESTDATABLD)\$(TESTDT)nfsmxs.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_mixed_prep_s.txt" +"$(TESTDATABLD)\nfsmxs.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_mixed_prep_s.txt" @echo Building $@ - @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfsmxs -p "$(TESTPKG)" -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_mixed_prep_s.txt + @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfsmxs -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_mixed_prep_s.txt # Targets for nfsmxp.spp -"$(TESTDATABLD)\$(TESTDT)nfsmxp.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_mixed_prep_p.txt" +"$(TESTDATABLD)\nfsmxp.spp" : {"$(ICUTOOLS)\gensprep\$(CFG)"}gensprep.exe "$(TESTDATA)\nfs4_mixed_prep_p.txt" @echo Building $@ - @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfsmxp -p "$(TESTPKG)" -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_mixed_prep_p.txt + @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(TESTDATA)" -d "$(TESTDATABLD)\\" -b nfsmxp -u 3.2.0 -k -n "$(ICUTOOLS)\..\data\unidata" nfs4_mixed_prep_p.txt # Targets for test converter data -"$(TESTDATABLD)\$(TESTDT)test1.cnv": "$(TESTDATA)\test1.ucm" +"$(TESTDATABLD)\test1.cnv": "$(TESTDATA)\test1.ucm" @echo Building $@ - @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" -p $(TESTPKG) $** + @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $** -"$(TESTDATABLD)\$(TESTDT)test3.cnv": "$(TESTDATA)\test3.ucm" +"$(TESTDATABLD)\test3.cnv": "$(TESTDATA)\test3.ucm" @echo Building $@ - @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" -p $(TESTPKG) $** + @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $** -"$(TESTDATABLD)\$(TESTDT)test4.cnv": "$(TESTDATA)\test4.ucm" +"$(TESTDATABLD)\test4.cnv": "$(TESTDATA)\test4.ucm" @echo Building $@ - @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" -p $(TESTPKG) $** + @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $** -"$(TESTDATABLD)\$(TESTDT)test4x.cnv": "$(TESTDATA)\test4x.ucm" +"$(TESTDATABLD)\test4x.cnv": "$(TESTDATA)\test4x.ucm" @echo Building $@ - @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" -p $(TESTPKG) $** + @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $** -"$(TESTDATABLD)\$(TESTDT)ibm9027.cnv": "$(TESTDATA)\ibm9027.ucm" +"$(TESTDATABLD)\ibm9027.cnv": "$(TESTDATA)\ibm9027.ucm" @echo Building $@ - @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" -p $(TESTPKG) $** + @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -d"$(TESTDATABLD)" $** diff --git a/Build/source/libs/icu-xetex/test/testmap/Makefile.in b/Build/source/libs/icu-xetex/test/testmap/Makefile.in index cd7cc8b15ea..ad2038f9d0a 100644 --- a/Build/source/libs/icu-xetex/test/testmap/Makefile.in +++ b/Build/source/libs/icu-xetex/test/testmap/Makefile.in @@ -1,5 +1,5 @@ ## Makefile.in for ICU - test/testmap -## Copyright (c) 2003, International Business Machines Corporation and +## Copyright (c) 2003-2006, International Business Machines Corporation and ## others. All Rights Reserved. ## Source directory information @@ -26,13 +26,6 @@ CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M) -# Data packaging options are set at configure time with --with-data-packaging. -CPPFLAGS += @DATA_PACKAGING_CPPFLAGS@ - -#ifeq ($(PKGDATA_MODE),dll) -#CPPFLAGS += -DUDATA_MAP_DLL -#LIBICUDATA= -L$(top_srcdir)/../data -licudata - OBJECTS = testmap.o DEPS = $(OBJECTS:.o=.d) diff --git a/Build/source/libs/icu-xetex/test/thaitest/space.txt b/Build/source/libs/icu-xetex/test/thaitest/space.txt index 65d89c32484..f89194260ed 100644 --- a/Build/source/libs/icu-xetex/test/thaitest/space.txt +++ b/Build/source/libs/icu-xetex/test/thaitest/space.txt @@ -1,5 +1,5 @@ -บท ที่ ๑ พายุ ไซโคลน -โดโรธี à¸à¸²à¸¨à¸±à¸¢ à¸à¸¢à¸¹à¹ˆ ท่าม à¸à¸¥à¸²à¸‡ ทุ่ง ใหà¸à¹ˆ ใน à¹à¸„นซัส à¸à¸±à¸š ลุง เฮนรี ชาว ไร่ à¹à¸¥à¸° ป้า เà¸à¹‡à¸¡ ภรรยา ชาวไร่ +บท ที่๑พายุ ไซโคลน +โด โรธี à¸à¸²à¸¨à¸±à¸¢ à¸à¸¢à¸¹à¹ˆ ท่ามà¸à¸¥à¸²à¸‡ ทุ่งใหà¸à¹ˆ ใน à¹à¸„นซัส à¸à¸±à¸š ลุง เฮ นรี ชาวไร่ à¹à¸¥à¸° ป้า เà¸à¹‡à¸¡ ภรรยา ชาวไร่ บ้าน ขà¸à¸‡ พวภเขา หลัง เล็ภเพราะ ไม้ สร้าง บ้าน ต้à¸à¸‡ ขน มา ด้วย เà¸à¸§à¸µà¸¢à¸™ เป็น @@ -19,52 +19,52 @@ à¹à¸¥à¹‰à¸§ à¸à¹‡ มี เตียง นà¸à¸™ -ลุง เฮนรี à¸à¸±à¸š ป้า เà¸à¹‡à¸¡ มี เตียง นà¸à¸™ ใหà¸à¹ˆ à¸à¸¢à¸¹à¹ˆ ที่ มุม หนึ่ง +ลุง เฮ นรี à¸à¸±à¸š ป้า เà¸à¹‡à¸¡ มี เตียง นà¸à¸™ ใหà¸à¹ˆ à¸à¸¢à¸¹à¹ˆ ที่ มุม หนึ่ง -ส่วน โดโรธี มี เตียง เล็ภà¸à¸µà¸ ที่ มุม หนึ่ง +ส่วน โด โร ธีมี เตียง เล็ภà¸à¸µà¸ ที่ มุม หนึ่ง -ไม่ มี ห้à¸à¸‡ ใต้ เพดาน เลย ห้à¸à¸‡ ใต้ถุน à¸à¹‡ ไม่ มี +ไม่มี ห้à¸à¸‡ ใต้ เพดาน เลย ห้à¸à¸‡ ใต้ถุน à¸à¹‡ ไม่มี -เว้น à¹à¸•à¹ˆ มี โพรง เล็à¸à¹† +เว้น à¹à¸•à¹ˆ มี โพ รง เล็à¸à¹† ที่ ขุด ไป ใต้ พื้น เรียภว่า -" โพรง ไซโคลน " +"โพรง ไซโคลน" -เป็น ที่ ครà¸à¸šà¸„รัว นี้ จะ มุด เข้า ไป เมื่ภเà¸à¸´à¸” ลม มหาภัย +เป็น ที่ ครà¸à¸šà¸„รัว นี้ จะ มุด เข้าไป เมื่ภเà¸à¸´à¸” ลม มหา ภัย -ซึ่ง à¸à¸£à¸°à¹‚ชภà¹à¸£à¸‡ จน บด ขยี้ สิ่ง à¸à¹ˆà¸ สร้าง ใด ๆ +ซึ่ง à¸à¸£à¸°à¹‚ชภà¹à¸£à¸‡ จน บดขยี้ สิ่ง à¸à¹ˆà¸ สร้าง ใดๆ -ที่ ขวาง ทาง มัน ได้ ตรง à¸à¸¥à¸²à¸‡ พื้น มี à¸à¸² เปิด เข้า ไป +ที่ ขวาง ทาง มัน ได้ ตรง à¸à¸¥à¸²à¸‡ พื้น มี à¸à¸² เปิด เข้าไป -จาภนั้น มี บันได ลง ไป ถึง โพรง มืด เล็ภๆ +จาภนั้น มี บันได ลง ไป ถึง โพรง มืด เล็à¸à¹† -เมื่ภโดโรธี ยืน ที่ ปาภประตู à¹à¸¥à¸° มà¸à¸‡ ไป รà¸à¸š ๆ +เมื่ภโด โรธี ยืน ที่ ปาภประตู à¹à¸¥à¸° มà¸à¸‡ ไป รà¸à¸šà¹† -เธภไม่ เห็น à¸à¸°à¹„ร นà¸à¸ จาภท้à¸à¸‡ ทุ่ง à¸à¸§à¹‰à¸²à¸‡ สี เทา หม่น ทั่ว ทุภด้าน +เธภไม่ เห็น à¸à¸°à¹„ร นà¸à¸à¸ˆà¸²à¸ ท้à¸à¸‡ ทุ่ง à¸à¸§à¹‰à¸²à¸‡ สี เทา หม่น ทั่ว ทุภด้าน -ไม่ มี à¹à¸¡à¹‰ ต้นไม้ สัภต้น หรืภบ้าน สัภหลัง ที่ โผล่ พ้น ภูมิ ประเทศ à¸à¸±à¸™ ราบ เรียบ +ไม่มี à¹à¸¡à¹‰ ต้นไม้ สัภต้น หรืภบ้าน สัภหลัง ที่ โผล่ พ้น ภูมิประเทศ à¸à¸±à¸™ ราบ เรียบ à¹à¸œà¹ˆ ไป ไà¸à¸¥ จน จด ขà¸à¸š ฟ้า ทั่ว ทุภทิศ -ดวง ตะวัน เผา ผืน ดิน ที่ ไถ à¹à¸¥à¹‰à¸§ จน à¸à¸¥à¸²à¸¢ เป็น à¹à¸œà¹ˆà¸™ มหึมา สี ดำ +ดวงตะวัน เผา ผืน ดิน ที่ ไถ à¹à¸¥à¹‰à¸§ จน à¸à¸¥à¸²à¸¢ เป็น à¹à¸œà¹ˆà¸™ มหึมา สี ดำ -มี รà¸à¸¢ à¹à¸•à¸à¸£à¸°à¹à¸«à¸‡ à¸à¸¢à¸¹à¹ˆ ตลà¸à¸” +มี รà¸à¸¢ à¹à¸•à¸ ระà¹à¸«à¸‡ à¸à¸¢à¸¹à¹ˆ ตลà¸à¸” à¹à¸¡à¹‰à¹à¸•à¹ˆ หà¸à¹‰à¸² à¸à¹‡ ไม่ เขียว -เพราะ ดวง ตะวัน เผา ยà¸à¸” ใบ ยาว เสีย จน เป็น สี เทา หม่น มà¸à¸‡ เห็น à¸à¸¢à¸¹à¹ˆ ทั่ว ไป +เพราะ ดวงตะวัน เผา ยà¸à¸” ใบ ยาว เสีย จน เป็น สี เทา หม่น มà¸à¸‡ เห็น à¸à¸¢à¸¹à¹ˆ ทั่วไป -ครั้ง หนึ่ง เคย ทา สี บ้านเà¸à¸²à¹„ว้ +ครั้ง หนึ่ง เคย ทาสี บ้าน เà¸à¸² ไว้ -à¹à¸•à¹ˆ à¸à¹‡ ถูภดวง ตะวัน เผา เสีย จน สี พà¸à¸‡ +à¹à¸•à¹ˆ à¸à¹‡ ถูภดวงตะวัน เผา เสีย จน สี พà¸à¸‡ -à¹à¸¥à¹‰à¸§ à¸à¸™ à¸à¹‡ ชะมัน หลุด ไป จน หมด +à¹à¸¥à¹‰à¸§ à¸à¸™ à¸à¹‡ ชะ มัน หลุด ไป จน หมด -à¹à¸¥à¸° ตà¸à¸™ นี้ บ้าน จึง ดู หม่นหมà¸à¸‡ เป็น สี เทา เหมืà¸à¸™ สิ่ง à¸à¸·à¹ˆà¸™ ๆ +à¹à¸¥à¸° ตà¸à¸™ นี้ บ้าน จึง ดู หม่นหมà¸à¸‡ เป็น สี เทา เหมืà¸à¸™ สิ่ง à¸à¸·à¹ˆà¸™à¹† ด้วย @@ -75,13 +75,13 @@ เป็น ภรรยา ที่ งดงาม -à¹à¸¥à¹‰à¸§ à¹à¸”ด à¹à¸¥à¸° ลม à¸à¹‡ ได้ เปลี่ยน เธภไป +à¹à¸¥à¹‰à¸§ à¹à¸”ด à¹à¸¥à¸° ลม à¸à¹‡à¹„ด้ เปลี่ยน เธภไป เà¸à¸² ประà¸à¸²à¸¢ ไป จาภดวงตา เธภปล่à¸à¸¢ ไว้ à¹à¸•à¹ˆ ความ สุขุม à¸à¸¢à¹ˆà¸²à¸‡ หม่นหมà¸à¸‡ -เà¸à¸² สี à¹à¸”ง จาภà¹à¸à¹‰à¸¡ à¹à¸¥à¸° ริมà¸à¸µà¸›à¸²à¸ เธภไป +เà¸à¸² สี à¹à¸”ง จาภà¹à¸à¹‰à¸¡ à¹à¸¥à¸° ริม à¸à¸µà¸›à¸²à¸ เธภไป -à¸à¸¥à¸²à¸¢ เป็น สี หม่น ๆ +à¸à¸¥à¸²à¸¢ เป็น สี หม่นๆ เหมืà¸à¸™ à¸à¸±à¸™ @@ -89,62 +89,62 @@ à¹à¸¥à¸° เดี๋ยว นี้ ไม่ เคย ยิ้ม เลย -เมื่ภโดโรธี ซึ่ง เป็น เด็ภà¸à¸³à¸žà¸£à¹‰à¸² มา à¸à¸¢à¸¹à¹ˆ à¸à¸±à¸š เธภตà¸à¸™ à¹à¸£à¸ +เมื่ภโด โรธี ซึ่ง เป็น เด็ภà¸à¸³à¸žà¸£à¹‰à¸² มา à¸à¸¢à¸¹à¹ˆ à¸à¸±à¸š เธภตà¸à¸™ à¹à¸£à¸ ป้า เà¸à¹‡à¸¡ ตื่น เต้น à¸à¸±à¸š เสียง หัวเราะ ขà¸à¸‡ เด็ภน้à¸à¸¢ มาภ-เธภจะส่ง เสียง ร้à¸à¸‡ à¹à¸¥à¹‰à¸§ เà¸à¸² มืภทาบ à¸à¸ ทุภครั้ง ที่ เสียง à¸à¸±à¸™ ร่าเริง ขà¸à¸‡ โดโรธี เข้า หู เธภ+เธภจะ ส่ง เสียง ร้à¸à¸‡ à¹à¸¥à¹‰à¸§ เà¸à¸² มืภทาบ à¸à¸ ทุภครั้ง ที่ เสียง à¸à¸±à¸™ ร่าเริง ขà¸à¸‡ โด โรธี เข้าหู เธภ-à¹à¸¥à¸° เธภเà¸à¹‰à¸² มà¸à¸‡ เด็ภหà¸à¸´à¸‡ น้à¸à¸¢ ๆ +à¹à¸¥à¸° เธภเà¸à¹‰à¸² มà¸à¸‡ เด็ภหà¸à¸´à¸‡ น้à¸à¸¢à¹† ด้วย ความ ประหลาด ใจ ด้วย ยัง หา à¸à¸°à¹„ร มา เป็น เรื่à¸à¸‡ หัวเราะ ได้ -ลุง เฮนรี ไม่ เคย หัวเราะ +ลุง เฮ นรี ไม่ เคย หัวเราะ ลุง ทำงาน หนัภจาภเช้า ยัน ค่ำ à¹à¸¥à¸° ไม่ เคย รู้จัภว่า ความ ร่าเริง คืภà¸à¸°à¹„ร -ลุง ดู หม่นหมà¸à¸‡ ไป หมด ตั้ง à¹à¸•à¹ˆ เครา ยาว จน จด รà¸à¸‡à¹€à¸—้า บูต à¸à¸±à¸™ หยาบ +ลุง ดู หม่นหมà¸à¸‡ ไป หมด ตั้งà¹à¸•à¹ˆ เครา ยาว จน จด รà¸à¸‡à¹€à¸—้า บูต à¸à¸±à¸™ หยาบ -à¹à¸¥à¹‰à¸§ ลุง à¸à¹‡ ดู เคร่งขรึม น่า เà¸à¸£à¸‡à¸‚าม ไม่ ค่à¸à¸¢ จะ พูด +à¹à¸¥à¹‰à¸§ ลุง à¸à¹‡ ดู เคร่งขรึม น่า เà¸à¸£à¸‡ ขาม ไม่ ค่à¸à¸¢ จะ พูด -มี โตโต้ ที่ ทำ ให้ โดโรธี หัวเราะ ได้ +มี โต โต้ ที่ ทำให้ โด โรธี หัวเราะ ได้ -à¹à¸¥à¸° ช่วย เธภให้ พ้น จาภà¸à¸²à¸£ à¸à¸¥à¸²à¸¢ เป็น สี เทา หม่นเหมืà¸à¸™ à¸à¸±à¸š สิ่ง รà¸à¸š ตัว à¸à¸·à¹ˆà¸™ ๆ +à¹à¸¥à¸° ช่วย เธภให้ พ้น จาภà¸à¸²à¸£à¸ ลาย เป็น สี เทา หม่น เหมืà¸à¸™ à¸à¸±à¸š สิ่ง รà¸à¸š ตัว à¸à¸·à¹ˆà¸™à¹† -โตโต้ สี ไม่ เทา หม่น +โต โต้ สี ไม่ เทา หม่น -à¹à¸•à¹ˆ มัน เป็น หมา สี ดำ ตัว น้à¸à¸¢ ๆ +à¹à¸•à¹ˆ มัน เป็น หมา สี ดำ ตัว น้à¸à¸¢à¹† -ขน ยาว ปุย ราว à¸à¸±à¸š ไหม +ขน ยาว ปุย ราวà¸à¸±à¸š ไหม มี ตา ดำ เล็ภเป็น ประà¸à¸²à¸¢ รื่นเริง à¸à¸¢à¸¹à¹ˆ สà¸à¸‡ ข้าง จมูภเล็ภà¸à¸±à¸™ น่า ขัน ขà¸à¸‡ มัน -โตโต้ เล่น ทั้ง วัน +โต โต้ เล่น ทั้ง วัน -à¹à¸¥à¸° โดโรธี à¸à¹‡ เล่น à¸à¸±à¸š มัน +à¹à¸¥à¸° โด โรธี à¸à¹‡ เล่น à¸à¸±à¸š มัน à¹à¸¥à¸° รัภมัน เหลืภเà¸à¸´à¸™ -à¸à¸¢à¹ˆà¸²à¸‡à¹„ร à¸à¹‡ ตาม +à¸à¸¢à¹ˆà¸²à¸‡à¹„ร à¸à¹‡à¸•à¸²à¸¡ วัน นี้ ทั้ง คู่ ไม่ ได้ เล่น -ลุง เฮนรี นั่ง à¸à¸¢à¸¹à¹ˆ ที่ บันได ประตู à¹à¸¥à¸° เà¸à¹‰à¸² à¸à¸±à¸‡à¸§à¸¥ จ้à¸à¸‡ ดู ท้à¸à¸‡ ฟ้า สี เทา หม่น ผิด ปà¸à¸•à¸´ +ลุง เฮ นรี นั่ง à¸à¸¢à¸¹à¹ˆ ที่ บันได ประตู à¹à¸¥à¸° เà¸à¹‰à¸² à¸à¸±à¸‡à¸§à¸¥ จ้à¸à¸‡ ดู ท้à¸à¸‡à¸Ÿà¹‰à¸² สี เทา หม่น ผิด ปà¸à¸•à¸´ -โดโรธี ยืน ที่ ประตู +โด โรธี ยืน ที่ ประตู -à¸à¸à¸” โตโต้ ไว้ ใน à¸à¹‰à¸à¸¡ à¹à¸‚น +à¸à¸à¸” โต โต้ ไว้ ใน à¸à¹‰à¸à¸¡ à¹à¸‚น -à¹à¸¥à¸° à¸à¹‡ มà¸à¸‡ ดู ท้à¸à¸‡ ฟ้า à¸à¸¢à¸¹à¹ˆ เหมืà¸à¸™ à¸à¸±à¸™ +à¹à¸¥à¸° à¸à¹‡ มà¸à¸‡ ดู ท้à¸à¸‡à¸Ÿà¹‰à¸² à¸à¸¢à¸¹à¹ˆ เหมืà¸à¸™ à¸à¸±à¸™ -ป้า เà¸à¹‡à¸¡ à¸à¸³à¸¥à¸±à¸‡ ล้าง ชาม à¸à¸¢à¸¹à¹ˆ +ป้า เà¸à¹‡ มà¸à¸³ ลัง ล้าง ชาม à¸à¸¢à¸¹à¹ˆ @@ -152,25 +152,25 @@ มี เสียง ลม คราง à¹à¸œà¹ˆà¸§ เบา ได้ยิน มา -ลุง เฮนรี à¹à¸¥à¸° โดโรธี เห็น ต้น หà¸à¹‰à¸² สูง เà¸à¸™ เป็น คลื่น à¸à¹ˆà¸à¸™ ที่ พายุ จะ มา ถึง +ลุง เฮ นรี à¹à¸¥à¸° โด โรธี เห็น ต้น หà¸à¹‰à¸² สูง เà¸à¸™ เป็น คลื่น à¸à¹ˆà¸à¸™ ที่ พายุ จะ มา ถึง -à¹à¸¥à¹‰à¸§ à¸à¹‡ มี เสียง หวีดหวิว ชัดเจน มา จาภบรรยาà¸à¸²à¸¨ ทาง ใต้ +à¹à¸¥à¹‰à¸§ à¸à¹‡ มี เสียง หวีด หวิว ชัดเจน มา จาภบรรยาà¸à¸²à¸¨ ทาง ใต้ à¹à¸¥à¸° เมื่ภเหลืà¸à¸š ตา ไป ทาง ด้าน นั้น à¸à¹‡ เห็น คลื่น หà¸à¹‰à¸² มา ทาง ด้าน นั้น ด้วย -ลุง เฮนรี ผุด ลุภขึ้น ทัน ใด +ลุง เฮ นรี ผุด ลุภขึ้น ทันใด -" ลม ไซโคลน มา +"ลม ไซโคลน มา -เà¸à¹‡à¸¡ " +เà¸à¹‡à¸¡" ลุง ร้à¸à¸‡ บà¸à¸ ภรรยา -" ข้า จะ ไป ดู สัตว์ เลี้ยง หน่à¸à¸¢ " +"ข้า จะ ไป ดู สัตว์ เลี้ยง หน่à¸à¸¢" à¹à¸¥à¹‰à¸§ ลุง à¸à¹‡ วิ่ง ไป ยัง เพิง ที่ วัว à¹à¸¥à¸° ม้า à¸à¸²à¸¨à¸±à¸¢ à¸à¸¢à¸¹à¹ˆ @@ -184,31 +184,31 @@ -" เร็ว โดโรธี ! " +"เร็ว โด โรธี!" ป้า ตะโà¸à¸™ -" วิ่ง ไป ห้à¸à¸‡ ใต้ถุน " +"วิ่ง ไป ห้à¸à¸‡ ใต้ถุน" -โตโต้ ผลุน à¸à¸£à¸°à¹‚ดด ลง จาภà¸à¹‰à¸à¸¡à¹à¸‚น โดโรธี +โต โต้ ผลุน à¸à¸£à¸°à¹‚ดด ลง จาภà¸à¹‰à¸à¸¡ à¹à¸‚น โด โรธี -à¹à¸¥à¹‰à¸§ เข้า ไป ซ่à¸à¸™ à¸à¸¢à¸¹à¹ˆ ใต้ เตียง +à¹à¸¥à¹‰à¸§ เข้าไป ซ่à¸à¸™ à¸à¸¢à¸¹à¹ˆ ใต้ เตียง -เด็ภหà¸à¸´à¸‡ น้à¸à¸¢ เข้า ไป ดึง มัน à¸à¸à¸ มา +เด็ภหà¸à¸´à¸‡ น้à¸à¸¢ เข้าไป ดึง มัน à¸à¸à¸ มา -ป้า เà¸à¹‡à¸¡ à¸à¸£à¸°à¸Šà¸²à¸ à¸à¸² ที่ พื้น à¸à¸à¸ à¸à¸¢à¹ˆà¸²à¸‡ à¸à¸ สั่น ขวัภหาย +ป้า เà¸à¹‡ มภระ ชาภà¸à¸² ที่ พื้น à¸à¸à¸ à¸à¸¢à¹ˆà¸²à¸‡ à¸à¸ สั่น ขวัภหาย ปีน บันได ไม้ ลง ไป ใน โพรง เล็ภà¸à¸±à¸™ มืด ทึบ -โดโรธี จับ โตโต้ ได้ ใน ที่ สุด +โด โรธี จับ โต โต้ ได้ ใน ที่สุด à¹à¸¥à¸° วิ่ง ตาม ป้า เธภไป -เมื่ภเธภมา ได้ ครึ่ง ห้à¸à¸‡ à¸à¹‡ มี เสียง หวีดหวืภ+เมื่ภเธภมา ได้ ครึ่ง ห้à¸à¸‡ à¸à¹‡ มี เสียง หวีด หวืภส่วน บ้าน à¸à¹‡ สั่น à¸à¸¢à¹ˆà¸²à¸‡ à¹à¸£à¸‡ จน เธภหภคะมำ นั่ง จ้ำเบ้า à¸à¸¢à¸¹à¹ˆ à¸à¸±à¸š พื้น @@ -218,39 +218,39 @@ -บ้าน หมุน ไป หมุน มา สà¸à¸‡ สาม รà¸à¸š +บ้าน หมุน ไป หมุน มาส à¸à¸‡ สาม รà¸à¸š -à¹à¸¥à¹‰à¸§ à¸à¹‡ ลà¸à¸¢ ขึ้น สู่ à¸à¸²à¸à¸²à¸¨ à¸à¸¢à¹ˆà¸²à¸‡ ช้า ๆ +à¹à¸¥à¹‰à¸§ à¸à¹‡ ลà¸à¸¢ ขึ้น สู่ à¸à¸²à¸à¸²à¸¨ à¸à¸¢à¹ˆà¸²à¸‡ ช้าๆ -โดโรธี รู้สึภราว à¸à¸±à¸š ว่า เธภได้ ขึ้น ไป à¸à¸±à¸š ลูภบà¸à¸¥à¸¥à¸¹à¸™ +โด โร ธีรู้ สึภราวà¸à¸±à¸š ว่า เธภได้ ขึ้น ไป à¸à¸±à¸š ลูภบà¸à¸¥à¸¥à¸¹à¸™ -พายุ เหนืภà¸à¸±à¸š พายุ ใต้ มา พบ à¸à¸±à¸™ ตรง ที่ บ้าน พภดี +พายุ เหนืภà¸à¸±à¸š พายุ ใต้ มา พบ à¸à¸±à¸™ ตรง ที่ บ้าน พà¸à¸”ี -à¹à¸¥à¸° ทำ ให้ ตรง นั้น เป็น จุด ศูนย์ à¸à¸¥à¸²à¸‡ ขà¸à¸‡ พายุ ไซโคลน +à¹à¸¥à¸° ทำให้ ตรง นั้น เป็น จุดศูนย์à¸à¸¥à¸²à¸‡ ขà¸à¸‡ พายุ ไซโคลน ตาม ปà¸à¸•à¸´ ตรง à¸à¸¥à¸²à¸‡ พายุ ไซโคลน à¸à¸²à¸à¸²à¸¨ จะ นิ่ง à¹à¸•à¹ˆ ความ à¸à¸”ดัน à¸à¸¢à¹ˆà¸²à¸‡ หนัภขà¸à¸‡ ลม ทุภด้าน รà¸à¸š บ้าน -ทำ ให้ บ้าน ลà¸à¸¢ สูง ขึ้น ๆ +ทำให้ บ้าน ลà¸à¸¢ สูง ขึ้นๆ จน à¸à¸£à¸°à¸—ั่ง ขึ้น ไป à¸à¸¢à¸¹à¹ˆ สุด ยà¸à¸” ขà¸à¸‡ พายุ ไซโคลน à¹à¸¥à¸° จาภตรง นั้น à¸à¹‡ ถูภหà¸à¸š ไป หลาย ไมล์ -ง่าย ดาย ราว à¸à¸±à¸š หà¸à¸š ขน นภ+ง่ายดาย ราวà¸à¸±à¸š หà¸à¸š ขน นภมืด มาภà¹à¸¥à¹‰à¸§ -ลม ยัง ส่ง เสียง หวีดหวืภน่า à¸à¸¥à¸±à¸§ à¸à¸¢à¸¹à¹ˆ รà¸à¸š ตัว เธภ+ลม ยัง ส่ง เสียง หวีด หวืภน่า à¸à¸¥à¸±à¸§ à¸à¸¢à¸¹à¹ˆ รà¸à¸š ตัว เธภ-à¹à¸•à¹ˆ โดโรธี เห็น ว่า เธภสามารถ นั่ง ไป ได้ à¸à¸¢à¹ˆà¸² งง่าย ดาย นัภ+à¹à¸•à¹ˆ โด โรธี เห็น ว่า เธภสามารถ นั่ง ไป ได้ à¸à¸¢à¹ˆà¸²à¸‡ ง่ายดาย นัภ-ครั้ง หนึ่ง หลัง จาภที่ บ้าน สะดุด à¸à¸¢à¹ˆà¸²à¸‡ à¹à¸£à¸‡ à¹à¸¥à¸° หมุน ไป รà¸à¸š ๆ +ครั้ง หนึ่ง หลัง จาภที่ บ้าน สะดุด à¸à¸¢à¹ˆà¸²à¸‡ à¹à¸£à¸‡ à¹à¸¥à¸° หมุน ไป รà¸à¸šà¹† สà¸à¸‡ สาม ครั้ง ใน ตà¸à¸™ à¹à¸£à¸ @@ -258,17 +258,17 @@ -โตโต้ ไม่ ชà¸à¸š ใจ เลย +โต โต้ ไม่ ชà¸à¸šà¹ƒà¸ˆ เลย -มัน วิ่ง ไป วิ่ง มา รà¸à¸š ห้à¸à¸‡ +มัน วิ่ง ไป วิ่ง มาร à¸à¸š ห้à¸à¸‡ ทาง โน้น ที ทาง นี้ ที ส่ง เสียง เห่า ดัง à¸à¹‰à¸à¸‡ -à¹à¸•à¹ˆ โดโรธี นั่ง นิ่ง à¸à¸¢à¸¹à¹ˆ บน พื้น เà¸à¹‰à¸² คà¸à¸¢ ดู ว่า จะ เà¸à¸´à¸” à¸à¸°à¹„ร ขึ้น +à¹à¸•à¹ˆ โด โรธี นั่ง นิ่ง à¸à¸¢à¸¹à¹ˆ บน พื้น เà¸à¹‰à¸² คà¸à¸¢ ดู ว่า จะ เà¸à¸´à¸” à¸à¸°à¹„ร ขึ้น -ครั้ง หนึ่ง โตโต้ เข้า ไป ใà¸à¸¥à¹‰ à¸à¸² ที่ พื้น มาภไป +ครั้ง หนึ่ง โต โต้ เข้าไป ใà¸à¸¥à¹‰ à¸à¸² ที่ พื้น มาภไป เลย พลัด ตà¸à¸¥à¸‡ ไป @@ -276,9 +276,9 @@ à¹à¸•à¹ˆ ชั่ว ครู่ เธภà¸à¹‡ เห็น หู ขà¸à¸‡ มัน โผล่ ขึ้น มา จาภช่à¸à¸‡ นั้น -ทั้ง นี้ เพราะ à¹à¸£à¸‡ à¸à¸” à¸à¸¢à¹ˆà¸²à¸‡ หนัภขà¸à¸‡ à¸à¸²à¸à¸²à¸¨ ทำ ให้ โตโต้ ไม่ ตà¸à¸¥à¸‡ ไป ข้าง ล่าง +ทั้งนี้ เพราะ à¹à¸£à¸‡ à¸à¸” à¸à¸¢à¹ˆà¸²à¸‡ หนัภขà¸à¸‡ à¸à¸²à¸à¸²à¸¨ ทำให้ โต โต้ ไม่ ตà¸à¸¥à¸‡ ไป ข้าง ล่าง -โดโรธี คลาน ไป ที่ ช่à¸à¸‡ นั้น จับ หู โตโต้ ไว้ ได้ +โด โรธี คลาน ไป ที่ ช่à¸à¸‡ นั้น จับ หู โต โต้ ไว้ ได้ à¹à¸¥à¸° ลาภมัน มา ที่ ห้à¸à¸‡ à¸à¸µà¸ @@ -288,33 +288,33 @@ ชั่วโมง à¹à¸¥à¹‰à¸§ ชั่วโมง เล่า ผ่าน ไป -โดโรธี ค่à¸à¸¢ ๆ +โด โรธี ค่à¸à¸¢à¹† หาย à¸à¸¥à¸±à¸§ à¹à¸•à¹ˆ เธภรู้สึภเหงา เหลืภเà¸à¸´à¸™ -à¹à¸¥à¸° ลม à¸à¹‡ ส่ง เสียง หวีดหวืภดัง เสีย จน เธภà¹à¸—บ จะ หู หนวภ+à¹à¸¥à¸° ลม à¸à¹‡ ส่ง เสียง หวีด หวืภดัง เสีย จน เธภà¹à¸—บ จะ หู หนวภ-ที à¹à¸£à¸ เธภสงสัย ว่า คง จะ ถูภฉีภà¸à¸£à¸°à¸Šà¸²à¸ à¸à¸à¸ เป็น ชิ้น เล็ภชิ้น น้à¸à¸¢ เมื่ภบ้าน เà¸à¸™ ล้ม ลง à¸à¸µà¸ ครั้ง +ที à¹à¸£à¸ เธภสงสัย ว่า คงจะ ถูภฉีภà¸à¸£à¸°à¸Šà¸²à¸ à¸à¸à¸ เป็น ชิ้น เล็ภชิ้น น้à¸à¸¢ เมื่ภบ้าน เà¸à¸™ ล้ม ลง à¸à¸µà¸ ครั้ง -à¹à¸•à¹ˆ หลาย ชั่วโมง ผ่าน ไป à¸à¹‡ ไม่ มี à¸à¸°à¹„ร เà¸à¸´à¸” ขึ้น เธภเลย เลิภวิตภà¹à¸¥à¸° ตัดสิน ใจ คà¸à¸¢ ดู à¸à¸¢à¹ˆà¸²à¸‡ สงบ +à¹à¸•à¹ˆ หลาย ชั่วโมง ผ่าน ไป à¸à¹‡ ไม่มี à¸à¸°à¹„ร เà¸à¸´à¸” ขึ้น เธภเลย เลิภวิตภà¹à¸¥à¸° ตัดสิน ใจ คà¸à¸¢ ดู à¸à¸¢à¹ˆà¸²à¸‡ สงบ à¹à¸¥à¸° รภว่า à¸à¸™à¸²à¸„ต จะ เป็น à¸à¸¢à¹ˆà¸²à¸‡à¹„ร -ใน ที่ สุด เธภคลาน จาภพื้น ห้à¸à¸‡ ที่ โยภไป มา ขึ้น ไป บน เตียง +ใน ที่สุด เธภคลาน จาภพื้น ห้à¸à¸‡ ที่ โยภไป มา ขึ้น ไป บน เตียง à¹à¸¥à¹‰à¸§ à¸à¹‡ นà¸à¸™ ลง -โตโต้ ตาม ติด มา นà¸à¸™ ลง ใà¸à¸¥à¹‰ ๆ +โต โต้ ตาม ติด มา นà¸à¸™ ลง ใà¸à¸¥à¹‰à¹† เธภ-ไม่ ช้า โดโรธี à¸à¹‡ ปิด ตา ลง หลับ ผล็à¸à¸¢ ไป à¸à¸¢à¹ˆà¸²à¸‡ สนิท ทั้ง ๆ +ไม่ ช้า โด โรธี à¸à¹‡ ปิด ตา ลง หลับ ผล็à¸à¸¢ ไป à¸à¸¢à¹ˆà¸²à¸‡ สนิท ทั้งๆ -ที่ บ้าน โยภไป มา à¹à¸¥à¸° ลม à¸à¹‡ คราง หวีดหวืภ+ที่ บ้าน โยภไป มา à¹à¸¥à¸° ลม à¸à¹‡ คราง หวีด หวืภdiff --git a/Build/source/libs/icu-xetex/test/thaitest/thaitest.cpp b/Build/source/libs/icu-xetex/test/thaitest/thaitest.cpp index 910d9db2971..657fab433c0 100644 --- a/Build/source/libs/icu-xetex/test/thaitest/thaitest.cpp +++ b/Build/source/libs/icu-xetex/test/thaitest/thaitest.cpp @@ -1,7 +1,7 @@ /* ****************************************************************************** - * Copyright (C) 1998-2003, International Business Machines Corporation and * - * others. All Rights Reserved. * + * Copyright (C) 1998-2003, 2006, International Business Machines Corporation * + * and others. All Rights Reserved. * ****************************************************************************** */ @@ -15,6 +15,8 @@ #include "unicode/brkiter.h" #include "unicode/locid.h" #include "unicode/unistr.h" +#include "unicode/uniset.h" +#include "unicode/ustring.h" /* * This program takes a Unicode text file containing Thai text with @@ -68,6 +70,9 @@ private: // current space count int32_t fSpaceCount; + + // UnicodeSet of SA characters + UnicodeSet fComplexContext; // true when fBreakIter has returned DONE UBool fDone; @@ -387,6 +392,46 @@ const UChar *ThaiWordbreakTest::crunchSpaces(const UChar *spaces, int32_t count, } /* + * Generate a text file with spaces in it from a file without. + */ +int generateFile(const UChar *chars, int32_t length) { + Locale root(""); + UCharCharacterIterator *noSpaceIter = new UCharCharacterIterator(chars, length); + UErrorCode status = U_ZERO_ERROR; + + UnicodeSet complexContext(UNICODE_STRING_SIMPLE("[:LineBreak=SA:]"), status); + BreakIterator *breakIter = BreakIterator::createWordInstance(root, status); + breakIter->adoptText(noSpaceIter); + char outbuf[1024]; + int32_t strlength; + UChar bom = 0xFEFF; + + printf("%s", u_strToUTF8(outbuf, sizeof(outbuf), &strlength, &bom, 1, &status)); + int32_t prevbreak = 0; + while (U_SUCCESS(status)) { + int32_t nextbreak = breakIter->next(); + if (nextbreak == BreakIterator::DONE) { + break; + } + printf("%s", u_strToUTF8(outbuf, sizeof(outbuf), &strlength, &chars[prevbreak], + nextbreak-prevbreak, &status)); + if (nextbreak > 0 && complexContext.contains(chars[nextbreak-1]) + && complexContext.contains(chars[nextbreak])) { + printf(" "); + } + prevbreak = nextbreak; + } + + if (U_FAILURE(status)) { + fprintf(stderr, "generate failed: %s\n", u_errorName(status)); + return status; + } + else { + return 0; + } +} + +/* * The main routine. Read the command line arguments, read the text file, * remove the spaces, do the comparison and report the final results */ @@ -395,6 +440,12 @@ int main(int argc, char **argv) char *fileName = "space.txt"; int arg = 1; UBool verbose = FALSE; + UBool generate = FALSE; + + if (argc >= 2 && strcmp(argv[1], "-generate") == 0) { + generate = TRUE; + arg += 1; + } if (argc >= 2 && strcmp(argv[1], "-verbose") == 0) { verbose = TRUE; @@ -418,6 +469,10 @@ int main(int argc, char **argv) if (spaces == 0) { return 1; } + + if (generate) { + return generateFile(spaces, spaceCount); + } noSpaces = ThaiWordbreakTest::crunchSpaces(spaces, spaceCount, nonSpaceCount); @@ -443,9 +498,10 @@ SpaceBreakIterator::SpaceBreakIterator(const UChar *text, int32_t count) { UCharCharacterIterator *iter = new UCharCharacterIterator(text, count); UErrorCode status = U_ZERO_ERROR; - Locale us("us"); + fComplexContext.applyPattern(UNICODE_STRING_SIMPLE("[:LineBreak=SA:]"), status); + Locale root(""); - fBreakIter = BreakIterator::createWordInstance(us, status); + fBreakIter = BreakIterator::createWordInstance(root, status); fBreakIter->adoptText(iter); } @@ -471,12 +527,17 @@ int32_t SpaceBreakIterator::next() return BreakIterator::DONE; } - int32_t nextBreak = fBreakIter->next(); - - if (nextBreak == BreakIterator::DONE) { - fDone = TRUE; - return BreakIterator::DONE; + int32_t nextBreak; + do { + nextBreak = fBreakIter->next(); + + if (nextBreak == BreakIterator::DONE) { + fDone = TRUE; + return BreakIterator::DONE; + } } + while(nextBreak > 0 && fComplexContext.contains(fText[nextBreak-1]) + && fComplexContext.contains(fText[nextBreak])); int32_t result = nextBreak - fSpaceCount; diff --git a/Build/source/libs/icu-xetex/test/unalignedtest/readme b/Build/source/libs/icu-xetex/test/unalignedtest/readme deleted file mode 100644 index acf10a1cdf4..00000000000 --- a/Build/source/libs/icu-xetex/test/unalignedtest/readme +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2002-2003, International Business Machines Corporation and others. All Rights Reserved. -Unalignedtest -============= - -This is a test to find if ICU is 64 bit clean. This test runs cintltst and intltest through gdb and produces SIGBUS fault -whenever the kernel encounters a unaligned trap. - -Build and Usage -================== -To build this test: - -i) Build and test ICU - -ii) cd to <icu>/source and run the following command to build the Makefile -CONFIG_FILES=./test/unalignedtest/Makefile CONFIG_HEADERS= ./config.status - -iii) cd to <icu>/source/test/unalignedtest and run 'make' to build the executable - -iv) For testing cintltst run 'make check-cintltst' - -v) For testing intltest run 'make check-intltest' - -vi) To find out if any of the tools are performing unaligned traps: - a) cd to <icu>/source/data - b) run 'make clean' - c) run 'env LEAK_CHECKER="<icu>/source/test/unalignedtest/unalignedtest -b" make' - diff --git a/Build/source/libs/icu-xetex/test/unalignedtest/unaligned.c b/Build/source/libs/icu-xetex/test/unalignedtest/unaligned.c deleted file mode 100644 index e8bf8b80cf5..00000000000 --- a/Build/source/libs/icu-xetex/test/unalignedtest/unaligned.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - This program is a wrapper to assist in debugging analigned traps on the Alpha - architectures. - - COPYRIGHT AND PERMISSION NOTICE - - Copyright (c) 2002 Sean Hunter - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, and/or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, provided that the above - copyright notice(s) and this permission notice appear in all copies of - the Software and that both the above copyright notice(s) and this - permission notice appear in supporting documentation. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT - OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL - INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - Except as contained in this notice, the name of a copyright holder - shall not be used in advertising or otherwise to promote the sale, use - or other dealings in this Software without prior written authorization - of the copyright holder. - - -------------------------------------------------------------------------------- - All trademarks and registered trademarks mentioned herein are the property - of their respective owners. - -*/ -#include <errno.h> -#include <stdio.h> - -#include <asm/sysinfo.h> -#include <asm/unistd.h> - -#define TMP_PATH_MAX 1024 - - -static int -setsysinfo(unsigned long op, void *buffer, unsigned long size, - int *start, void *arg, unsigned long flag) -{ - syscall(__NR_osf_setsysinfo, op, buffer, size, start, arg, flag); -} - - -void -trap_unaligned(void) -{ - unsigned int buf[2]; - buf[0] = SSIN_UACPROC; - buf[1] = UAC_SIGBUS | UAC_NOPRINT; - setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0, 0); -} - - -static void -usage(void) -{ - fprintf(stderr, - "usage: unaligned [-b] <command-path> [command-args...]\n\n" - " This program is designed to assist debugging of\n" - " unaligned traps by running the program in gdb\n" - " and causing it to get SIGBUS when it encounters\n" - " an unaligned trap.\n\n" - " It is free software written by Sean Hunter <sean@uncarved.co.uk>\n" - " based on code by Richard Henderson and Andrew Morgan.\n\n" - ); - - exit(1); -} - - -int -main(int argc, char **argv) -{ - const char my_debugger[] = "/usr/bin/gdb"; - - char *temp_str; - char *curr; - int size = 0; - int curr_arg; - int isBatchMode = 0; - - /* check that we have at least 1 argument */ - if (argc < 2) { - usage(); - } - if( strcmp("-b" , argv[1]) == 0 ){ - isBatchMode = 1; - curr_arg = 2; - }else{ - curr_arg = 1; - } - - trap_unaligned(); - - if (argc > 2) { - /* We're going to use bash process redirection to create a "file" for gdb to read - * containing the arguments we need */ - size = 2048; - for(; curr_arg < argc; curr_arg++) { - size += strlen(argv[curr_arg]); - } - temp_str = (char *) malloc(sizeof(char) * size); - if (!temp_str) { - fprintf(stderr, "Unable to malloc memory for string use: %s\n", strerror(errno)); - exit(255); - } - if(isBatchMode==1){ - sprintf(temp_str, "%s -batch %s -x <( echo file %s; echo set args", my_debugger, argv[2], argv[2]); - }else{ - sprintf(temp_str, "%s %s -x <( echo file %s; echo set args", my_debugger, argv[1], argv[1]); - } - curr = temp_str + strlen(temp_str); - for(curr_arg = 2; curr_arg < argc; curr_arg++) { - sprintf(curr, " %s", argv[curr_arg]); - curr = temp_str + strlen(temp_str); - } -#ifndef NOAUTORUN - curr = temp_str + strlen(temp_str); - sprintf(curr, "; echo run"); -#endif - curr = temp_str + strlen(temp_str); - sprintf(curr, ")"); - - execlp("/bin/bash", "/bin/bash", "-c", temp_str, NULL); - - } - else { - execlp(my_debugger, my_debugger, argv[1], NULL); - } - - /* if we fall through to here, our exec failed -- announce the fact */ - fprintf(stderr, "Unable to execute command: %s\n", strerror(errno)); - - usage(); - -} - -/* use gcc unaligned.c -o unaliged to compile. Add -DNOAUTORUN if you -don't want gdb to automatically run the program */ - diff --git a/Build/source/libs/icu-xetex/test/usetperf/timer.h b/Build/source/libs/icu-xetex/test/usetperf/timer.h deleted file mode 100644 index c15ff4e4253..00000000000 --- a/Build/source/libs/icu-xetex/test/usetperf/timer.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -********************************************************************** -* Copyright (c) 2002-2005, International Business Machines -* Corporation and others. All Rights Reserved. -********************************************************************** -* 2002-09-20 aliu Created. -*/ -#ifndef __PERFTIMER_H__ -#define __PERFTIMER_H__ - -#include "unicode/utypes.h" - -// Derived from Ram's perftime.h - -//---------------------------------------------------------------------- -// Win32 - -#if defined(U_WINDOWS) - -#include <windows.h> - -class Timer { - LARGE_INTEGER tstart, tend; -public: - Timer() {} - inline void start() { - QueryPerformanceCounter(&tstart); - } - inline double stop() { - QueryPerformanceCounter(&tend); - LARGE_INTEGER freq; - int result = QueryPerformanceFrequency(&freq); - return ((double)(tend.QuadPart - tstart.QuadPart))/((double)freq.QuadPart); - } -}; - -//---------------------------------------------------------------------- -// UNIX - -#else - -#include <sys/time.h> - -class Timer { - struct timeval tstart, tend; - struct timezone tz; -public: - Timer() {} - inline void start() { - gettimeofday(&tstart, &tz); - } - inline double stop() { - gettimeofday(&tend, &tz); - double t1, t2; - t1 = (double)tstart.tv_sec + (double)tstart.tv_usec*1e-6; - t2 = (double)tend.tv_sec + (double)tend.tv_usec*1e-6; - return t2-t1; - } -}; - -#endif -#endif diff --git a/Build/source/libs/icu-xetex/test/usetperf/usetperf.cpp b/Build/source/libs/icu-xetex/test/usetperf/usetperf.cpp deleted file mode 100644 index cdff2adb275..00000000000 --- a/Build/source/libs/icu-xetex/test/usetperf/usetperf.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* -********************************************************************** -* Copyright (c) 2002-2004, International Business Machines -* Corporation and others. All Rights Reserved. -********************************************************************** -* 2002-09-20 aliu Created. -*/ - -#include <stdio.h> - -#include "unicode/utypes.h" -#include "unicode/uniset.h" -#include "unicode/uchar.h" -#include "unicode/usetiter.h" -#include "bitset.h" -#include "timer.h" - -#define LENGTH(a) (sizeof(a)/sizeof(a[0])) - -int main(int argc, const char *argv[]) { - - Timer timer; - BitSet bs; - UnicodeSet us; - int32_t i, j, n, temp; - UChar32 cp; - double t; - - int32_t PROPS[] = { - // category iterations for add, contains, iterator - U_TITLECASE_LETTER, 100, 100, 20000000, - U_UNASSIGNED, 30, 100, 20000000, - }; - - for (j=0; j<LENGTH(PROPS); j+=4) { - UCharCategory prop = (UCharCategory) PROPS[j]; - - printf("\nGetting characters for character category %d\n", prop); - bs.clearAll(); - int32_t total = 0; - for (cp=0; cp<0x110000; ++cp) { - if (u_charType(cp) == prop) { - bs.set((int32_t) cp); - ++total; - } - } - printf("Total characters: %d\n", total); - - // add() - n = PROPS[j+1]; - printf("Testing add() x %d...", n); - timer.start(); - for (i=0; i<n; ++i) { - us.clear(); - for (cp=0; cp<0x110000; ++cp) { - if (bs.get((int32_t) cp)) { - us.add(cp); - } - } - } - t = timer.stop(); - printf("result: %f sec => %f ms/loop\n", t, t*1e3/n); - - // contains() - n = PROPS[j+2]; - printf("Testing contains() x %d...", n); - temp = 0; - timer.start(); - for (i=0; i<n; ++i) { - us.clear(); - for (cp=0; cp<0x110000; ++cp) { - if (us.contains(cp)) { - temp += cp; - } - } - } - t = timer.stop(); - printf("result: %f sec => %f ms/loop\n", t, t*1e3/n); - - // iterator - n = PROPS[j+3]; - printf("Testing iterator x %d...", n); - temp = 0; - timer.start(); - for (i=0; i<n; ++i) { - UnicodeSetIterator uit(us); - while (uit.next()) { - temp += uit.getCodepoint(); - } - } - t = timer.stop(); - printf("result: %f sec => %f ns/loop\n", t, t*1e9/n); - } - - char* PAT[] = { - "['A-Za-z\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0\\u01CD-\\u01DC\\u01DE-\\u01E1\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u01FB\\u0200-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u212A-\\u212B]", - - "['.0-9A-Za-z~\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0\\u01CD-\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u0301\\u0303-\\u0304\\u0306-\\u0307\\u0310\\u0314-\\u0315\\u0323\\u0325\\u0331\\u0341\\u0344\\u0385-\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u0390\\u03AC-\\u03B0\\u03CC-\\u03CE\\u03D3\\u0403\\u040C\\u040E\\u0419\\u0439\\u0453\\u045C\\u045E\\u04C1-\\u04C2\\u04D0-\\u04D1\\u04D6-\\u04D7\\u04E2-\\u04E3\\u04EE-\\u04EF\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u1F01\\u1F03-\\u1F05\\u1F07\\u1F09\\u1F0B-\\u1F0D\\u1F0F\\u1F11\\u1F13-\\u1F15\\u1F19\\u1F1B-\\u1F1D\\u1F21\\u1F23-\\u1F25\\u1F27\\u1F29\\u1F2B-\\u1F2D\\u1F2F\\u1F31\\u1F33-\\u1F35\\u1F37\\u1F39\\u1F3B-\\u1F3D\\u1F3F\\u1F41\\u1F43-\\u1F45\\u1F49\\u1F4B-\\u1F4D\\u1F51\\u1F53-\\u1F55\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F61\\u1F63-\\u1F65\\u1F67\\u1F69\\u1F6B-\\u1F6D\\u1F6F\\u1F71\\u1F73\\u1F75\\u1F77\\u1F79\\u1F7B\\u1F7D\\u1F81\\u1F83-\\u1F85\\u1F87\\u1F89\\u1F8B-\\u1F8D\\u1F8F\\u1F91\\u1F93-\\u1F95\\u1F97\\u1F99\\u1F9B-\\u1F9D\\u1F9F\\u1FA1\\u1FA3-\\u1FA5\\u1FA7\\u1FA9\\u1FAB-\\u1FAD\\u1FAF-\\u1FB1\\u1FB4\\u1FB8-\\u1FB9\\u1FBB\\u1FC4\\u1FC9\\u1FCB\\u1FCE\\u1FD0-\\u1FD1\\u1FD3\\u1FD8-\\u1FD9\\u1FDB\\u1FDE\\u1FE0-\\u1FE1\\u1FE3\\u1FE5\\u1FE8-\\u1FE9\\u1FEB-\\u1FEC\\u1FEE\\u1FF4\\u1FF9\\u1FFB\\u212A-\\u212B\\uE04D\\uE064]", - - "[\\u0901-\\u0903\\u0905-\\u0939\\u093C-\\u094D\\u0950-\\u0954\\u0958-\\u096F]", - }; - - UErrorCode ec = U_ZERO_ERROR; - - n = 2000; - - for (j=0; j<LENGTH(PAT); ++j) { - - printf("\nApplying pattern %s x %d...", PAT[j], n); - UnicodeSet set; - UnicodeString pat(PAT[j], ""); - - timer.start(); - for (i=0; i<n; i++) { - set.applyPattern(pat, ec); - } - t = timer.stop(); - printf("result: %f sec => %f us/loop\n", t, t*1e6/n); - } - - return 0; -} diff --git a/Build/source/libs/icu-xetex/test/usetperf/usetperf.dsp b/Build/source/libs/icu-xetex/test/usetperf/usetperf.dsp deleted file mode 100644 index 3d012285df7..00000000000 --- a/Build/source/libs/icu-xetex/test/usetperf/usetperf.dsp +++ /dev/null @@ -1,164 +0,0 @@ -# Microsoft Developer Studio Project File - Name="usetperf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=usetperf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "usetperf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "usetperf.mak" CFG="usetperf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "usetperf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "usetperf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "usetperf - Win64 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "usetperf - Win64 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "usetperf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 icuuc.lib kernel32.lib user32.lib gdi32.lib winmm.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib" - -!ELSEIF "$(CFG)" == "usetperf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 icuucd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" - -!ELSEIF "$(CFG)" == "usetperf - Win64 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "..\..\..\include" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IX86 /machine:IA64 -# ADD LINK32 icuuc.lib kernel32.lib user32.lib gdi32.lib winmm.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IX86 /libpath:"..\..\..\lib" /machine:IA64 - -!ELSEIF "$(CFG)" == "usetperf - Win64 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "..\..\..\include" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /GZ /Wp64 /Zm600 /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:IX86 /pdbtype:sept /machine:IA64 -# ADD LINK32 icuucd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /libpath:"..\..\..\lib" /machine:IA64 - -!ENDIF - -# Begin Target - -# Name "usetperf - Win32 Release" -# Name "usetperf - Win32 Debug" -# Name "usetperf - Win64 Release" -# Name "usetperf - Win64 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\bitset.cpp -# ADD CPP /I "..\..\common" -# End Source File -# Begin Source File - -SOURCE=.\usetperf.cpp -# ADD CPP /I "..\..\common" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/Build/source/libs/icu-xetex/test/utfperf/utfperf.c b/Build/source/libs/icu-xetex/test/utfperf/utfperf.c deleted file mode 100644 index 5bedfdd44d9..00000000000 --- a/Build/source/libs/icu-xetex/test/utfperf/utfperf.c +++ /dev/null @@ -1,450 +0,0 @@ -/* -********************************************************************** -* Copyright (C) 2002-2005, International Business Machines -* Corporation and others. All Rights Reserved. -********************************************************************** -* file name: utfperf.c -* encoding: US-ASCII -* tab size: 8 (not used) -* indentation:4 -* -* created on: 2002apr17 -* created by: Markus W. Scherer -* -* Performance test program for Unicode converters -* (converters that support all Unicode code points). -* Takes a UTF-8 file as input. -*/ - -#include <stdio.h> -#include <string.h> - -#include <fcntl.h> /* for _O_BINARY */ -#include <io.h> /* for _setmode() */ - -#include "unicode/utypes.h" -#include "unicode/ucnv.h" -#include "unicode/ustring.h" - -#if defined(U_WINDOWS) -# include <windows.h> -#else -# include <sys/time.h> - static unsigned long - timeGetTime() { - struct timeval t; - - gettimeofday(&t, 0); - return t.tv_sec*1000+t.tv_usec/1000; - }; -#endif - -/* definitions and text buffers */ - -#define INPUT_CAPACITY (1024*1024) -#define INTERMEDIATE_CAPACITY 4096 -#define INTERMEDIATE_SMALL_CAPACITY 20 -#define OUTPUT_CAPACITY INPUT_CAPACITY - -#define TARGET_MEASURE_TIME_MS 2000 - -#define PERCENT(a, b) (int)(((a)*200+1)/(2*(b))) - -#define ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0])) - -static UChar input[INPUT_CAPACITY], output[OUTPUT_CAPACITY]; -static char intermediate[INTERMEDIATE_CAPACITY]; - -static int32_t inputLength, encodedLength, outputLength, countInputCodePoints; - -static int32_t utf8Length=0; -static double utf8Time=0.; - -static const char *const -utfNames[]={ - "UTF-8", /* UTF-8 should always be first to serve as percentage reference */ - "SCSU", "BOCU-1" /*, "CESU-8" *//*, "UTF-16BE", "UTF-16LE"*//*, "GB18030"*/ -}; - -/* functions */ - -typedef void -RoundtripFn(UConverter *cnv, int32_t intermediateCapacity, UErrorCode *pErrorCode); - -static void -roundtrip(UConverter *cnv, int32_t intermediateCapacity, UErrorCode *pErrorCode) { - const UChar *pIn, *pInLimit; - UChar *pOut, *pOutLimit; - char *pInter, *pInterLimit, *p; - UBool flush; - - ucnv_reset(cnv); - - pIn=input; - pInLimit=input+inputLength; - - pOut=output; - pOutLimit=output+OUTPUT_CAPACITY; - - pInterLimit=intermediate+intermediateCapacity; - - encodedLength=outputLength=0; - flush=FALSE; - - while(pIn<pInLimit || !flush) { - /* convert a block of [pIn..pInLimit[ to the encoding in intermediate[] */ - pInter=intermediate; - flush=(UBool)(pIn==pInLimit); - ucnv_fromUnicode(cnv, - &pInter, pInterLimit, - &pIn, pInLimit, - NULL, flush, - pErrorCode); - encodedLength+=(int32_t)(pInter-intermediate); - - if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { - /* in case flush was TRUE make sure that we convert once more to really flush */ - flush=FALSE; - *pErrorCode=U_ZERO_ERROR; - } else if(U_FAILURE(*pErrorCode)) { - return; - } - - /* convert the block [intermediate..pInter[ back to UTF-16 */ - p=intermediate; - ucnv_toUnicode(cnv, - &pOut, pOutLimit, - &p, pInter, - NULL, flush, - pErrorCode); - if(U_FAILURE(*pErrorCode)) { - return; - } - /* intermediate must have been consumed (p==pInter) because of the converter semantics */ - } - - outputLength=pOut-output; - if(inputLength!=outputLength) { - fprintf(stderr, "error: roundtrip failed, inputLength %d!=outputLength %d\n", inputLength, outputLength); - *pErrorCode=U_INTERNAL_PROGRAM_ERROR; - } -} - -static void -noop(UConverter *cnv, int32_t intermediateCapacity, UErrorCode *pErrorCode) { - /* do nothing */ -} - -static unsigned long -measureRoundtrips(RoundtripFn *fn, UConverter *cnv, const char *encName, int32_t intermediateCapacity, int32_t n) { - unsigned long _time; - UErrorCode errorCode; - - _time=timeGetTime(); - errorCode=U_ZERO_ERROR; - do { - fn(cnv, intermediateCapacity, &errorCode); - } while(U_SUCCESS(errorCode) && --n>0); - _time=timeGetTime()-_time; - - if(U_FAILURE(errorCode)) { - fprintf(stderr, "error in roundtrip conversion (%s): %s\n", encName, u_errorName(errorCode)); - return 0x7fffffff; - } - - if(0!=u_memcmp(input, output, inputLength)) { - fprintf(stderr, "error: roundtrip failed, input[]!=output[]\n"); - return 0x7fffffff; - } - - return _time; -} - -static void -perEncAndCapacity(UConverter *cnv, const char *encName, int32_t intermediateCapacity) { - double rtTime; - unsigned long _time; - int32_t n; - - /*printf("test performance for %s with intermediate capacity %d\n", encName, intermediateCapacity);*/ - - /* warm up caches and estimate loop time */ - n=10; - for(;;) { - _time=measureRoundtrips(roundtrip, cnv, encName, intermediateCapacity, n); - if(_time<500 && _time<TARGET_MEASURE_TIME_MS/10) { - n*=10; - } else { - break; - } - } - - if(_time<TARGET_MEASURE_TIME_MS) { - n=(n*TARGET_MEASURE_TIME_MS)/_time+1; - } - - /* run actual measurement with a target test time of 10s */ - _time=measureRoundtrips(roundtrip, cnv, encName, intermediateCapacity, n); - - /* subtract same number of loops over no-operation function */ - _time-=measureRoundtrips(noop, cnv, encName, intermediateCapacity, n); - - rtTime=((double)_time*1000.)/(double)n; - - /* report */ - printf("* performance report for %8s:\n", encName); - printf(" intermediate buffer capacity %8d B\n", intermediateCapacity); - if(intermediateCapacity==INTERMEDIATE_CAPACITY && utf8Length!=0) { - printf(" number of encoding bytes %8d B (%3d%% of UTF-8)\n", encodedLength, PERCENT(encodedLength, utf8Length)); - printf(" roundtrip conversion time %8g μs (%3d%% of UTF-8)\n", rtTime, PERCENT(rtTime, utf8Time)); - } else { - printf(" number of encoding bytes %8d B\n", encodedLength); - printf(" roundtrip conversion time %8g μs\n", rtTime); - } - printf(" average bytes/code point %8g B/cp\n", (double)encodedLength/countInputCodePoints); - puts(""); - - /* set UTF-8 values */ - if(intermediateCapacity==INTERMEDIATE_CAPACITY && 0==strcmp(encName, "UTF-8")) { - utf8Length=encodedLength; - utf8Time=rtTime; - } -} - -static void -perEnc(UConverter *cnv, const char *encName) { - /*printf("test performance for %s\n", encName);*/ - perEncAndCapacity(cnv, encName, INTERMEDIATE_CAPACITY); - perEncAndCapacity(cnv, encName, INTERMEDIATE_SMALL_CAPACITY); -} - -static void -testPerformance() { - UConverter *cnv; - UErrorCode errorCode; - int32_t i; - - printf("number of code points %8d cp\n", countInputCodePoints); - printf("platform endianness: %8s-endian\n", U_IS_BIG_ENDIAN ? "big" : "little"); - puts(""); - for(i=0; i<ARRAY_LENGTH(utfNames); ++i) { - errorCode=U_ZERO_ERROR; - cnv=ucnv_open(utfNames[i], &errorCode); - if(U_SUCCESS(errorCode)) { - perEnc(cnv, utfNames[i]); - ucnv_close(cnv); - } else { - fprintf(stderr, "error opening converter for \"%s\" - %s\n", utfNames[i], u_errorName(errorCode)); - } - } -} - -/* read a complete block from the input file */ -static int32_t -readBlock(FILE *in) { - int length, blockLength; - - blockLength=0; - while(blockLength<INTERMEDIATE_CAPACITY && !feof(in)) { - length=fread(intermediate, 1, INTERMEDIATE_CAPACITY-blockLength, in); - if(length<0 || ferror(in)) { - return -1; - } - blockLength+=length; - } - - return (int32_t)blockLength; -} - -static UBool -readInput(FILE *in, const char *encName) { - UConverter *cnv; - UChar *pOut, *pOutLimit; - const char *p, *limit; - int32_t length; - UErrorCode errorCode; - - pOut=input; - pOutLimit=input+INPUT_CAPACITY; - - errorCode=U_ZERO_ERROR; - - /* read the first block and open the converter */ - length=readBlock(in); - if(length<0) { - return FALSE; - } - - if(encName==NULL) { - int32_t signatureLength; - encName=ucnv_detectUnicodeSignature(intermediate, length, - &signatureLength, - &errorCode); - if(U_FAILURE(errorCode) || encName==NULL) { - /* default to UTF-8 */ - printf("no Unicode signature - using UTF-8\n"); - encName="UTF-8"; - errorCode=U_ZERO_ERROR; - } else { - printf("detected signature for %s (removing %d bytes)\n", encName, signatureLength); - /* remove signature byte sequence */ - memmove(intermediate, intermediate+signatureLength, length-=signatureLength); - } - } - - cnv=ucnv_open(encName, &errorCode); - if(U_FAILURE(errorCode)) { - fprintf(stderr, "error: unable to ucnv_open(\"%s\") - %s\n", encName, u_errorName(errorCode)); - return FALSE; - } - - while(length>0) { - /* convert the block */ - p=intermediate; - limit=p+length; - - ucnv_toUnicode(cnv, - &pOut, pOutLimit, - &p, limit, - NULL, FALSE, - &errorCode); - if(U_FAILURE(errorCode)) { - fprintf(stderr, "error converting input to UTF-16: %s\n", u_errorName(errorCode)); - ucnv_close(cnv); - return FALSE; - } - - /* read the next block */ - length=readBlock(in); - if(length<0) { - ucnv_close(cnv); - return FALSE; - } - } - - /* flush the converter */ - ucnv_toUnicode(cnv, - &pOut, pOutLimit, - &p, p, - NULL, TRUE, - &errorCode); - ucnv_close(cnv); - - if(U_FAILURE(errorCode)) { - fprintf(stderr, "error converting input to UTF-16: %s\n", u_errorName(errorCode)); - return FALSE; - } - - inputLength=(int32_t)(pOut-input); - countInputCodePoints=u_countChar32(input, inputLength); - if(inputLength<=0) { - fprintf(stderr, "warning: input is empty\n"); - return FALSE; - } - - return TRUE; -} - -static void -showUsage(const char *myName) { - fprintf(stderr, - "Usage:\n" - "%s [-e encoding-name] filename | '-'\n" - " encoding-name must be the name of an encoding supported by ICU\n" - " the filename of the input file with text to be used\n" - " can be a dash (-) for standard input\n", - myName); -} - -/* - * Read file using some encoding, convert to 1M UTF-16 input buffer. - * For each UTF to be tested: - * n times: - * convert from UTF-16 input buffer to UTF, 4kB buffer - * convert from 4kB buffer to 1M UTF-16 output buffer - * adjust n so that time elapsed is 10s (#define) - * ->divide 10s by time, increase n by that factor, run 2nd time - * n times: - * empty function - * subtract out loop/function overhead - * display #code points - #UTF bytes - time per roundtrip - * - * * do the same again with an intermediate buffer size of 20 instead of 4kB - * - * Test following UTFs: - * UTF-16BE, UTF-16LE, UTF-8, SCSU, BOCU-1, CESU-8 - * - * Command-line arguments: - * - encoding (default UTF-8, detect BOM) - * - filename (allow "-") - */ -extern int -main(int argc, const char *argv[]) { - FILE *in; - const char *myName, *encName, *filename, *basename; - - myName=argv[0]; - if(argc<2) { - showUsage(myName); - return 1; - } - - /* get encoding name argument */ - if(argv[1][0]=='-' && argv[1][1]=='e') { - encName=argv[1]+2; - --argc; - ++argv; - if(*encName==0) { - if(argc<2) { - showUsage(myName); - return 1; - } - encName=argv[1]; - --argc; - ++argv; - } - } else { - encName=NULL; - } - - /* get filename argument */ - if(argc<2) { - showUsage(myName); - return 1; - } - filename=argv[1]; - if(filename[0]=='-' && filename[1]==0) { - filename="(standard input)"; - in=stdin; - /* set stdin to binary mode */ - _setmode(_fileno(stdin), _O_BINARY); - } else { - in=fopen(filename, "rb"); - if(in==NULL) { - fprintf(stderr, "error opening \"%s\"\n", filename); - showUsage(myName); - return 2; - } - } - - /* read input */ - basename=strrchr(filename, U_FILE_SEP_CHAR); - if(basename!=NULL) { - ++basename; - } else { - basename=filename; - } - printf("# testing converter performance with file \"%s\"\n", basename); - if(!readInput(in, encName)) { - fprintf(stderr, "error reading \"%s\" (encoding %s)\n", filename, encName); - showUsage(myName); - return 2; - } - if(in!=stdin) { - fclose(in); - } - - /* test performance */ - testPerformance(); - return 0; -} diff --git a/Build/source/libs/icu-xetex/test/utfperf/utfperf.dsp b/Build/source/libs/icu-xetex/test/utfperf/utfperf.dsp deleted file mode 100644 index 83512224c7e..00000000000 --- a/Build/source/libs/icu-xetex/test/utfperf/utfperf.dsp +++ /dev/null @@ -1,158 +0,0 @@ -# Microsoft Developer Studio Project File - Name="utfperf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=utfperf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "utfperf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "utfperf.mak" CFG="utfperf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "utfperf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "utfperf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "utfperf - Win64 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "utfperf - Win64 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "utfperf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 icuuc.lib kernel32.lib user32.lib gdi32.lib winmm.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib" - -!ELSEIF "$(CFG)" == "utfperf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 icuucd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" - -!ELSEIF "$(CFG)" == "utfperf - Win64 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "..\..\..\include" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IX86 /machine:IA64 -# ADD LINK32 icuuc.lib kernel32.lib user32.lib gdi32.lib winmm.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:IX86 /libpath:"..\..\..\lib" /machine:IA64 - -!ELSEIF "$(CFG)" == "utfperf - Win64 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "..\..\..\include" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /GZ /Wp64 /Zm600 /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:IX86 /pdbtype:sept /machine:IA64 -# ADD LINK32 icuucd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /libpath:"..\..\..\lib" /machine:IA64 - -!ENDIF - -# Begin Target - -# Name "utfperf - Win32 Release" -# Name "utfperf - Win32 Debug" -# Name "utfperf - Win64 Release" -# Name "utfperf - Win64 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\utfperf.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project |