Index: source/test/cintltst/ucnvseltst.c |
diff --git a/source/test/cintltst/ucnvseltst.c b/source/test/cintltst/ucnvseltst.c |
index 6497871f679a60629fd94a152ac82c08ecdc4564..01135f5bbfa267769bf1024e20e69b5bef849c90 100644 |
--- a/source/test/cintltst/ucnvseltst.c |
+++ b/source/test/cintltst/ucnvseltst.c |
@@ -1,5 +1,5 @@ |
/******************************************************************** |
- * Copyright (c) 1997-2011, International Business Machines |
+ * Copyright (c) 1997-2014, International Business Machines |
* Corporation and others. All Rights Reserved. |
******************************************************************** |
* |
@@ -24,8 +24,6 @@ |
#include "cstring.h" |
#include "propsvec.h" |
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) |
- |
#define FILENAME_BUFFER 1024 |
#define TDSRCPATH ".." U_FILE_SEP_STRING "test" U_FILE_SEP_STRING "testdata" U_FILE_SEP_STRING |
@@ -393,7 +391,7 @@ static void TestSelector() |
excluded_sets[i] = uset_open(i*30, i*30+500); |
} |
- for(testCaseIdx = 0; testCaseIdx < LENGTHOF(getEncodingsFns); testCaseIdx++) |
+ for(testCaseIdx = 0; testCaseIdx < UPRV_LENGTHOF(getEncodingsFns); testCaseIdx++) |
{ |
int32_t excluded_set_id; |
int32_t num_encodings; |
@@ -411,7 +409,7 @@ static void TestSelector() |
* The handling of the exclusion set is independent of the |
* set of encodings, so there is no need to test every combination. |
*/ |
- excluded_set_id = testCaseIdx % LENGTHOF(excluded_sets); |
+ excluded_set_id = testCaseIdx % UPRV_LENGTHOF(excluded_sets); |
{ |
UConverterSelector *sel_rt, *sel_fb; |
char *buffer_fb = NULL; |
@@ -469,7 +467,7 @@ static void TestSelector() |
verifyResult(ucnvsel_selectForUTF8(sel_rt, s, -1, &status), manual_rt); |
verifyResult(ucnvsel_selectForUTF8(sel_fb, s, -1, &status), manual_fb); |
- u_strFromUTF8(utf16, LENGTHOF(utf16), &length16, s, length8, &status); |
+ u_strFromUTF8(utf16, UPRV_LENGTHOF(utf16), &length16, s, length8, &status); |
if (U_FAILURE(status)) { |
log_err("error converting the test text (string %ld) to UTF-16 - %s\n", |
(long)text.number, u_errorName(status)); |