+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
-* Copyright (C) 2002-2012, International Business Machines
+* Copyright (C) 2002-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: uenumtst.c
-* encoding: US-ASCII
+* encoding: UTF-8
* tab size: 8 (not used)
* indentation:2
*
static void EnumerationTest(void) {
UErrorCode status = U_ZERO_ERROR;
int32_t len = 0;
- UEnumeration *en = getchArrayEnum(test1, sizeof(test1)/sizeof(test1[0]));
+ UEnumeration *en = getchArrayEnum(test1, UPRV_LENGTHOF(test1));
const char *string = NULL;
const UChar *uString = NULL;
while ((string = uenum_next(en, &len, &status))) {
static void DefaultNextTest(void) {
UErrorCode status = U_ZERO_ERROR;
int32_t len = 0;
- UEnumeration *en = getuchArrayEnum(test2, sizeof(test2)/sizeof(test2[0]));
+ UEnumeration *en = getuchArrayEnum(test2, UPRV_LENGTHOF(test2));
const char *string = NULL;
const UChar *uString = NULL;
while ((uString = uenum_unext(en, &len, &status))) {
static void TestUCharStringsEnumeration(void) {
UErrorCode status = U_ZERO_ERROR;
/* //! [uenum_openUCharStringsEnumeration] */
- static const UChar nko_1[] = {0x07c1,0}, nko_2[] = {0x07c2}, nko_3[] = {0x07c3,0}, nko_4[] = {0x07c4,0};
+ static const UChar nko_1[] = {0x07c1,0}, nko_2[] = {0x07c2,0}, nko_3[] = {0x07c3,0}, nko_4[] = {0x07c4,0};
static const UChar* ustrings[] = { nko_1, nko_2, nko_3, nko_4 };
UEnumeration *u = uenum_openUCharStringsEnumeration(ustrings, 4, &status);
/* //! [uenum_openUCharStringsEnumeration] */