]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/allcoll.cpp
ICU-59131.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / allcoll.cpp
index 2a9077198264b1ef53b13d20f8c076a31f3d5a36..4720d6390b29333185159db215d4e5e124155dd9 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-2003, 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 "allcoll.h"
+#include "cmemory.h"
 #include "sfwdchit.h"
 #include "../cintltst/calldata.h"
 
@@ -21,7 +24,7 @@ CollationDummyTest::CollationDummyTest()
 : myCollation(0)
 {
     /*UErrorCode status = U_ZERO_ERROR;
-    UnicodeString rules(TRUE, DEFAULTRULEARRAY, sizeof(DEFAULTRULEARRAY)/sizeof(DEFAULTRULEARRAY[0]));
+    UnicodeString rules(TRUE, DEFAULTRULEARRAY, UPRV_LENGTHOF(DEFAULTRULEARRAY));
     UnicodeString newRules("& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ");
     rules += newRules;
     myCollation = new RuleBasedCollator(rules, status);
@@ -35,7 +38,7 @@ CollationDummyTest::CollationDummyTest()
     }
     myCollation = new RuleBasedCollator(ruleset, status);
     if(U_FAILURE(status)){
-        errln("ERROR: in creation of rule based collator from ruleset");
+        errcheckln(status, "ERROR: in creation of rule based collator from ruleset - %s", u_errorName(status));
         delete myCollation;
         myCollation = 0;
     }
@@ -204,7 +207,7 @@ void CollationDummyTest::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 = "";
     }
 }