Index: source/test/cintltst/bocu1tst.c |
diff --git a/source/test/cintltst/bocu1tst.c b/source/test/cintltst/bocu1tst.c |
index 9b0befc97101c54a9e12ac15306e607d8826c0be..aeb9a35aba9254cb68ee383ce544d0c8425769e8 100644 |
--- a/source/test/cintltst/bocu1tst.c |
+++ b/source/test/cintltst/bocu1tst.c |
@@ -1,7 +1,7 @@ |
/* |
****************************************************************************** |
* |
-* Copyright (C) 2002-2011, International Business Machines |
+* Copyright (C) 2002-2014, International Business Machines |
* Corporation and others. All Rights Reserved. |
* |
****************************************************************************** |
@@ -35,8 +35,6 @@ |
#include "cmemory.h" |
#include "cintltst.h" |
-#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0])) |
- |
/* icuhtml/design/conversion/bocu1/bocu1.h ---------------------------------- */ |
/* BOCU-1 constants and macros ---------------------------------------------- */ |
@@ -951,21 +949,21 @@ static const struct { |
const UChar *s; |
int32_t length; |
} strings[]={ |
- { feff, LENGTHOF(feff) }, |
- { ascii, LENGTHOF(ascii) }, |
- { crlf, LENGTHOF(crlf) }, |
- { nul, LENGTHOF(nul) }, |
- { latin, LENGTHOF(latin) }, |
- { devanagari, LENGTHOF(devanagari) }, |
- { hiragana, LENGTHOF(hiragana) }, |
- { unihan, LENGTHOF(unihan) }, |
- { hangul, LENGTHOF(hangul) }, |
- { surrogates, LENGTHOF(surrogates) }, |
- { plane1, LENGTHOF(plane1) }, |
- { plane2, LENGTHOF(plane2) }, |
- { plane15, LENGTHOF(plane15) }, |
- { plane16, LENGTHOF(plane16) }, |
- { c0, LENGTHOF(c0) } |
+ { feff, UPRV_LENGTHOF(feff) }, |
+ { ascii, UPRV_LENGTHOF(ascii) }, |
+ { crlf, UPRV_LENGTHOF(crlf) }, |
+ { nul, UPRV_LENGTHOF(nul) }, |
+ { latin, UPRV_LENGTHOF(latin) }, |
+ { devanagari, UPRV_LENGTHOF(devanagari) }, |
+ { hiragana, UPRV_LENGTHOF(hiragana) }, |
+ { unihan, UPRV_LENGTHOF(unihan) }, |
+ { hangul, UPRV_LENGTHOF(hangul) }, |
+ { surrogates, UPRV_LENGTHOF(surrogates) }, |
+ { plane1, UPRV_LENGTHOF(plane1) }, |
+ { plane2, UPRV_LENGTHOF(plane2) }, |
+ { plane15, UPRV_LENGTHOF(plane15) }, |
+ { plane16, UPRV_LENGTHOF(plane16) }, |
+ { c0, UPRV_LENGTHOF(c0) } |
}; |
/* |
@@ -993,7 +991,7 @@ TestBOCU1(void) { |
/* text 1: each of strings[] once */ |
length=0; |
- for(i=0; i<LENGTHOF(strings); ++i) { |
+ for(i=0; i<UPRV_LENGTHOF(strings); ++i) { |
u_memcpy(text+length, strings[i].s, strings[i].length); |
length+=strings[i].length; |
} |
@@ -1001,7 +999,7 @@ TestBOCU1(void) { |
/* text 2: each of strings[] twice */ |
length=0; |
- for(i=0; i<LENGTHOF(strings); ++i) { |
+ for(i=0; i<UPRV_LENGTHOF(strings); ++i) { |
u_memcpy(text+length, strings[i].s, strings[i].length); |
length+=strings[i].length; |
u_memcpy(text+length, strings[i].s, strings[i].length); |
@@ -1012,8 +1010,8 @@ TestBOCU1(void) { |
/* text 3: each of strings[] many times (set step vs. |strings| so that all strings are used) */ |
length=0; |
for(i=1; length<5000; i+=7) { |
- if(i>=LENGTHOF(strings)) { |
- i-=LENGTHOF(strings); |
+ if(i>=UPRV_LENGTHOF(strings)) { |
+ i-=UPRV_LENGTHOF(strings); |
} |
u_memcpy(text+length, strings[i].s, strings[i].length); |
length+=strings[i].length; |