Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: source/test/cintltst/bocu1tst.c

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/test/Makefile.in ('k') | source/test/cintltst/callcoll.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « source/test/Makefile.in ('k') | source/test/cintltst/callcoll.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698