]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/cintltst/cgendtst.c
ICU-62135.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / cgendtst.c
index ff3131fefefdc33e3a64823c8e4441e15d6a9d9a..0e5340b174eecb456d92b6627a2dabf3fa5b1b31 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-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2014, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 /********************************************************************************
@@ -12,6 +14,7 @@
 /* C API TEST FOR GENDER INFO */
 
 #include "unicode/utypes.h"
+#include "cmemory.h"
 
 #if !UCONFIG_NO_FORMATTING
 
@@ -20,8 +23,6 @@
 
 static const UGender kAllFemale[] = {UGENDER_FEMALE, UGENDER_FEMALE};
 
-#define LENGTHOF(array) (int32_t)(sizeof(array) / sizeof((array)[0]))
-
 void addGendInfoForTest(TestNode** root);
 static void TestGenderInfo(void);
 
@@ -40,7 +41,7 @@ static void TestGenderInfo(void) {
     log_err_status(status, "Fail to create UGenderInfo - %s (Are you missing data?)", u_errorName(status));
     return;
   }
-  actual = ugender_getListGender(actual_gi, kAllFemale, LENGTHOF(kAllFemale), &status);
+  actual = ugender_getListGender(actual_gi, kAllFemale, UPRV_LENGTHOF(kAllFemale), &status);
   if (U_FAILURE(status)) {
     log_err("Fail to get gender of list - %s\n", u_errorName(status));
     return;