]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/icusvtst.cpp
ICU-57132.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / icusvtst.cpp
index 8418c3f1721901ebb277c5c1e96f23ef4c59d743..a9092855ac96ff1f9ac2c05932c9d3d6d8d9dc9f 100644 (file)
@@ -1,6 +1,6 @@
 /**
  *******************************************************************************
- * Copyright (C) 2001-2013, International Business Machines Corporation and
+ * Copyright (C) 2001-2016, International Business Machines Corporation and
  * others. All Rights Reserved.
  *******************************************************************************
  */
@@ -11,6 +11,7 @@
 
 #if !UCONFIG_NO_SERVICE
 
+#include "cmemory.h"
 #include "icusvtst.h"
 #include "servloc.h"
 #include <stdio.h>
@@ -671,7 +672,7 @@ ICUServiceTest::testAPI_Two()
             "en_US_SURFER_GAL",
             "en_US_SURFER_DUDE"
         };
-        int32_t count = sizeof(xids)/sizeof(UnicodeString);
+        int32_t count = UPRV_LENGTHOF(xids);
 
         ICUServiceFactory* f = new TestMultipleKeyStringFactory(xids, count, "Later");
         service.registerFactory(f, status);
@@ -729,7 +730,7 @@ ICUServiceTest::testAPI_Two()
             "en_US_SILICON", 
             "en_US_SILICON_GEEK",
         };
-        int32_t count = sizeof(xids)/sizeof(UnicodeString);
+        int32_t count = UPRV_LENGTHOF(xids);
 
         ICUServiceFactory* f = new TestMultipleKeyStringFactory(xids, count, "Rad dude");
         service.registerFactory(f, status);
@@ -930,7 +931,7 @@ ICUServiceTest::testRBF()
             CalifornioLanguageFactory::surfer, 
             CalifornioLanguageFactory::geek,
         };
-        int32_t count = sizeof(idNames)/sizeof(idNames[0]);
+        int32_t count = UPRV_LENGTHOF(idNames);
 
         for (int i = 0; i < count; ++i) {
             logln(UnicodeString("\n  --- ") + idNames[i] + " ---");