]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/encoll.cpp
ICU-59131.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / encoll.cpp
index abaeb561573ef015167db4c3b4b0b980056ed404..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-2006, 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++)
@@ -326,7 +329,7 @@ void CollationEnglishTest::runIndexedTest( int32_t index, UBool exec, const char
           default: name = ""; break;
       }
     } else {
-      errln("Collator couldn't be instantiated!");
+      dataerrln("Collator couldn't be instantiated!");
       name = "";
     }
 }