/*
******************************************************************************
*
-* Copyright (C) 2001-2006, International Business Machines
+* Copyright (C) 2001-2011, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
#include <stdio.h>
#include "unicode/utypes.h"
+#include "unicode/utf16.h"
#include "utrie.h"
#include "cstring.h"
#include "cmemory.h"
c=checkRanges[i].limit;
if(c!=0) {
--c;
- UTF_APPEND_CHAR_UNSAFE(s, length, c);
+ U16_APPEND_UNSAFE(s, length, c);
values[countValues++]=checkRanges[i].value;
}
}
if(
c2==0 ?
c!=*(p-1) :
- !UTF_IS_LEAD(c) || !UTF_IS_TRAIL(c2) || c!=*(p-2) || c2!=*(p-1)
+ !U16_IS_LEAD(c) || !U16_IS_TRAIL(c2) || c!=*(p-2) || c2!=*(p-1)
) {
log_err("error: wrong (c, c2) from UTRIE_NEXT(%s): (U+%04lx, U+%04lx)\n",
testName, c, c2);
if(
c2==0 ?
c!=*p:
- !UTF_IS_LEAD(c) || !UTF_IS_TRAIL(c2) || c!=*p || c2!=*(p+1)
+ !U16_IS_LEAD(c) || !U16_IS_TRAIL(c2) || c!=*p || c2!=*(p+1)
) {
log_err("error: wrong (c, c2) from UTRIE_PREVIOUS(%s): (U+%04lx, U+%04lx)\n",
testName, c, c2);
log_err("error: unserialized trie(%s).fromBMP(U+%04lx)==0x%lx instead of 0x%lx\n",
testName, start, value2, value);
}
- if(!UTF_IS_LEAD(start)) {
+ if(!U16_IS_LEAD(start)) {
if(dataIs32) {
value2=UTRIE_GET32_FROM_LEAD(&trie, start);
} else {
log_err("error: unserialized trie(%s).fromBMP(U+%04lx)==0x%lx instead of 0x%lx\n",
testName, start, value2, value);
}
- if(!UTF_IS_LEAD(start)) {
+ if(!U16_IS_LEAD(start)) {
if(dataIs32) {
value2=UTRIE_GET32_FROM_LEAD(&trie, start);
} else {
{0x2f800,0x2fedc, 0x7a, TRUE},
{0x72, 0xdd, 3, TRUE},
{0xdd, 0xde, 4, FALSE},
+ {0x201, 0x220, 6, TRUE}, /* 3 consecutive blocks with the same pattern but discontiguous value ranges */
+ {0x221, 0x240, 6, TRUE},
+ {0x241, 0x260, 6, TRUE},
{0x2f987,0x2fa98, 5, TRUE},
{0x2f777,0x2f833, 0, TRUE},
{0x2f900,0x2ffee, 1, FALSE},
{0x72, 0x5555},
{0xdd, 3},
{0xde, 4},
+ {0x201, 0},
+ {0x220, 6},
+ {0x221, 0},
+ {0x240, 6},
+ {0x241, 0},
+ {0x260, 6},
{0x2f833,0},
{0x2f987,0x7a},
{0x2fa98,5},