/********************************************************************
- * Copyright (c) 1997-2011, International Business Machines
+ * Copyright (c) 1997-2014, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************
*
#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
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;
* 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;
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));