+// © 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.
********************************************************************/
/********************************************************************************
#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");
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]);