]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/cintltst/ccurrtst.c
ICU-59173.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / ccurrtst.c
index e79cfc7bd0604ddb663a68a6e7809a2b86604bd2..aa6f64471146c35f3b01dee0dc2304b9af9959e7 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) 1997-2001, International Business Machines Corporation and
+ * Copyright (c) 1997-2016, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 /********************************************************************************
@@ -27,9 +29,7 @@
 #include "unicode/ustring.h"
 #include "cmemory.h"
 
-#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0]) 
-
-void addCurrencyTest(TestNode** root)
+void addCurrencyCollTest(TestNode** root)
 {
     
     addTest(root, &currTest, "tscoll/ccurrtst/currTest");
@@ -111,15 +111,15 @@ void currTest()
     c = ucol_open("en_US", &status);
     if (U_FAILURE(status))
     {
-        log_err("collator open failed! :%s\n", myErrorName(status));
+        log_err_status(status, "collator open failed! :%s\n", myErrorName(status));
         return;
     }
 
     /*Compare each currency symbol against all the
      currency symbols, including itself*/
-    for (i = 0; i < ARRAY_LENGTH(currency); i += 1)
+    for (i = 0; i < UPRV_LENGTHOF(currency); i += 1)
     {
-        for (j = 0; j < ARRAY_LENGTH(currency); j += 1)
+        for (j = 0; j < UPRV_LENGTHOF(currency); j += 1)
         {
              u_strcpy(source, currency[i]);
              u_strcpy(target, currency[j]);