]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/cpdtrtst.cpp
ICU-551.41.tar.gz
[apple/icu.git] / icuSources / test / intltest / cpdtrtst.cpp
index e23ec1fd9101388ea8abb540a9aa4d6fbff86f1a..d6341d7f3e12a57a48527b9f259c39d576da8527 100644 (file)
@@ -1,6 +1,6 @@
 /***************************************************************************
 *
-*   Copyright (C) 2000-2003, International Business Machines
+*   Copyright (C) 2000-2009, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ************************************************************************
@@ -46,7 +46,7 @@ void CompoundTransliteratorTest::TestConstruction(){
    Transliterator* t3=Transliterator::createInstance(names[2], UTRANS_FORWARD, parseError, status);
    Transliterator* t4=Transliterator::createInstance(names[3], UTRANS_FORWARD, parseError, status);
    if(U_FAILURE(status)){
-       errln("Transliterator construction failed");
+       dataerrln("Transliterator construction failed - %s", u_errorName(status));
        return;
    }
 
@@ -117,7 +117,7 @@ void CompoundTransliteratorTest::TestCloneEqual(){
     UParseError parseError;
     CompoundTransliterator  *ct1=new CompoundTransliterator("Greek-Latin;Latin-Devanagari",parseError,status);
     if(U_FAILURE(status)){
-        errln("construction failed");
+        dataerrln("construction failed - %s", u_errorName(status));
         delete ct1;
         return;
     }
@@ -193,12 +193,17 @@ void CompoundTransliteratorTest::TestGetCount(){
     CompoundTransliterator *ct1=new CompoundTransliterator("Halfwidth-Fullwidth;Fullwidth-Halfwidth", parseError, status);
     CompoundTransliterator *ct2=new CompoundTransliterator("Any-Hex;Hex-Any;Cyrillic-Latin;Latin-Cyrillic", parseError, status);
     CompoundTransliterator *ct3=(CompoundTransliterator*)ct1;
+    if (U_FAILURE(status)) {
+        dataerrln("FAILED: CompoundTransliterator constructor failed - %s", u_errorName(status));
+        return;
+    }
     CompoundTransliterator *ct4=new CompoundTransliterator("Latin-Devanagari", parseError, status);
     CompoundTransliterator *ct5=new CompoundTransliterator(*ct4);
 
     if (U_FAILURE(status)) {
         errln("FAILED: CompoundTransliterator constructor failed");
-    } else
+        return;
+    }
     if(ct1->getCount() == ct2->getCount() || ct1->getCount() != ct3->getCount() || 
         ct2->getCount() == ct3->getCount() || 
         ct4->getCount() != ct5->getCount() || ct4->getCount() == ct1->getCount() ||
@@ -236,7 +241,7 @@ void CompoundTransliteratorTest::TestGetSetAdoptTransliterator(){
     UParseError parseError;
     CompoundTransliterator *ct1=new CompoundTransliterator(ID, parseError, status);
     if(U_FAILURE(status)){
-        errln("CompoundTransliterator construction failed");
+        dataerrln("CompoundTransliterator construction failed - %s", u_errorName(status));
         return;
     }
     int32_t count=ct1->getCount();
@@ -385,7 +390,7 @@ void CompoundTransliteratorTest::TestTransliterate(){
 
         CompoundTransliterator *ct2=new CompoundTransliterator(Data[i+0], parseError, status);
         if(U_FAILURE(status)){
-            errln("CompoundTransliterator construction failed for " + Data[i+0]);
+            dataerrln("CompoundTransliterator construction failed for " + Data[i+0] + " - " + u_errorName(status));
         } else {
             expect(*ct2, Data[i+1], Data[i+2]);
         }