ICU-6717 return quaternary value as CE for strengths QUATERNARY, IDENTICAL. Re-enable TestSearchForNull.
X-SVN-Rev: 25368
This commit is contained in:
parent
d2624b1aef
commit
13a9d2c3ec
@ -162,13 +162,15 @@ inline int32_t getCE(const UStringSearch *strsrch, uint32_t sourcece)
|
|||||||
// no shifting to quartenary is required since all primary values
|
// no shifting to quartenary is required since all primary values
|
||||||
// less than variabletop will need to be masked off anyway.
|
// less than variabletop will need to be masked off anyway.
|
||||||
if (strsrch->variableTop > sourcece) {
|
if (strsrch->variableTop > sourcece) {
|
||||||
if (strsrch->strength == UCOL_QUATERNARY) {
|
if (strsrch->strength >= UCOL_QUATERNARY) {
|
||||||
sourcece &= UCOL_PRIMARYORDERMASK;
|
sourcece &= UCOL_PRIMARYORDERMASK;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sourcece = UCOL_IGNORABLE;
|
sourcece = UCOL_IGNORABLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (strsrch->strength >= UCOL_QUATERNARY && sourcece == UCOL_IGNORABLE) {
|
||||||
|
sourcece = 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sourcece;
|
return sourcece;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
* Copyright (c) 2001-2008 International Business Machines
|
* Copyright (c) 2001-2009 International Business Machines
|
||||||
* Corporation and others. All Rights Reserved.
|
* Corporation and others. All Rights Reserved.
|
||||||
********************************************************************
|
********************************************************************
|
||||||
* File usrchtst.c
|
* File usrchtst.c
|
||||||
@ -2268,7 +2268,6 @@ exitTestForwardBackward :
|
|||||||
|
|
||||||
static void TestSearchForNull(void)
|
static void TestSearchForNull(void)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
UCollator *coll;
|
UCollator *coll;
|
||||||
UErrorCode ec;
|
UErrorCode ec;
|
||||||
UStringSearch *search;
|
UStringSearch *search;
|
||||||
@ -2279,7 +2278,7 @@ static void TestSearchForNull(void)
|
|||||||
int expectedNum;
|
int expectedNum;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
const UChar zerodigit = 0x0030; /* 0 */
|
const UChar zerodigit = 0x0030; /* 0 */
|
||||||
const UChar nulldigit = 0x0001; /* null */
|
const UChar nulldigit = 0x0000; /* null */
|
||||||
|
|
||||||
/* static const UChar var[(length)+1]=U_DECLARE_UTF16(cs) */
|
/* static const UChar var[(length)+1]=U_DECLARE_UTF16(cs) */
|
||||||
#define PATTERN_LEN 4
|
#define PATTERN_LEN 4
|
||||||
@ -2349,9 +2348,6 @@ static void TestSearchForNull(void)
|
|||||||
{
|
{
|
||||||
log_err("Expected %d search hits, found %d\n", expectedNum, count);
|
log_err("Expected %d search hits, found %d\n", expectedNum, count);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
log_info("Note: test disabled because it is known to fail (#4184).\n");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TestStrengthIdentical(void)
|
static void TestStrengthIdentical(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user