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

Unified Diff: source/test/cintltst/ncnvtst.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/cintltst/idnatest.c ('k') | source/test/cintltst/nfsprep.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/cintltst/ncnvtst.c
diff --git a/source/test/cintltst/ncnvtst.c b/source/test/cintltst/ncnvtst.c
index cfbeed82cd1dcc2b3a2956d9ca185a568ca3546c..210784b4987c5ba9e0bfd349559d3251ef484c55 100644
--- a/source/test/cintltst/ncnvtst.c
+++ b/source/test/cintltst/ncnvtst.c
@@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2013, International Business Machines Corporation and
+ * Copyright (c) 1997-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*****************************************************************************
@@ -21,6 +21,7 @@
#include "unicode/ustring.h"
#include "unicode/uset.h"
#include "cintltst.h"
+#include "cmemory.h"
#define MAX_LENGTH 999
@@ -33,7 +34,6 @@ static int32_t gOutBufferSize = 0;
static char gNuConvTestName[1024];
#define nct_min(x,y) ((x<y) ? x : y)
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
static void printSeq(const unsigned char* a, int len);
static void printSeqErr(const unsigned char* a, int len);
@@ -1792,7 +1792,7 @@ doTestTruncated(const char *cnvName, const uint8_t *bytes, int32_t length) {
source=(const char *)bytes;
sourceLimit=source+length;
target=buffer;
- targetLimit=buffer+LENGTHOF(buffer);
+ targetLimit=buffer+UPRV_LENGTHOF(buffer);
/* 1. input bytes with flush=FALSE, then input nothing with flush=TRUE */
ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, FALSE, &errorCode);
@@ -1866,7 +1866,7 @@ TestTruncated() {
};
int32_t i;
- for(i=0; i<LENGTHOF(testCases); ++i) {
+ for(i=0; i<UPRV_LENGTHOF(testCases); ++i) {
doTestTruncated(testCases[i].cnvName, testCases[i].bytes, testCases[i].length);
}
}
@@ -1961,7 +1961,7 @@ TestUnicodeSet() {
}
/* test converters that are known to convert all of Unicode (except maybe for surrogates) */
- for(i=0; i<LENGTHOF(completeSetNames); ++i) {
+ for(i=0; i<UPRV_LENGTHOF(completeSetNames); ++i) {
errorCode=U_ZERO_ERROR;
name=completeSetNames[i];
cnv=ucnv_open(name, &errorCode);
@@ -1985,7 +1985,7 @@ TestUnicodeSet() {
#if !UCONFIG_NO_LEGACY_CONVERSION
/* test LMBCS variants which convert all of Unicode except for U+F6xx */
- for(i=0; i<LENGTHOF(lmbcsNames); ++i) {
+ for(i=0; i<UPRV_LENGTHOF(lmbcsNames); ++i) {
errorCode=U_ZERO_ERROR;
name=lmbcsNames[i];
cnv=ucnv_open(name, &errorCode);
@@ -2009,7 +2009,7 @@ TestUnicodeSet() {
#endif
/* test specific sets */
- for(i=0; i<LENGTHOF(nameRanges); ++i) {
+ for(i=0; i<UPRV_LENGTHOF(nameRanges); ++i) {
errorCode=U_ZERO_ERROR;
name=nameRanges[i].name;
cnv=ucnv_open(name, &errorCode);
« no previous file with comments | « source/test/cintltst/idnatest.c ('k') | source/test/cintltst/nfsprep.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698