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/utf16tst.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/usettest.c ('k') | source/test/cintltst/utf8tst.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/cintltst/utf16tst.c
diff --git a/source/test/cintltst/utf16tst.c b/source/test/cintltst/utf16tst.c
index 50dbb172af3abfe5a983a2d5625016d2396d1bec..2aa13b98b7ef534dc4f476e3e57d44b6b55a556a 100644
--- a/source/test/cintltst/utf16tst.c
+++ b/source/test/cintltst/utf16tst.c
@@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1998-2012, International Business Machines Corporation and
+ * Copyright (c) 1998-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*
@@ -21,8 +21,6 @@
#include "cintltst.h"
#include <stdio.h>
-#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
-
static void printUChars(const UChar *uchars);
static void TestCodeUnitValues(void);
@@ -742,7 +740,7 @@ static void TestAppend() {
UBool isError, expectIsError, wrongIsError;
length=0;
- for(i=0; i<LENGTHOF(codePoints); ++i) {
+ for(i=0; i<UPRV_LENGTHOF(codePoints); ++i) {
c=codePoints[i];
if(c<0 || 0x10ffff<c) {
continue; /* skip non-code points for U16_APPEND_UNSAFE */
@@ -750,24 +748,24 @@ static void TestAppend() {
U16_APPEND_UNSAFE(buffer, length, c);
}
- if(length!=LENGTHOF(expectUnsafe) || 0!=memcmp(buffer, expectUnsafe, length*U_SIZEOF_UCHAR)) {
+ if(length!=UPRV_LENGTHOF(expectUnsafe) || 0!=memcmp(buffer, expectUnsafe, length*U_SIZEOF_UCHAR)) {
log_err("U16_APPEND_UNSAFE did not generate the expected output\n");
}
length=0;
wrongIsError=FALSE;
- for(i=0; i<LENGTHOF(codePoints); ++i) {
+ for(i=0; i<UPRV_LENGTHOF(codePoints); ++i) {
c=codePoints[i];
expectIsError= c<0 || 0x10ffff<c; /* || U_IS_SURROGATE(c); */ /* surrogates in UTF-32 shouldn't be used, but it's okay to pass them around internally. */
isError=FALSE;
- U16_APPEND(buffer, length, LENGTHOF(buffer), c, isError);
+ U16_APPEND(buffer, length, UPRV_LENGTHOF(buffer), c, isError);
wrongIsError|= isError!=expectIsError;
}
if(wrongIsError) {
log_err("U16_APPEND did not set isError correctly\n");
}
- if(length!=LENGTHOF(expectSafe) || 0!=memcmp(buffer, expectSafe, length*U_SIZEOF_UCHAR)) {
+ if(length!=UPRV_LENGTHOF(expectSafe) || 0!=memcmp(buffer, expectSafe, length*U_SIZEOF_UCHAR)) {
log_err("U16_APPEND did not generate the expected output\n");
}
}
« no previous file with comments | « source/test/cintltst/usettest.c ('k') | source/test/cintltst/utf8tst.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698