]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/encoll.cpp
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / encoll.cpp
index a65968992f05b18909d85d75d3f567e11c361d34..fd913bf45241f77f74bd9ec85978727d6a7101be 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-2009, International Business Machines Corporation and
+ * Copyright (c) 1997-2016, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 
@@ -13,6 +15,7 @@
 #include "unicode/unistr.h"
 #include "unicode/sortkey.h"
 #include "encoll.h"
+#include "cmemory.h"
 
 CollationEnglishTest::CollationEnglishTest()
 : myCollation(0)
@@ -260,7 +263,7 @@ void CollationEnglishTest::TestTertiary(/* char* par */)
 
     //test more interesting cases
     Collator::EComparisonResult expected;
-    const int32_t testMoreSize = (int32_t)(sizeof(testMore) / sizeof(testMore[0]));
+    const int32_t testMoreSize = UPRV_LENGTHOF(testMore);
     for (i = 0; i < testMoreSize; i++)
     {
         for (j = 0; j < testMoreSize; j++)
@@ -299,7 +302,7 @@ void CollationEnglishTest::TestSecondary(/* char* par */)
     //test acute and grave ordering (compare to french collation)
     int32_t j;
     Collator::EComparisonResult expected;
-    const int32_t testAcuteSize = (int32_t)(sizeof(testAcute) / sizeof(testAcute[0]));
+    const int32_t testAcuteSize = UPRV_LENGTHOF(testAcute);
     for (i = 0; i < testAcuteSize; i++)
     {
         for (j = 0; j < testAcuteSize; j++)