| 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");
|
| }
|
| }
|
|
|