Index: source/test/cintltst/usrchtst.c |
diff --git a/source/test/cintltst/usrchtst.c b/source/test/cintltst/usrchtst.c |
index e425e552acabd9f7e3528bf8e2d2daad0f8de567..0c233af2e7fe3eb374afe66a4b218529de1d2ebc 100644 |
--- a/source/test/cintltst/usrchtst.c |
+++ b/source/test/cintltst/usrchtst.c |
@@ -1,5 +1,5 @@ |
/******************************************************************** |
- * Copyright (c) 2001-2011,2015,2016 International Business Machines |
+ * Copyright (c) 2001-2016 International Business Machines |
* Corporation and others. All Rights Reserved. |
******************************************************************** |
* File usrchtst.c |
@@ -2896,8 +2896,8 @@ static void TestPCEBuffer_100df(void) { |
{ 0x0020, 0x0020, 0x00df, 0x0020, 0x0041, 0x00df, 0x0020, 0x0061, 0x00df, 0x0020, 0x00c5, 0x00df, 0x0020, 0x212b, 0x00df, 0x0020, 0x0041, 0x030a, 0x00df, 0x0020, 0x00e5, 0x00df, 0x0020, 0x0061, 0x02da, 0x00df, 0x0020, 0x0061, 0x030a, 0x00df, 0x0020, 0xd8fa, 0xdeae, 0x00df, 0x0020, 0x2027, 0x00df }; /* 38 cp, 9 of them unpaired surrogates */ |
UChar source[] = |
{ 0x0020, 0x0020, 0x00df, 0x0020, 0x0041, 0x00df, 0x0020, 0x0061, 0x00df, 0x0020, 0x00c5, 0x00df, 0x0020, 0x212b, 0x00df, 0x0020, 0x0041, 0x030a, 0x00df, 0x0020, 0x00e5, 0x00df, 0x0020, 0x0061, 0x02da, 0x00df, 0x0020, 0x0061, 0x030a, 0x00df, 0x0020, 0xd8fa, 0xdeae, 0x00df, 0x0020, 0x2027, 0x00df }; |
- uint32_t searchLen = sizeof(search)/sizeof(UChar); |
- uint32_t sourceLen = sizeof(source)/sizeof(UChar); |
+ uint32_t searchLen = UPRV_LENGTHOF(search); |
+ uint32_t sourceLen = UPRV_LENGTHOF(source); |
TestPCEBuffer_with(search,searchLen,source,sourceLen); |
} |
@@ -2907,8 +2907,8 @@ static void TestPCEBuffer_2surr(void) { |
{ 0x0020, 0x0020, 0xdfff, 0x0020, 0x0041, 0xdfff, 0x0020, 0x0061, 0xdfff, 0x0020, 0x00c5, 0xdfff, 0x0020, 0x212b, 0xdfff, 0x0020, 0x0041, 0x030a, 0xdfff, 0x0020, 0x00e5, 0xdfff, 0x0020, 0x0061, 0x02da, 0xdfff, 0x0020, 0x0061, 0x030a, 0xdfff, 0x0020, 0xd8fa, 0xdeae, 0xdfff, 0x0020, 0x2027, 0xdfff }; /* 38 cp, 9 of them unpaired surrogates */ |
UChar source[] = |
{ 0x0020, 0x0020, 0xdfff, 0x0020, 0x0041, 0xdfff, 0x0020, 0x0061, 0xdfff, 0x0020, 0x00c5, 0xdfff, 0x0020, 0x212b, 0xdfff, 0x0020, 0x0041, 0x030a, 0xdfff, 0x0020, 0x00e5, 0xdfff, 0x0020, 0x0061, 0x02da, 0xdfff, 0x0020, 0x0061, 0x030a, 0xdfff, 0x0020, 0xd8fa, 0xdeae, 0xdfff, 0x0020, 0x2027, 0xdfff }; |
- uint32_t searchLen = sizeof(search)/sizeof(UChar); |
- uint32_t sourceLen = sizeof(source)/sizeof(UChar); |
+ uint32_t searchLen = UPRV_LENGTHOF(search); |
+ uint32_t sourceLen = UPRV_LENGTHOF(source); |
TestPCEBuffer_with(search,searchLen,source,sourceLen); |
} |
@@ -2927,8 +2927,8 @@ static void TestMatchFollowedByIgnorables(void) { |
int32_t matchLength = 0; |
const int32_t expectedMatchLength = 1; |
- searchLen = sizeof(search)/sizeof(UChar); |
- sourceLen = sizeof(source)/sizeof(UChar); |
+ searchLen = UPRV_LENGTHOF(search); |
+ sourceLen = UPRV_LENGTHOF(source); |
coll = ucol_openFromShortString("LHR_AN_CX_EX_FX_HX_NX_S3", |
FALSE, |