From 2a60f0f8c8e3ec33f1f10b739b4027461cde8dc8 Mon Sep 17 00:00:00 2001 From: Ram Viswanadha Date: Tue, 2 Dec 2003 03:08:03 +0000 Subject: [PATCH] ICU-2679 fix TestUScript failures in modularized build X-SVN-Rev: 13936 --- .../ibm/icu/dev/test/lang/TestUScript.java | 117 +++++++++--------- 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/icu4j/src/com/ibm/icu/dev/test/lang/TestUScript.java b/icu4j/src/com/ibm/icu/dev/test/lang/TestUScript.java index 946e209ec50..f35fc569b70 100755 --- a/icu4j/src/com/ibm/icu/dev/test/lang/TestUScript.java +++ b/icu4j/src/com/ibm/icu/dev/test/lang/TestUScript.java @@ -46,26 +46,31 @@ public class TestUScript extends TestFmwk { }; int i =0; int numErrors =0; - try{ - for( ; i0 ){ - errln("Number of Errors in UScript.getCode() : " + numErrors); - } - }catch(MissingResourceException e){ - if (!noData()) { - warnln("Could not find locale data: " + e.getMessage()); + if((code[0] != expected[i])){ + logln("Error getting script code Got: " +code[0] + " Expected: " +expected[i] +" for name "+testNames[i]); + numErrors++; } } + if(numErrors >0 ){ + if(noData()){ + errln("Number of Errors in UScript.getCode() : " + numErrors); + }else{ + warnln("Could not find locale data"); + } + } + } public void TestMultipleCode(){ final String[] testNames = { "ja" ,"ko_KR","zh","zh_TW"}; @@ -75,30 +80,30 @@ public class TestUScript extends TestFmwk { {UScript.HAN}, {UScript.HAN,UScript.BOPOMOFO} }; - try{ - int numErrors = 0; - for(int i=0; i0 ){ - errln("Number of Errors in UScript.getCode() : " + numErrors); - } - }catch(MissingResourceException e){ - if (!noData()) { - warnln("Could not find locale data: " + e.getMessage()); + }else{ + numErrors++; } } + if(numErrors >0 ){ + if(noData()){ + errln("Number of Errors in UScript.getCode() : " + numErrors); + }else{ + warnln("Could not find locale data"); + } + } + } public void TestGetCode(){ @@ -145,32 +150,32 @@ public class TestUScript extends TestFmwk { }; int i =0; int numErrors =0; - try{ - for( ; i0 ){ - errln("Number of Errors in UScript.getCode() : " + numErrors); - } - }catch(MissingResourceException e){ - if (!noData()) { - warnln("Could not find locale data: " + e.getMessage()); + if((code[0] != expected[i])){ + logln("Error getting script code Got: " +code[0] + " Expected: " +expected[i] +" for name "+testNames[i]); + numErrors++; } } + if(numErrors >0 ){ + if (!noData()) { + warnln("Could not find locale data"); + }else{ + errln("Number of Errors in UScript.getCode() : " + numErrors); + } + } + } public void TestGetName(){