]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/cintltst/udatatst.c
ICU-62135.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / udatatst.c
index b0740dae1b32d972223ad102e0322cd3699887f1..d8d6ebd35346ed03fdd13ae60b6243c7fd9f296e 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /********************************************************************
  * COPYRIGHT: 
- * Copyright (c) 1998-2014, International Business Machines Corporation and
+ * Copyright (c) 1998-2016, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 /*
@@ -168,7 +170,7 @@ static void TestUDataOpen(){
       {
           int i;
           log_verbose("Testing udata_open() on %s\n", icuDataFilePath);
-          for(i=0; i<sizeof(memMap)/sizeof(memMap[0]); i++){
+          for(i=0; i<UPRV_LENGTHOF(memMap); i++){
             /* lots_of_mallocs(); */
             status=U_ZERO_ERROR;
             result=udata_open(path, memMap[i][1], memMap[i][0], &status);
@@ -208,7 +210,7 @@ static void TestUDataOpen(){
        {
          int i;
          log_verbose("Testing udata_open() on %s\n", icuDataFilePath);
-         for(i=0; i<sizeof(memMap)/sizeof(memMap[0]); i++){
+         for(i=0; i<UPRV_LENGTHOF(memMap); i++){
             /* lots_of_mallocs(); */
             status=U_ZERO_ERROR;
             result=udata_open(path, memMap[i][1], memMap[i][0], &status);
@@ -259,7 +261,7 @@ static void TestUDataOpen(){
         strcat(icuDataFilePath, dirSepString);
         strcat(icuDataFilePath, U_ICUDATA_NAME);
         log_verbose("Testing udata_open() on %s\n", icuDataFilePath);
-        for(i=0; i<sizeof(memMap)/sizeof(memMap[0]); i++){
+        for(i=0; i<UPRV_LENGTHOF(memMap); i++){
             status=U_ZERO_ERROR;
             result=udata_open(icuDataFilePath, memMap[i][1], memMap[i][0], &status);
             if(U_FAILURE(status)) {