+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2016, International Business Machines Corporation and
#include "uprops.h"
#include "uset_imp.h"
#include "usc_impl.h"
-#include "udatamem.h" /* for testing ucase_openBinary() */
+#include "udatamem.h"
#include "cucdapi.h"
#include "cmemory.h"
static void TestPropertyNames(void);
static void TestPropertyValues(void);
static void TestConsistency(void);
-static void TestUCase(void);
static void TestUBiDiProps(void);
static void TestCaseFolding(void);
addTest(root, &TestPropertyNames, "tsutil/cucdtst/TestPropertyNames");
addTest(root, &TestPropertyValues, "tsutil/cucdtst/TestPropertyValues");
addTest(root, &TestConsistency, "tsutil/cucdtst/TestConsistency");
- addTest(root, &TestUCase, "tsutil/cucdtst/TestUCase");
addTest(root, &TestUBiDiProps, "tsutil/cucdtst/TestUBiDiProps");
addTest(root, &TestCaseFolding, "tsutil/cucdtst/TestCaseFolding");
}
{ 0x0590, U_LEFT_TO_RIGHT },
{ 0x0600, U_RIGHT_TO_LEFT },
{ 0x07C0, U_RIGHT_TO_LEFT_ARABIC },
+ { 0x0860, U_RIGHT_TO_LEFT },
+ { 0x0870, U_RIGHT_TO_LEFT_ARABIC }, // Unicode 10 changes U+0860..U+086F from R to AL.
{ 0x08A0, U_RIGHT_TO_LEFT },
{ 0x0900, U_RIGHT_TO_LEFT_ARABIC }, /* Unicode 6.1 changes U+08A0..U+08FF from R to AL */
{ 0x20A0, U_LEFT_TO_RIGHT },
/*
* Verify default Bidi classes.
- * For recent Unicode versions, see UCD.html.
- *
- * For older Unicode versions:
- * See table 3-7 "Bidirectional Character Types" in UAX #9.
- * http://www.unicode.org/reports/tr9/
- *
- * See also DerivedBidiClass.txt for Cn code points!
- *
- * Unicode 4.0.1/Public Review Issue #28 (http://www.unicode.org/review/resolved-pri.html)
- * changed some default values.
- * In particular, non-characters and unassigned Default Ignorable Code Points
- * change from L to BN.
- *
- * UCD.html version 4.0.1 does not yet reflect these changes.
+ * See DerivedBidiClass.txt, especially for unassigned code points.
*/
if(type==U_UNASSIGNED || type==U_PRIVATE_USE_CHAR) {
/* enumerate the intersections of defaultBidi ranges with [start..limit[ */
{ 0x10AEF, UCHAR_JOINING_GROUP, U_JG_MANICHAEAN_HUNDRED },
{ 0x10AF0, UCHAR_JOINING_GROUP, U_JG_NO_JOINING_GROUP },
+ { -1, 0xa00, 0 }, // version break for Unicode 10
+
+ { 0x1F1E5, UCHAR_REGIONAL_INDICATOR, FALSE },
+ { 0x1F1E7, UCHAR_REGIONAL_INDICATOR, TRUE },
+ { 0x1F1FF, UCHAR_REGIONAL_INDICATOR, TRUE },
+ { 0x1F200, UCHAR_REGIONAL_INDICATOR, FALSE },
+
+ { 0x0600, UCHAR_PREPENDED_CONCATENATION_MARK, TRUE },
+ { 0x0606, UCHAR_PREPENDED_CONCATENATION_MARK, FALSE },
+ { 0x110BD, UCHAR_PREPENDED_CONCATENATION_MARK, TRUE },
+
/* undefined UProperty values */
{ 0x61, 0x4a7, 0 },
{ 0x234bc, 0x15ed, 0 }
*/
#define HARDCODED_DATA_4497 1
-/* API coverage for ucase.c */
-static void TestUCase() {
-#if !HARDCODED_DATA_4497
- UDataMemory *pData;
- UCaseProps *csp;
- const UCaseProps *ccsp;
- UErrorCode errorCode;
-
- /* coverage for ucase_openBinary() */
- errorCode=U_ZERO_ERROR;
- pData=udata_open(NULL, UCASE_DATA_TYPE, UCASE_DATA_NAME, &errorCode);
- if(U_FAILURE(errorCode)) {
- log_data_err("unable to open " UCASE_DATA_NAME "." UCASE_DATA_TYPE ": %s\n",
- u_errorName(errorCode));
- return;
- }
-
- csp=ucase_openBinary((const uint8_t *)pData->pHeader, -1, &errorCode);
- if(U_FAILURE(errorCode)) {
- log_err("ucase_openBinary() fails for the contents of " UCASE_DATA_NAME "." UCASE_DATA_TYPE ": %s\n",
- u_errorName(errorCode));
- udata_close(pData);
- return;
- }
-
- if(UCASE_LOWER!=ucase_getType(csp, 0xdf)) { /* verify islower(sharp s) */
- log_err("ucase_openBinary() does not seem to return working UCaseProps\n");
- }
-
- ucase_close(csp);
- udata_close(pData);
-
- /* coverage for ucase_getDummy() */
- errorCode=U_ZERO_ERROR;
- ccsp=ucase_getDummy(&errorCode);
- if(ucase_tolower(ccsp, 0x41)!=0x41) {
- log_err("ucase_tolower(dummy, A)!=A\n");
- }
-#endif
-}
-
/* API coverage for ubidi_props.c */
static void TestUBiDiProps() {
#if !HARDCODED_DATA_4497