X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/51004dcb01e06fef634b61be77ed73dd61cb6db9..9f1b115531acc2f3640893f76e8bcf6680033062:/icuSources/test/cintltst/uenumtst.c diff --git a/icuSources/test/cintltst/uenumtst.c b/icuSources/test/cintltst/uenumtst.c index a1772898..6148470a 100644 --- a/icuSources/test/cintltst/uenumtst.c +++ b/icuSources/test/cintltst/uenumtst.c @@ -1,12 +1,14 @@ +// © 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 * @@ -206,7 +208,7 @@ static UEnumeration *getchArrayEnum(const char** source, int32_t size) { 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))) { @@ -277,7 +279,7 @@ static UEnumeration *getuchArrayEnum(const UChar** source, int32_t size) { 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))) { @@ -429,7 +431,7 @@ static void TestCharStringsEnumeration(void) { 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] */