ICU-2836 fix compiler warnings
X-SVN-Rev: 11924
This commit is contained in:
parent
ac4e766a89
commit
d4908857e2
@ -5,24 +5,19 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/ModuleTest.java,v $
|
||||
* $Date: 2003/02/05 05:45:15 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ibm.icu.dev.test.TestDataModule.TestData;
|
||||
import com.ibm.icu.dev.test.TestDataModule.DataMap;
|
||||
import com.ibm.icu.dev.test.TestFmwk.MethodTarget;
|
||||
import com.ibm.icu.dev.test.TestFmwk.Target;
|
||||
|
||||
/**
|
||||
* A convenience extension of TestFmwk for use by data module-driven
|
||||
|
@ -5,29 +5,25 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/TestFmwk.java,v $
|
||||
* $Date: 2003/02/24 20:05:14 $
|
||||
* $Revision: 1.42 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.43 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.text.*;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Writer;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
import java.util.TreeMap;
|
||||
import java.util.TreeSet;
|
||||
import java.util.Vector;
|
||||
|
||||
|
||||
/**
|
||||
* TestFmwk is a base class for tests that can be run conveniently from
|
||||
@ -500,7 +496,7 @@ public class TestFmwk extends AbstractTestLog {
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
String target = (String)targets.get(i);
|
||||
//String target = (String)targets.get(i);
|
||||
params.init();
|
||||
resolveTarget(params, (String)targets.get(i)).run();
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
/* Options: Binary Comments Crossref Format Java Logo Trace1 Verbose3 */
|
||||
package com.ibm.icu.dev.test.bigdec;
|
||||
import java.math.BigInteger;
|
||||
import com.ibm.icu.math.*;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
@ -5,18 +5,16 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/calendar/CalendarRegression.java,v $
|
||||
* $Date: 2002/11/20 19:48:10 $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2003/05/14 19:02:52 $
|
||||
* $Revision: 1.15 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
import com.ibm.icu.util.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
|
||||
/**
|
||||
@ -443,14 +441,14 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
Calendar cal1 = new GregorianCalendar(PST);
|
||||
cal1.setTime(new Date(880698639000L));
|
||||
int p;
|
||||
logln("PST 1 is: " + (p=cal1.get(cal1.HOUR_OF_DAY)));
|
||||
logln("PST 1 is: " + (p=cal1.get(Calendar.HOUR_OF_DAY)));
|
||||
cal1.setTimeZone(GMT);
|
||||
// Issue 1: Changing the timezone doesn't change the
|
||||
// represented time.
|
||||
int h1,h2;
|
||||
logln("GMT 1 is: " + (h1=cal1.get(cal1.HOUR_OF_DAY)));
|
||||
logln("GMT 1 is: " + (h1=cal1.get(Calendar.HOUR_OF_DAY)));
|
||||
cal1.setTime(new Date(880698639000L));
|
||||
logln("GMT 2 is: " + (h2=cal1.get(cal1.HOUR_OF_DAY)));
|
||||
logln("GMT 2 is: " + (h2=cal1.get(Calendar.HOUR_OF_DAY)));
|
||||
// Note: This test had a bug in it. It wanted h1!=h2, when
|
||||
// what was meant was h1!=p. Fixed this concurrent with fix
|
||||
// to 4177484.
|
||||
@ -462,12 +460,12 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
cal2.set(Calendar.MILLISECOND, 0);
|
||||
cal3.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
cal2.set(cal1.get(cal1.YEAR),
|
||||
cal1.get(cal1.MONTH),
|
||||
cal1.get(cal1.DAY_OF_MONTH),
|
||||
cal1.get(cal1.HOUR_OF_DAY),
|
||||
cal1.get(cal1.MINUTE),
|
||||
cal1.get(cal1.SECOND));
|
||||
cal2.set(cal1.get(Calendar.YEAR),
|
||||
cal1.get(Calendar.MONTH),
|
||||
cal1.get(Calendar.DAY_OF_MONTH),
|
||||
cal1.get(Calendar.HOUR_OF_DAY),
|
||||
cal1.get(Calendar.MINUTE),
|
||||
cal1.get(Calendar.SECOND));
|
||||
|
||||
long t1,t2,t3,t4;
|
||||
logln("RGMT 1 is: " + (t1=cal2.getTime().getTime()));
|
||||
@ -475,12 +473,12 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln("RPST 1 is: " + (t2=cal3.getTime().getTime()));
|
||||
cal3.setTimeZone(GMT);
|
||||
logln("RGMT 2 is: " + (t3=cal3.getTime().getTime()));
|
||||
cal3.set(cal1.get(cal1.YEAR),
|
||||
cal1.get(cal1.MONTH),
|
||||
cal1.get(cal1.DAY_OF_MONTH),
|
||||
cal1.get(cal1.HOUR_OF_DAY),
|
||||
cal1.get(cal1.MINUTE),
|
||||
cal1.get(cal1.SECOND));
|
||||
cal3.set(cal1.get(Calendar.YEAR),
|
||||
cal1.get(Calendar.MONTH),
|
||||
cal1.get(Calendar.DAY_OF_MONTH),
|
||||
cal1.get(Calendar.HOUR_OF_DAY),
|
||||
cal1.get(Calendar.MINUTE),
|
||||
cal1.get(Calendar.SECOND));
|
||||
// Issue 2: Calendar continues to use the timezone in its
|
||||
// constructor for set() conversions, regardless
|
||||
// of calls to setTimeZone()
|
||||
|
@ -3,15 +3,13 @@
|
||||
* others. All Rights Reserved.
|
||||
*********************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/calendar/ChineseTest.java,v $
|
||||
* $Date: 2003/02/27 21:38:42 $
|
||||
* $Revision: 1.10 $
|
||||
* $Date: 2003/05/14 19:02:52 $
|
||||
* $Revision: 1.11 $
|
||||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
import com.ibm.icu.util.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Test of ChineseCalendar.
|
||||
|
@ -5,16 +5,16 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/calendar/CompatibilityTest.java,v $
|
||||
* $Date: 2003/03/17 17:14:48 $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2003/05/14 19:02:52 $
|
||||
* $Revision: 1.10 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
import com.ibm.icu.util.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.text.*;
|
||||
import java.io.*;
|
||||
|
||||
public class CompatibilityTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@ -690,23 +690,23 @@ public class CompatibilityTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
GregorianCalendar temp = new GregorianCalendar( y, m, d );
|
||||
check520(temp, y, m, d);
|
||||
|
||||
temp.add( temp.YEAR, 1 );
|
||||
temp.add( Calendar.YEAR, 1 );
|
||||
y++;
|
||||
check520(temp, y, m, d);
|
||||
|
||||
temp.add( temp.MONTH, 1 );
|
||||
temp.add( Calendar.MONTH, 1 );
|
||||
m++;
|
||||
check520(temp, y, m, d);
|
||||
|
||||
temp.add( temp.DATE, 1 );
|
||||
temp.add( Calendar.DATE, 1 );
|
||||
d++;
|
||||
check520(temp, y, m, d);
|
||||
|
||||
temp.add( temp.DATE, 2 );
|
||||
temp.add( Calendar.DATE, 2 );
|
||||
d += 2;
|
||||
check520(temp, y, m, d);
|
||||
|
||||
temp.add( temp.DATE, 28 );
|
||||
temp.add( Calendar.DATE, 28 );
|
||||
d = 1; ++m;
|
||||
check520(temp, y, m, d);
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/calendar/HebrewTest.java,v $
|
||||
* $Date: 2003/02/27 18:48:38 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2003/05/14 19:02:52 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -371,16 +371,25 @@ public class HebrewTest extends CalendarTest {
|
||||
{
|
||||
// new HebrewCalendar(TimeZone)
|
||||
HebrewCalendar cal = new HebrewCalendar(TimeZone.getDefault());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create HebrewCalendar with TimeZone");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new HebrewCalendar(Locale)
|
||||
HebrewCalendar cal = new HebrewCalendar(Locale.getDefault());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create HebrewCalendar with locale");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new HebrewCalendar(Date)
|
||||
HebrewCalendar cal = new HebrewCalendar(new Date());
|
||||
if(cal == null){
|
||||
errln("could not create HebrewCalendar with date");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/calendar/HolidayTest.java,v $
|
||||
* $Date: 2002/12/18 21:20:52 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:02:52 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -18,7 +18,6 @@ import java.util.Locale;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.EasterHoliday;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
@ -26,7 +25,6 @@ import com.ibm.icu.util.Holiday;
|
||||
import com.ibm.icu.util.RangeDateRule;
|
||||
import com.ibm.icu.util.SimpleDateRule;
|
||||
import com.ibm.icu.util.SimpleHoliday;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
/**
|
||||
* Tests for the <code>Holiday</code> class.
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java,v $
|
||||
* $Date: 2003/05/09 18:46:44 $
|
||||
* $Revision: 1.17 $
|
||||
* $Date: 2003/05/14 19:02:51 $
|
||||
* $Revision: 1.18 $
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
@ -200,32 +200,50 @@ public class IBMCalendarTest extends CalendarTest {
|
||||
{
|
||||
// new BuddhistCalendar(TimeZone)
|
||||
BuddhistCalendar cal = new BuddhistCalendar(TimeZone.getDefault());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create BuddhistCalendar with TimeZone");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new BuddhistCalendar(Locale)
|
||||
BuddhistCalendar cal = new BuddhistCalendar(Locale.getDefault());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create BuddhistCalendar with Locale");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new BuddhistCalendar(TimeZone, Locale)
|
||||
BuddhistCalendar cal = new BuddhistCalendar(TimeZone.getDefault(), Locale.getDefault());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create BuddhistCalendar with TimeZone and Locale");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new BuddhistCalendar(Date)
|
||||
BuddhistCalendar cal = new BuddhistCalendar(new Date());
|
||||
if(cal == null){
|
||||
errln("could not create BuddhistCalendar with Date");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new BuddhistCalendar(int year, int month, int date)
|
||||
BuddhistCalendar cal = new BuddhistCalendar(2543, Calendar.MAY, 22);
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create BuddhistCalendar with year,month,data");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new BuddhistCalendar(int year, int month, int date, int hour, int minute, int second)
|
||||
BuddhistCalendar cal = new BuddhistCalendar(2543, Calendar.MAY, 22, 1, 1, 1);
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create BuddhistCalendar with year,month,date,hour,minute,second");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// data
|
||||
@ -340,6 +358,9 @@ public class IBMCalendarTest extends CalendarTest {
|
||||
public void TestMalaysianInstance() {
|
||||
Locale loc = new Locale("ms", "MY"); // Malay (Malaysia)
|
||||
Calendar cal = Calendar.getInstance(loc);
|
||||
if(cal == null){
|
||||
errln("could not create Malaysian instance");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -453,10 +474,10 @@ public class IBMCalendarTest extends CalendarTest {
|
||||
public void TestCoverage() {
|
||||
// BuddhistCalendar
|
||||
BuddhistCalendar bcal = new BuddhistCalendar();
|
||||
int i = bcal.getMinimum(Calendar.ERA);
|
||||
/*int i =*/ bcal.getMinimum(Calendar.ERA);
|
||||
bcal.add(Calendar.YEAR, 1);
|
||||
bcal.add(Calendar.MONTH, 1);
|
||||
Date d = bcal.getTime();
|
||||
/*Date d = */bcal.getTime();
|
||||
|
||||
// CalendarAstronomer
|
||||
// (This class should probably be made package-private.)
|
||||
@ -470,6 +491,6 @@ public class IBMCalendarTest extends CalendarTest {
|
||||
ccal.add(Calendar.YEAR, 1);
|
||||
ccal.roll(Calendar.MONTH, 1);
|
||||
ccal.roll(Calendar.YEAR, 1);
|
||||
d = ccal.getTime();
|
||||
ccal.getTime();
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/calendar/IslamicTest.java,v $
|
||||
* $Date: 2002/08/07 03:10:18 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2003/05/14 19:02:52 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -143,27 +143,42 @@ public class IslamicTest extends CalendarTest {
|
||||
{
|
||||
// new IslamicCalendar(TimeZone)
|
||||
IslamicCalendar cal = new IslamicCalendar(TimeZone.getDefault());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create IslamicCalendar with TimeZone");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new IslamicCalendar(Locale)
|
||||
IslamicCalendar cal = new IslamicCalendar(Locale.getDefault());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create IslamicCalendar with Locale");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new IslamicCalendar(Date)
|
||||
IslamicCalendar cal = new IslamicCalendar(new Date());
|
||||
if(cal == null){
|
||||
errln("could not create IslamicCalendar with Date");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new IslamicCalendar(int year, int month, int date)
|
||||
IslamicCalendar cal = new IslamicCalendar(800, IslamicCalendar.RAMADAN, 1);
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create IslamicCalendar with year,month,date");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new IslamicCalendar(int year, int month, int date, int hour, int minute, int second)
|
||||
IslamicCalendar cal = new IslamicCalendar(800, IslamicCalendar.RAMADAN, 1, 1, 1, 1);
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create IslamicCalendar with year,month,date,hour,minute,second");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// setCivil/isCivil
|
||||
@ -184,9 +199,9 @@ public class IslamicTest extends CalendarTest {
|
||||
|
||||
logln(then.toString());
|
||||
|
||||
cal.add(cal.MONTH, 1);
|
||||
cal.add(cal.DAY_OF_MONTH, 1);
|
||||
cal.add(cal.YEAR, 1);
|
||||
cal.add(Calendar.MONTH, 1);
|
||||
cal.add(Calendar.DAY_OF_MONTH, 1);
|
||||
cal.add(Calendar.YEAR, 1);
|
||||
|
||||
logln(cal.getTime().toString());
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/calendar/JapaneseTest.java,v $
|
||||
* $Date: 2002/08/08 23:06:09 $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2003/05/14 19:02:52 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -33,50 +33,71 @@ public class JapaneseTest extends CalendarTest {
|
||||
{
|
||||
// new JapaneseCalendar(TimeZone)
|
||||
JapaneseCalendar cal = new JapaneseCalendar(TimeZone.getDefault());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create JapaneseCalendar with TimeZone");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new JapaneseCalendar(Locale)
|
||||
JapaneseCalendar cal = new JapaneseCalendar(Locale.getDefault());
|
||||
if(cal == null){
|
||||
errln("could not create JapaneseCalendar with Locale");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new JapaneseCalendar(TimeZone, Locale)
|
||||
JapaneseCalendar cal = new JapaneseCalendar(TimeZone.getDefault(), Locale.getDefault());
|
||||
if(cal == null){
|
||||
errln("could not create JapaneseCalendar with TimeZone Locale");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new JapaneseCalendar(Date)
|
||||
JapaneseCalendar cal = new JapaneseCalendar(new Date());
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create JapaneseCalendar with Date");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new JapaneseCalendar(int year, int month, int date)
|
||||
JapaneseCalendar cal = new JapaneseCalendar(1868, Calendar.JANUARY, 1);
|
||||
if(cal == null){
|
||||
errln("could not create JapaneseCalendar with year,month,date");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new JapaneseCalendar(int era, int year, int month, int date)
|
||||
JapaneseCalendar cal = new JapaneseCalendar(JapaneseCalendar.MEIJI, 43, Calendar.JANUARY, 1);
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create JapaneseCalendar with era,year,month,date");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// new JapaneseCalendar(int year, int month, int date, int hour, int minute, int second)
|
||||
JapaneseCalendar cal = new JapaneseCalendar(1868, Calendar.JANUARY, 1, 1, 1, 1);
|
||||
}
|
||||
if(cal == null){
|
||||
errln("could not create JapaneseCalendar with year,month,date,hour,min,second");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// limits
|
||||
JapaneseCalendar cal = new JapaneseCalendar();
|
||||
DateFormat fmt = cal.getDateTimeFormat(DateFormat.FULL, DateFormat.FULL, Locale.ENGLISH);
|
||||
|
||||
cal.set(cal.ERA, cal.MEIJI);
|
||||
cal.set(Calendar.ERA, JapaneseCalendar.MEIJI);
|
||||
logln("date: " + cal.getTime());
|
||||
logln("min era: " + cal.getMinimum(cal.ERA));
|
||||
logln("min year: " + cal.getMinimum(cal.YEAR));
|
||||
cal.set(cal.YEAR, cal.getActualMaximum(cal.YEAR));
|
||||
logln("min era: " + cal.getMinimum(Calendar.ERA));
|
||||
logln("min year: " + cal.getMinimum(Calendar.YEAR));
|
||||
cal.set(Calendar.YEAR, cal.getActualMaximum(Calendar.YEAR));
|
||||
logln("date: " + fmt.format(cal.getTime()));
|
||||
cal.add(cal.YEAR, 1);
|
||||
cal.add(Calendar.YEAR, 1);
|
||||
logln("date: " + fmt.format(cal.getTime()));
|
||||
}
|
||||
|
||||
|
@ -1632,7 +1632,7 @@ public class CollationMiscTest extends TestFmwk{
|
||||
CollationKey key1 = coll.getCollationKey(tokens[i]);
|
||||
for (int j = 0; j < i; j ++) {
|
||||
CollationKey key2 = coll.getCollationKey(tokens[j]);
|
||||
if (key2.compareTo(key2) < 0) {
|
||||
if (key2.compareTo(key1) < 0) {
|
||||
errln("Setting variable top shouldn't change the comparison sequence");
|
||||
}
|
||||
byte sortorder[] = key2.toByteArray();
|
||||
@ -1644,7 +1644,7 @@ public class CollationMiscTest extends TestFmwk{
|
||||
} catch (Exception e) {
|
||||
CollationElementIterator iter
|
||||
= coll.getCollationElementIterator(tokens[i]);
|
||||
int ce = iter.next();
|
||||
/*int ce =*/ iter.next();
|
||||
int ce2 = iter.next();
|
||||
if (ce2 == CollationElementIterator.NULLORDER) {
|
||||
errln("Token " + tokens[i] + " not expected to fail");
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/collator/CollationServiceTest.java,v $
|
||||
* $Date: 2003/04/21 21:00:23 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -169,7 +169,7 @@ public class CollationServiceTest extends TestFmwk {
|
||||
fuFUNames.put(Locale.US, "little bunny Foo Foo");
|
||||
|
||||
Collator frcol = Collator.getInstance(Locale.FRANCE);
|
||||
Collator uscol = Collator.getInstance(Locale.US);
|
||||
/* Collator uscol = */Collator.getInstance(Locale.US);
|
||||
Collator gecol = Collator.getInstance(Locale.GERMANY);
|
||||
Collator jpcol = Collator.getInstance(Locale.JAPAN);
|
||||
Collator fucol = Collator.getInstance(fu_FU);
|
||||
|
@ -5,14 +5,13 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/compression/DecompressionTest.java,v $
|
||||
* $Date: 2002/02/16 03:05:07 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:19 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.compression;
|
||||
|
||||
import com.ibm.icu.text.UnicodeCompressor;
|
||||
import com.ibm.icu.text.UnicodeDecompressor;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
|
||||
|
@ -5,19 +5,17 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/BigNumberFormatTest.java,v $
|
||||
* $Date: 2002/02/25 22:43:59 $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.15 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.math.BigInteger;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
/**
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/DateFormatMiscTests.java,v $
|
||||
* $Date: 2002/02/16 03:05:08 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2003/05/14 19:03:15 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,9 +17,7 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/DateFormatRegressionTest.java,v $
|
||||
* $Date: 2002/03/10 19:40:13 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,8 +17,6 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
|
||||
@ -29,7 +27,6 @@ import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* Performs regression test for DateFormat
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/DateFormatRegressionTestJ.java,v $
|
||||
* $Date: 2002/02/16 03:05:08 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:15 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -16,14 +16,12 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Date;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Locale;
|
||||
import java.text.FieldPosition;
|
||||
|
||||
public class DateFormatRegressionTestJ extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
@ -73,7 +71,7 @@ public class DateFormatRegressionTestJ extends com.ibm.icu.dev.test.TestFmwk {
|
||||
//DateFormat getDateTimeInstance(int, int), invalid styles no exception
|
||||
public void Test4213086() {
|
||||
Date someDate = new Date();
|
||||
String d;
|
||||
String d=null;
|
||||
try {
|
||||
DateFormat df2 = DateFormat.getDateTimeInstance(2, -2);
|
||||
d = df2.format(someDate);
|
||||
@ -112,6 +110,10 @@ public class DateFormatRegressionTestJ extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln("Exception caught!");
|
||||
logln("********************************************");
|
||||
}
|
||||
//read the value in d to get rid of the warning
|
||||
if(d!=null){
|
||||
logln("The value of d: " + d);
|
||||
}
|
||||
}
|
||||
|
||||
//DateFormat.format works wrongly?
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/DateFormatRoundTripTest.java,v $
|
||||
* $Date: 2002/02/16 03:05:08 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:15 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,7 +17,6 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/DateFormatTest.java,v $
|
||||
* $Date: 2003/04/24 22:59:13 $
|
||||
* $Revision: 1.15 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.16 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,7 +17,6 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import com.ibm.icu.impl.*;
|
||||
@ -208,16 +207,16 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
dateFormats[2] = new SimpleDateFormat("G, y, M, d, k, H, m, s, S, E, D, F, w, W, a, h, K, z, y, E", Locale.US);
|
||||
dateFormats[3] = new SimpleDateFormat("GGGG, yyyy, MMMM, dddd, kkkk, HHHH, mmmm, ssss, SSSS, EEEE, DDDD, FFFF, wwww, WWWW, aaaa, hhhh, KKKK, zzzz, yyyy, EEEE", Locale.US);
|
||||
//fix the jdk resources differences between jdk 1.2 and jdk 1.3
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
// String javaVersion = System.getProperty("java.version");
|
||||
|
||||
for (j = 0, exp = 0; j < dateFormats_length; ++j) {
|
||||
String str;
|
||||
// String str;
|
||||
DateFormat df = dateFormats[j];
|
||||
TimeZone tz = TimeZone.getTimeZone("PST");
|
||||
((SimpleTimeZone)tz).setDSTSavings(3600000);
|
||||
df.setTimeZone(tz);
|
||||
logln(" Pattern = " + ((SimpleDateFormat) df).toPattern());
|
||||
str = "";
|
||||
// str = "";
|
||||
try {
|
||||
logln(" Result = " + df.format(someDate));
|
||||
} catch (Exception e) {
|
||||
@ -900,11 +899,14 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln("time: " + f.format(now));
|
||||
|
||||
int hash = f.hashCode(); // sigh, everyone overrides this
|
||||
|
||||
|
||||
f = DateFormat.getInstance(cal);
|
||||
if(hash == f.hashCode()){
|
||||
errln("FAIL: hashCode equal for inequal objects");
|
||||
}
|
||||
logln("time again: " + f.format(now));
|
||||
|
||||
f = DateFormat.getTimeInstance(cal, f.FULL);
|
||||
f = DateFormat.getTimeInstance(cal, DateFormat.FULL);
|
||||
logln("time yet again: " + f.format(now));
|
||||
|
||||
ResourceBundle rb = ICULocaleData.getLocaleElements("de_DE");
|
||||
|
@ -1,7 +1,7 @@
|
||||
/***************************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestDateFormat.java,v $
|
||||
* $Date: 2002/08/01 20:27:21 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2003/05/14 19:03:15 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -24,9 +24,7 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
@ -143,7 +141,7 @@ public class IntlTestDateFormat extends com.ibm.icu.dev.test.TestFmwk {
|
||||
SimpleDateFormat s = (SimpleDateFormat) fFormat;
|
||||
logln(fTestName + " Pattern " + s.toPattern());
|
||||
}
|
||||
|
||||
|
||||
private void tryDate(Date theDate) {
|
||||
final int DEPTH = 10;
|
||||
Date[] date = new Date[DEPTH];
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestDateFormatAPI.java,v $
|
||||
* $Date: 2002/08/01 20:27:21 $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
**/
|
||||
@ -25,7 +25,6 @@
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.util.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import java.util.Locale;
|
||||
import java.util.Date;
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestDateFormatAPIC.java,v $
|
||||
* $Date: 2002/02/16 03:05:10 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,9 +17,7 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Date;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
@ -109,6 +107,9 @@ public class IntlTestDateFormatAPIC extends com.ibm.icu.dev.test.TestFmwk {
|
||||
Number obj = fmt.parse(str, ppos);
|
||||
try {
|
||||
obj = fmt.parse(str);
|
||||
if(obj==null){
|
||||
errln("FAIL: The format object could parse the string : "+str);
|
||||
}
|
||||
} catch (java.text.ParseException pe) {
|
||||
System.out.println(pe);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestDateFormatSymbols.java,v $
|
||||
* $Date: 2002/08/01 20:27:21 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
**/
|
||||
@ -25,9 +25,7 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
|
||||
public class IntlTestDateFormatSymbols extends com.ibm.icu.dev.test.TestFmwk
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatAPIC.java,v $
|
||||
* $Date: 2002/02/16 03:05:10 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,11 +17,9 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
import java.text.ParsePosition;
|
||||
import java.text.Format;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import java.text.FieldPosition;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatSymbols.java,v $
|
||||
* $Date: 2002/08/01 20:27:21 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
**/
|
||||
@ -25,11 +25,8 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
import java.text.FieldPosition;
|
||||
|
||||
public class IntlTestDecimalFormatSymbols extends com.ibm.icu.dev.test.TestFmwk
|
||||
{
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatSymbolsC.java,v $
|
||||
* $Date: 2002/02/16 03:05:11 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -18,9 +18,7 @@
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import java.text.FieldPosition;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
|
||||
/**
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestNumberFormat.java,v $
|
||||
* $Date: 2002/02/16 03:05:11 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,9 +17,7 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
|
||||
/**
|
||||
* This test does round-trip testing (format -> parse -> format -> parse -> etc.) of
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestNumberFormatAPI.java,v $
|
||||
* $Date: 2002/08/01 20:27:21 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:15 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
**/
|
||||
@ -24,9 +24,7 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/IntlTestSimpleDateFormatAPI.java,v $
|
||||
* $Date: 2002/02/16 03:05:11 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:15 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
**/
|
||||
@ -29,8 +29,6 @@ attribution to Taligent may not be removed.
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.util.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import java.util.Locale;
|
||||
import java.util.Date;
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/NumberFormatRegressionTest.java,v $
|
||||
* $Date: 2002/02/16 03:05:11 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:15 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,7 +17,6 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/NumberFormatRoundTripTest.java,v $
|
||||
* $Date: 2002/02/16 03:05:12 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,9 +17,7 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
|
@ -4,8 +4,8 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/NumberFormatTest.java,v $
|
||||
* $Date: 2003/04/19 06:32:17 $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -17,14 +17,12 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.text.NumberFormat.*;
|
||||
import com.ibm.icu.util.*;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.text.ParsePosition;
|
||||
import java.text.ParseException;
|
||||
import java.text.FieldPosition;
|
||||
|
||||
public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/NumberRegression.java,v $
|
||||
* $Date: 2003/04/19 05:51:09 $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2003/05/14 19:03:14 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
**/
|
||||
@ -263,9 +263,9 @@ public class NumberRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
public void Test4068693()
|
||||
{
|
||||
logln("----- Test Application -----");
|
||||
ParsePosition pos;
|
||||
//ParsePosition pos;
|
||||
DecimalFormat df = new DecimalFormat();
|
||||
Number d = df.parse("123.55456", pos=new ParsePosition(0));
|
||||
Number d = df.parse("123.55456", new ParsePosition(0));
|
||||
if (!d.toString().equals("123.55456")) {
|
||||
errln("Result -> " + d.doubleValue());
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/RbnfRoundTripTest.java,v $
|
||||
* $Date: 2002/02/22 03:43:32 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:15 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -16,7 +16,6 @@ import com.ibm.icu.text.RuleBasedNumberFormat;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
public class RbnfRoundTripTest extends TestFmwk {
|
||||
/**
|
||||
|
@ -4,15 +4,14 @@
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/WriteNumberFormatSerialTestData.java,v $
|
||||
* $Date: 2002/02/22 00:28:11 $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import java.util.Locale;
|
||||
import java.io.*;
|
||||
@ -28,8 +27,8 @@ public class WriteNumberFormatSerialTestData {
|
||||
" * others. All Rights Reserved. *\n"+
|
||||
" *******************************************************************************\n"+
|
||||
" * $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/format/WriteNumberFormatSerialTestData.java,v $\n"+
|
||||
" * $Date: 2002/02/22 00:28:11 $\n"+
|
||||
" * $Revision: 1.1 $\n"+
|
||||
" * $Date: 2003/05/14 19:03:16 $\n"+
|
||||
" * $Revision: 1.2 $\n"+
|
||||
" *\n"+
|
||||
" *****************************************************************************************\n"+
|
||||
" */\n\n"+
|
||||
@ -71,7 +70,7 @@ public class WriteNumberFormatSerialTestData {
|
||||
os.flush();
|
||||
os.close();
|
||||
byte[] myArr = bts.toByteArray();
|
||||
String temp = new String(myArr);
|
||||
//String temp = new String(myArr);
|
||||
System.out.println(" "+comment+ " :");
|
||||
/*System.out.println("minimumIntegerDigits : " + (temp.indexOf("minimumIntegerDigits")+"minimumIntegerDigits".length()));
|
||||
System.out.println("maximumIntegerDigits : " + (temp.indexOf("maximumIntegerDigits")+"maximumIntegerDigits".length()));
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/iterator/TestUCharacterIterator.java,v $
|
||||
* $Date: 2002/11/22 00:21:03 $
|
||||
* $Revision: 1.8 $
|
||||
* $Date: 2003/05/14 19:03:19 $
|
||||
* $Revision: 1.9 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -14,6 +14,7 @@ package com.ibm.icu.dev.test.iterator;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.text.UCharacterIterator;
|
||||
import com.ibm.icu.text.UForwardCharacterIterator;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.text.ReplaceableString;
|
||||
import com.ibm.icu.impl.UnicodeCharacterIterator;
|
||||
@ -478,13 +479,13 @@ public class TestUCharacterIterator extends TestFmwk{
|
||||
int ch;
|
||||
// this should never go into a infinite loop
|
||||
// if it does then we have a problem
|
||||
while((ch=iter1.previousCodePoint())!=iter.DONE_CODEPOINT){
|
||||
while((ch=iter1.previousCodePoint())!=UnicodeCharacterIterator.DONE_CODEPOINT){
|
||||
if(ch!=0xDc00){
|
||||
errln("iter.previousCodePoint() failed");
|
||||
}
|
||||
}
|
||||
iter1.setIndex(5);
|
||||
while((ch=iter1.nextCodePoint()) !=iter.DONE_CODEPOINT){
|
||||
while((ch=iter1.nextCodePoint()) !=UnicodeCharacterIterator.DONE_CODEPOINT){
|
||||
if(ch!= 0xDC03){
|
||||
errln("iter.nextCodePoint() failed");
|
||||
}
|
||||
@ -570,13 +571,13 @@ public class TestUCharacterIterator extends TestFmwk{
|
||||
int ch;
|
||||
// this should never go into a infinite loop
|
||||
// if it does then we have a problem
|
||||
while((ch=iter.previousCodePoint())!=iter.DONE){
|
||||
while((ch=iter.previousCodePoint())!=UCharacterIterator.DONE){
|
||||
if(ch!=0xDc00){
|
||||
errln("iter.previousCodePoint() failed");
|
||||
}
|
||||
}
|
||||
iter.setIndex(5);
|
||||
while((ch=iter.nextCodePoint()) !=iter.DONE){
|
||||
while((ch=iter.nextCodePoint()) !=UForwardCharacterIterator.DONE){
|
||||
if(ch!= 0xDC03){
|
||||
errln("iter.nextCodePoint() failed");
|
||||
}
|
||||
|
@ -8,10 +8,7 @@
|
||||
package com.ibm.icu.dev.test.lang;
|
||||
|
||||
import com.ibm.icu.lang.UScript;
|
||||
import com.ibm.icu.lang.UScriptRun;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.TestUtil;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
@ -313,8 +310,8 @@ public class TestUScript extends TestFmwk{
|
||||
}
|
||||
public void TestAllCodepoints(){
|
||||
int code;
|
||||
String oldId="";
|
||||
String oldAbbrId="";
|
||||
//String oldId="";
|
||||
//String oldAbbrId="";
|
||||
for( int i =0; i <= 0x10ffff; i++){
|
||||
code =UScript.INVALID_CODE;
|
||||
code = UScript.getScript(i);
|
||||
|
@ -186,6 +186,9 @@ public class TestUScriptRun extends TestFmwk
|
||||
errln("new UScriptRun(dummy, -100, 0) did not produce an IllegalArgumentException!");
|
||||
} catch (IllegalArgumentException iae) {
|
||||
}
|
||||
if(scriptRun!=null){
|
||||
errln("Did not get the expected Exception");
|
||||
}
|
||||
}
|
||||
|
||||
public void TestReset()
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterTest.java,v $
|
||||
* $Date: 2003/04/04 19:37:00 $
|
||||
* $Revision: 1.54 $
|
||||
* $Date: 2003/05/14 19:03:16 $
|
||||
* $Revision: 1.55 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -29,8 +29,6 @@ import com.ibm.icu.impl.UCharacterName;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.impl.USerializedSet;
|
||||
import com.ibm.icu.impl.NormalizerImpl;
|
||||
import com.ibm.icu.text.Normalizer;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.util.Arrays;
|
||||
|
||||
@ -1926,7 +1924,7 @@ public final class UCharacterTest extends TestFmwk
|
||||
}
|
||||
/* add characters from a serialized set to a normal one */
|
||||
private static void _setAddSerialized(UnicodeSet set, USerializedSet sset) {
|
||||
int start, end;
|
||||
// int start, end;
|
||||
int i, count;
|
||||
|
||||
count=sset.countSerializedRanges();
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/normalizer/BasicTest.java,v $
|
||||
* $Date: 2003/04/10 08:02:00 $
|
||||
* $Revision: 1.28 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.29 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -629,13 +629,13 @@ public class BasicTest extends TestFmwk {
|
||||
|
||||
// Run through the iterator forwards and stick it into a StringBuffer
|
||||
StringBuffer forward = new StringBuffer();
|
||||
for (int ch = iter.first(); ch != iter.DONE; ch = iter.next()) {
|
||||
for (int ch = iter.first(); ch != Normalizer.DONE; ch = iter.next()) {
|
||||
forward.append(ch);
|
||||
}
|
||||
|
||||
// Now do it backwards
|
||||
StringBuffer reverse = new StringBuffer();
|
||||
for (int ch = iter.last(); ch != iter.DONE; ch = iter.previous()) {
|
||||
for (int ch = iter.last(); ch != Normalizer.DONE; ch = iter.previous()) {
|
||||
reverse.insert(0, ch);
|
||||
}
|
||||
|
||||
@ -657,13 +657,13 @@ public class BasicTest extends TestFmwk {
|
||||
// Run through the iterator forwards and stick it into a
|
||||
// StringBuffer
|
||||
StringBuffer forward = new StringBuffer();
|
||||
for (int ch = iter.first(); ch != iter.DONE; ch = iter.next()) {
|
||||
for (int ch = iter.first(); ch != Normalizer.DONE; ch = iter.next()) {
|
||||
forward.append(ch);
|
||||
}
|
||||
|
||||
// Now do it backwards
|
||||
StringBuffer reverse = new StringBuffer();
|
||||
for (int ch = iter.last(); ch != iter.DONE; ch = iter.previous()) {
|
||||
for (int ch = iter.last(); ch != Normalizer.DONE; ch = iter.previous()) {
|
||||
reverse.insert(0, ch);
|
||||
}
|
||||
|
||||
@ -834,7 +834,7 @@ public class BasicTest extends TestFmwk {
|
||||
int ch;
|
||||
UCharacterIterator cIter = UCharacterIterator.getInstance(expected);
|
||||
|
||||
while ((ch=iter.next())!= iter.DONE){
|
||||
while ((ch=iter.next())!= Normalizer.DONE){
|
||||
if (index >= expected.length()) {
|
||||
errln("FAIL: " + msg + "Unexpected character '" + (char)ch
|
||||
+ "' (" + hex(ch) + ")"
|
||||
@ -856,7 +856,7 @@ public class BasicTest extends TestFmwk {
|
||||
}
|
||||
|
||||
cIter.setToLimit();
|
||||
while((ch=iter.previous())!=iter.DONE){
|
||||
while((ch=iter.previous())!=Normalizer.DONE){
|
||||
int want = cIter.previousCodePoint();
|
||||
if (ch != want ) {
|
||||
errln("FAIL: " + msg + "got '" + (char)ch
|
||||
@ -933,7 +933,7 @@ public class BasicTest extends TestFmwk {
|
||||
int ch;
|
||||
UCharacterIterator cIter = UCharacterIterator.getInstance(expected);
|
||||
|
||||
while ((ch=iter.next())!= iter.DONE){
|
||||
while ((ch=iter.next())!= Normalizer.DONE){
|
||||
if (index >= expected.length()) {
|
||||
errln("FAIL: " + "Unexpected character '" + (char)ch
|
||||
+ "' (" + hex(ch) + ")"
|
||||
@ -955,7 +955,7 @@ public class BasicTest extends TestFmwk {
|
||||
}
|
||||
|
||||
cIter.setToLimit();
|
||||
while((ch=iter.previous())!=iter.DONE){
|
||||
while((ch=iter.previous())!=Normalizer.DONE){
|
||||
int want = cIter.previousCodePoint();
|
||||
if (ch != want ) {
|
||||
errln("FAIL: " + "got '" + (char)ch
|
||||
@ -974,7 +974,7 @@ public class BasicTest extends TestFmwk {
|
||||
Normalizer iter = new Normalizer(new StringCharacterIterator(Utility.unescape(input)),
|
||||
Normalizer.NFKC,0);
|
||||
StringBuffer got = new StringBuffer();
|
||||
for (ch = iter.first();ch!=iter.DONE;ch=iter.next())
|
||||
for (ch = iter.first();ch!=Normalizer.DONE;ch=iter.next())
|
||||
{
|
||||
if (index >= expected.length()) {
|
||||
errln("FAIL: " + "Unexpected character '" + (char)ch +
|
||||
@ -997,7 +997,7 @@ public class BasicTest extends TestFmwk {
|
||||
logln("Reverse Iteration\n");
|
||||
iter.setIndexOnly(iter.endIndex());
|
||||
got.setLength(0);
|
||||
for(ch=iter.previous();ch!=iter.DONE;ch=iter.previous()){
|
||||
for(ch=iter.previous();ch!=Normalizer.DONE;ch=iter.previous()){
|
||||
if (index >= expected.length()) {
|
||||
errln("FAIL: " + "Unexpected character '" + (char)ch
|
||||
+ "' (" + hex(ch) + ")" + " at index " + index);
|
||||
@ -1869,7 +1869,7 @@ public class BasicTest extends TestFmwk {
|
||||
|
||||
// test all of these precomposed characters
|
||||
UnicodeSetIterator it = new UnicodeSetIterator(set);
|
||||
while(it.nextRange() && it.codepoint!=it.IS_STRING) {
|
||||
while(it.nextRange() && it.codepoint!=UnicodeSetIterator.IS_STRING) {
|
||||
start=it.codepoint;
|
||||
end=it.codepointEnd;
|
||||
while(start<=end) {
|
||||
@ -2101,7 +2101,7 @@ public class BasicTest extends TestFmwk {
|
||||
for(int i=0x3000; i<0x3100;i++){
|
||||
String input = ((char)i)+troublesome;
|
||||
try{
|
||||
String result = Normalizer.compose(input,false);
|
||||
/* String result =*/ Normalizer.compose(input,false);
|
||||
}catch(IndexOutOfBoundsException e){
|
||||
errln("compose() failed for input: " + Utility.hex(input) + " Exception: " + e.toString());
|
||||
}
|
||||
@ -2494,7 +2494,7 @@ public class BasicTest extends TestFmwk {
|
||||
}
|
||||
|
||||
public void TestSkippable() {
|
||||
UnicodeSet starts, diff;
|
||||
UnicodeSet starts;
|
||||
UnicodeSet[] skipSets = new UnicodeSet[]{
|
||||
new UnicodeSet(), //NFD
|
||||
new UnicodeSet(), //NFC
|
||||
@ -2512,7 +2512,7 @@ public class BasicTest extends TestFmwk {
|
||||
new UnicodeSet(),
|
||||
};
|
||||
StringBuffer s, pattern;
|
||||
int start, limit, rangeStart, rangeEnd;
|
||||
int start, limit, rangeEnd;
|
||||
int i, range, count;
|
||||
starts = new UnicodeSet();
|
||||
/*
|
||||
@ -2543,7 +2543,7 @@ public class BasicTest extends TestFmwk {
|
||||
count=starts.getRangeCount();
|
||||
|
||||
start=limit=0;
|
||||
rangeStart=rangeEnd=0;
|
||||
rangeEnd=0;
|
||||
range=0;
|
||||
for(;;) {
|
||||
if(start<limit) {
|
||||
@ -2573,12 +2573,12 @@ public class BasicTest extends TestFmwk {
|
||||
start=limit;
|
||||
if(++limit>rangeEnd) {
|
||||
if(range<count) {
|
||||
limit=rangeStart=starts.getRangeStart(range);
|
||||
limit=starts.getRangeStart(range);
|
||||
rangeEnd=starts.getRangeEnd(range);
|
||||
++range;
|
||||
} else if(range==count) {
|
||||
// additional range to complete the Unicode code space
|
||||
limit=rangeStart=rangeEnd=0x110000;
|
||||
limit=rangeEnd=0x110000;
|
||||
++range;
|
||||
} else {
|
||||
break;
|
||||
|
@ -156,7 +156,7 @@ class NormalizerBuilder {
|
||||
//System.out.println("debug: " + line);
|
||||
}
|
||||
end = line.indexOf(';',start=end+1); // name
|
||||
String name = line.substring(start,end);
|
||||
/*String name =*/ line.substring(start,end);
|
||||
end = line.indexOf(';',start=end+1); // general category
|
||||
end = line.indexOf(';',start=end+1); // canonical class
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/normalizer/TestCanonicalIterator.java,v $
|
||||
* $Date: 2003/04/09 21:38:16 $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -55,8 +55,8 @@ public class TestCanonicalIterator extends TestFmwk {
|
||||
slowIt.SKIP_ZEROS = false;
|
||||
*/
|
||||
//Transliterator name = Transliterator.getInstance("[^\\u0020-\\u007F] name");
|
||||
Set itSet = new TreeSet();
|
||||
Set slowItSet = new TreeSet();
|
||||
//Set itSet = new TreeSet();
|
||||
//Set slowItSet = new TreeSet();
|
||||
|
||||
|
||||
for (int i = 0; i < 0x10FFFF; ++i) {
|
||||
@ -206,7 +206,7 @@ public class TestCanonicalIterator extends TestFmwk {
|
||||
for (int i = 0; i < testArray.length; ++i) {
|
||||
//logln("Results for: " + name.transliterate(testArray[i]));
|
||||
CanonicalIterator it = new CanonicalIterator(testArray[i][0]);
|
||||
int counter = 0;
|
||||
// int counter = 0;
|
||||
set.clear();
|
||||
String first = null;
|
||||
while (true) {
|
||||
|
@ -145,7 +145,7 @@ public class UnicodeNormalizer {
|
||||
decompPos += UTF16Util.codePointLength(ch);
|
||||
int chClass = data.getCanonicalClass(ch);
|
||||
int composite = data.getPairwiseComposition(starterCh, ch);
|
||||
if (composite != data.NOT_COMPOSITE
|
||||
if (composite != NormalizerData.NOT_COMPOSITE
|
||||
&& (lastClass < chClass || lastClass == 0)) {
|
||||
UTF16Util.setCodePointAt(target, starterPos, composite);
|
||||
starterCh = composite;
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/normalizer/UnicodeNormalizerConformanceTest.java,v $
|
||||
* $Date: 2003/01/28 18:55:34 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -146,8 +146,8 @@ public class UnicodeNormalizerConformanceTest extends TestFmwk {
|
||||
*/
|
||||
private boolean checkConformance(String[] field, String line) throws Exception{
|
||||
boolean pass = true;
|
||||
StringBuffer buf = new StringBuffer(); // scratch
|
||||
String out,fcd;
|
||||
// StringBuffer buf = new StringBuffer(); // scratch
|
||||
String out;
|
||||
int i=0;
|
||||
for (i=0; i<5; ++i) {
|
||||
if (i<3) {
|
||||
|
@ -160,7 +160,7 @@ public class CollationPerformanceTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
CollationPerformanceTest collPerf = new CollationPerformanceTest();
|
||||
if ( !collPerf.processOptions(args) || opt_help || opt_fName.length()==0) {
|
||||
if ( !CollationPerformanceTest.processOptions(args) || opt_help || opt_fName.length()==0) {
|
||||
System.out.println(usageString);
|
||||
System.exit(1);
|
||||
}
|
||||
@ -257,7 +257,7 @@ public class CollationPerformanceTest {
|
||||
*/
|
||||
void doQSort() {
|
||||
callGC();
|
||||
String[] sortTests = (String[]) tests.clone();
|
||||
//String[] sortTests = (String[]) tests.clone();
|
||||
//Adjust loop count to compensate for file size. QSort should be nlog(n)
|
||||
double dLoopCount = opt_loopCount * 3000 / ((Math.log(tests.length) / Math.log(10)* tests.length));
|
||||
|
||||
@ -916,7 +916,7 @@ public class CollationPerformanceTest {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
int value = Integer.parseInt(args[argNum]);
|
||||
/* int value =*/ Integer.parseInt(args[argNum]);
|
||||
options[i].value.delete(0, options[i].value.capacity()).append(args[argNum]);
|
||||
} catch (NumberFormatException e) {
|
||||
System.err.println("Expected: a number value");
|
||||
@ -1018,14 +1018,14 @@ public class CollationPerformanceTest {
|
||||
// recommended by Javasoft.
|
||||
try {
|
||||
System.gc();
|
||||
Thread.currentThread().sleep(100);
|
||||
Thread.sleep(100);
|
||||
System.runFinalization();
|
||||
Thread.currentThread().sleep(100);
|
||||
Thread.sleep(100);
|
||||
|
||||
System.gc();
|
||||
Thread.currentThread().sleep(100);
|
||||
Thread.sleep(100);
|
||||
System.runFinalization();
|
||||
Thread.currentThread().sleep(100);
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {}
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
package com.ibm.icu.dev.test.perf;
|
||||
|
||||
import com.ibm.icu.text.*;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class NormalizerPerformanceTest extends PerfTest {
|
||||
|
||||
@ -83,7 +81,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFDFileLines.length; i++) {
|
||||
String nfc = Normalizer.normalize(NFDFileLines[i], Normalizer.NFC);
|
||||
Normalizer.normalize(NFDFileLines[i], Normalizer.NFC);
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,7 +99,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
String nfc = Normalizer.normalize(NFCFileLines[i], Normalizer.NFC);
|
||||
Normalizer.normalize(NFCFileLines[i], Normalizer.NFC);
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +117,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
String nfc = Normalizer.normalize(fileLines[i], Normalizer.NFC);
|
||||
Normalizer.normalize(fileLines[i], Normalizer.NFC);
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +136,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFDFileLines.length; i++) {
|
||||
String nfc = Normalizer.normalize(NFDFileLines[i], Normalizer.NFD);
|
||||
Normalizer.normalize(NFDFileLines[i], Normalizer.NFD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,7 +154,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
String nfc = Normalizer.normalize(NFCFileLines[i], Normalizer.NFD);
|
||||
Normalizer.normalize(NFCFileLines[i], Normalizer.NFD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,7 +172,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
String nfc = Normalizer.normalize(fileLines[i], Normalizer.NFD);
|
||||
Normalizer.normalize(fileLines[i], Normalizer.NFD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -320,7 +318,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
String nfc = Normalizer.normalize(NFCFileLines[i], Normalizer.FCD);
|
||||
Normalizer.normalize(NFCFileLines[i], Normalizer.FCD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,7 +336,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
String nfc = Normalizer.normalize(fileLines[i], Normalizer.FCD);
|
||||
Normalizer.normalize(fileLines[i], Normalizer.FCD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -357,7 +355,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFDFileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(NFDFileLines[i], Normalizer.NFC,0);
|
||||
Normalizer.quickCheck(NFDFileLines[i], Normalizer.NFC,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -375,7 +373,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(NFCFileLines[i], Normalizer.NFC,0);
|
||||
Normalizer.quickCheck(NFCFileLines[i], Normalizer.NFC,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,7 +391,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(fileLines[i], Normalizer.NFC,0);
|
||||
Normalizer.quickCheck(fileLines[i], Normalizer.NFC,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -411,7 +409,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFDFileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(NFDFileLines[i], Normalizer.NFD,0);
|
||||
Normalizer.quickCheck(NFDFileLines[i], Normalizer.NFD,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -429,7 +427,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(NFCFileLines[i], Normalizer.NFD,0);
|
||||
Normalizer.quickCheck(NFCFileLines[i], Normalizer.NFD,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -447,7 +445,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(fileLines[i], Normalizer.NFD,0);
|
||||
Normalizer.quickCheck(fileLines[i], Normalizer.NFD,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -465,7 +463,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFDFileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(NFDFileLines[i], Normalizer.FCD,0);
|
||||
Normalizer.quickCheck(NFDFileLines[i], Normalizer.FCD,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -483,7 +481,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(NFCFileLines[i], Normalizer.FCD,0);
|
||||
Normalizer.quickCheck(NFCFileLines[i], Normalizer.FCD,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -501,7 +499,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
Normalizer.QuickCheckResult result = Normalizer.quickCheck(fileLines[i], Normalizer.FCD,0);
|
||||
Normalizer.quickCheck(fileLines[i], Normalizer.FCD,0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -520,7 +518,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFDFileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(NFDFileLines[i], Normalizer.NFC, 0);
|
||||
Normalizer.isNormalized(NFDFileLines[i], Normalizer.NFC, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -538,7 +536,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(NFCFileLines[i], Normalizer.NFC, 0);
|
||||
Normalizer.isNormalized(NFCFileLines[i], Normalizer.NFC, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -556,7 +554,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(fileLines[i], Normalizer.NFC, 0);
|
||||
Normalizer.isNormalized(fileLines[i], Normalizer.NFC, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -574,7 +572,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFDFileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(NFDFileLines[i], Normalizer.NFD, 0);
|
||||
Normalizer.isNormalized(NFDFileLines[i], Normalizer.NFD, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -592,7 +590,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(NFCFileLines[i], Normalizer.NFD, 0);
|
||||
Normalizer.isNormalized(NFCFileLines[i], Normalizer.NFD, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -610,7 +608,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(fileLines[i], Normalizer.NFD, 0);
|
||||
Normalizer.isNormalized(fileLines[i], Normalizer.NFD, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -628,7 +626,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFDFileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(NFDFileLines[i], Normalizer.FCD, 0);
|
||||
Normalizer.isNormalized(NFDFileLines[i], Normalizer.FCD, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -646,7 +644,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < NFCFileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(NFCFileLines[i], Normalizer.FCD, 0);
|
||||
Normalizer.isNormalized(NFCFileLines[i], Normalizer.FCD, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -664,7 +662,7 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
return new PerfTest.Function() {
|
||||
public void call() {
|
||||
for (int i = 0; i < fileLines.length; i++) {
|
||||
boolean result = Normalizer.isNormalized(fileLines[i], Normalizer.FCD, 0);
|
||||
Normalizer.isNormalized(fileLines[i], Normalizer.FCD, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -371,7 +371,7 @@ public abstract class PerfTest {
|
||||
meth = (Method) methodList.get(i);
|
||||
|
||||
// Call meth to set up the test
|
||||
long eventsPerCall = -1;
|
||||
// long eventsPerCall = -1;
|
||||
Function testFunction = (Function)meth.invoke(this, NO_ARGS);
|
||||
if (testFunction == null) {
|
||||
throw new RuntimeException(meth.getName() + " failed to return a test function");
|
||||
@ -439,14 +439,14 @@ public abstract class PerfTest {
|
||||
// recommended by Javasoft.
|
||||
try {
|
||||
System.gc();
|
||||
Thread.currentThread().sleep(100);
|
||||
Thread.sleep(100);
|
||||
System.runFinalization();
|
||||
Thread.currentThread().sleep(100);
|
||||
Thread.sleep(100);
|
||||
|
||||
System.gc();
|
||||
Thread.currentThread().sleep(100);
|
||||
Thread.sleep(100);
|
||||
System.runFinalization();
|
||||
Thread.currentThread().sleep(100);
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {}
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/rbbi/BreakIteratorTest.java,v $
|
||||
* $Date: 2002/11/22 00:24:31 $
|
||||
* $Revision: 1.10 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.11 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -14,12 +14,9 @@ package com.ibm.icu.dev.test.rbbi;
|
||||
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.text.BreakIterator;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Vector;
|
||||
import java.util.Enumeration;
|
||||
import java.io.*;
|
||||
|
||||
public class BreakIteratorTest extends TestFmwk
|
||||
{
|
||||
@ -1081,12 +1078,12 @@ lineSelectionData.addElement("(\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\
|
||||
int begin = 3;
|
||||
int end = str.length() - 3;
|
||||
// not used boolean gotException = false;
|
||||
boolean dummy;
|
||||
|
||||
|
||||
iter.setText(new StringCharacterIterator(str, begin, end, begin));
|
||||
for (int index = -1; index < begin + 1; ++index) {
|
||||
try {
|
||||
dummy = iter.isBoundary(index);
|
||||
iter.isBoundary(index);
|
||||
if (index < begin)
|
||||
errln("Didn't get exception with offset = " + index +
|
||||
" and begin index = " + begin);
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/rbbi/RBBIAPITest.java,v $
|
||||
* $Date: 2002/02/16 03:05:15 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -20,8 +20,6 @@ package com.ibm.icu.dev.test.rbbi;
|
||||
|
||||
import com.ibm.icu.text.RuleBasedBreakIterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Vector;
|
||||
import java.io.*;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/rbbi/RBBITest.java,v $
|
||||
* $Date: 2002/02/16 03:05:15 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -15,9 +15,7 @@ package com.ibm.icu.dev.test.rbbi;
|
||||
//Regression testing of RuleBasedBreakIterator
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.text.RuleBasedBreakIterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Vector;
|
||||
import java.io.*;
|
||||
|
||||
public class RBBITest extends TestFmwk
|
||||
{
|
||||
|
@ -5,13 +5,12 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/timezone/TimeZoneBoundaryTest.java,v $
|
||||
* $Date: 2002/08/13 22:04:39 $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.timezone;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import com.ibm.icu.dev.test.*;
|
||||
@ -263,12 +262,12 @@ public class TimeZoneBoundaryTest extends TestFmwk
|
||||
|
||||
GregorianCalendar gc = new GregorianCalendar(time_zone);
|
||||
gc.setTime(d);
|
||||
int offset = time_zone.getOffset(gc.get(gc.ERA), gc.get(gc.YEAR), gc.get(gc.MONTH),
|
||||
gc.get(gc.DAY_OF_MONTH), gc.get(gc.DAY_OF_WEEK),
|
||||
((gc.get(gc.HOUR_OF_DAY) * 60 +
|
||||
gc.get(gc.MINUTE)) * 60 +
|
||||
gc.get(gc.SECOND)) * 1000 +
|
||||
gc.get(gc.MILLISECOND));
|
||||
int offset = time_zone.getOffset(gc.get(Calendar.ERA), gc.get(Calendar.YEAR), gc.get(Calendar.MONTH),
|
||||
gc.get(Calendar.DAY_OF_MONTH), gc.get(Calendar.DAY_OF_WEEK),
|
||||
((gc.get(Calendar.HOUR_OF_DAY) * 60 +
|
||||
gc.get(Calendar.MINUTE)) * 60 +
|
||||
gc.get(Calendar.SECOND)) * 1000 +
|
||||
gc.get(Calendar.MILLISECOND));
|
||||
if (offset == expDSTOffset)
|
||||
logln("PASS: getOffset() = " + offset/(double)ONE_HOUR);
|
||||
else
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/timezone/TimeZoneRegression.java,v $
|
||||
* $Date: 2002/08/13 22:04:39 $
|
||||
* $Revision: 1.8 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.9 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -20,7 +20,6 @@
|
||||
package com.ibm.icu.dev.test.timezone;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.io.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import java.util.Date;
|
||||
@ -344,9 +343,8 @@ public class TimeZoneRegression extends TestFmwk {
|
||||
public void Test4151429() {
|
||||
try {
|
||||
TimeZone tz = TimeZone.getTimeZone("GMT");
|
||||
String name = tz.getDisplayName(true, Integer.MAX_VALUE,
|
||||
/*String name =*/ tz.getDisplayName(true, Integer.MAX_VALUE,
|
||||
Locale.getDefault());
|
||||
name = null;
|
||||
errln("IllegalArgumentException not thrown by TimeZone.getDisplayName()");
|
||||
} catch(IllegalArgumentException e) {
|
||||
System.out.print("");
|
||||
@ -500,10 +498,9 @@ public class TimeZoneRegression extends TestFmwk {
|
||||
|
||||
ex = null;
|
||||
try {
|
||||
SimpleTimeZone temp = new SimpleTimeZone(0, "Z",
|
||||
/*SimpleTimeZone temp =*/ new SimpleTimeZone(0, "Z",
|
||||
month, day, dayOfWeek, time,
|
||||
GOOD_MONTH, GOOD_DAY, GOOD_DAY_OF_WEEK, GOOD_TIME);
|
||||
temp = null;
|
||||
} catch (IllegalArgumentException e) {
|
||||
ex = e;
|
||||
}
|
||||
@ -516,10 +513,10 @@ public class TimeZoneRegression extends TestFmwk {
|
||||
|
||||
ex = null;
|
||||
try {
|
||||
SimpleTimeZone temp = new SimpleTimeZone(0, "Z",
|
||||
/*SimpleTimeZone temp = */new SimpleTimeZone(0, "Z",
|
||||
GOOD_MONTH, GOOD_DAY, GOOD_DAY_OF_WEEK, GOOD_TIME,
|
||||
month, day, dayOfWeek, time);
|
||||
temp = null;
|
||||
// temp = null;
|
||||
} catch (IllegalArgumentException e) {
|
||||
ex = e;
|
||||
}
|
||||
@ -573,9 +570,9 @@ public class TimeZoneRegression extends TestFmwk {
|
||||
boolean good = DATA[i] == GOOD;
|
||||
IllegalArgumentException e = null;
|
||||
try {
|
||||
int offset = tz.getOffset(DATA[i+1], DATA[i+2], DATA[i+3],
|
||||
/*int offset =*/ tz.getOffset(DATA[i+1], DATA[i+2], DATA[i+3],
|
||||
DATA[i+4], DATA[i+5], DATA[i+6]);
|
||||
offset = 0;
|
||||
//offset = 0;
|
||||
} catch (IllegalArgumentException ex) {
|
||||
e = ex;
|
||||
}
|
||||
@ -664,6 +661,9 @@ public class TimeZoneRegression extends TestFmwk {
|
||||
} catch (NullPointerException e) {
|
||||
System.out.print("");
|
||||
}
|
||||
if(s!=null){
|
||||
errln("FAIL: Did not get the expected Exception");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -896,16 +896,16 @@ public class TimeZoneRegression extends TestFmwk {
|
||||
public void Test4208960 () {
|
||||
SimpleTimeZone tz = (SimpleTimeZone)TimeZone.getTimeZone("PST");
|
||||
try {
|
||||
int offset = tz.getOffset(GregorianCalendar.AD, 1996, Calendar.FEBRUARY, 29,
|
||||
/*int offset =*/ tz.getOffset(GregorianCalendar.AD, 1996, Calendar.FEBRUARY, 29,
|
||||
Calendar.THURSDAY, 0);
|
||||
offset = 0;
|
||||
//offset = 0;
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("FAILED: to get TimeZone.getOffset(2/29/96)");
|
||||
}
|
||||
try {
|
||||
int offset = tz.getOffset(GregorianCalendar.AD, 1997, Calendar.FEBRUARY, 29,
|
||||
/*int offset =*/ tz.getOffset(GregorianCalendar.AD, 1997, Calendar.FEBRUARY, 29,
|
||||
Calendar.THURSDAY, 0);
|
||||
offset = 0;
|
||||
//offset = 0;
|
||||
errln("FAILED: TimeZone.getOffset(2/29/97) expected to throw Exception.");
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("got IllegalArgumentException");
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java,v $
|
||||
* $Date: 2002/12/03 23:15:05 $
|
||||
* $Revision: 1.11 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -21,15 +21,11 @@
|
||||
package com.ibm.icu.dev.test.timezone;
|
||||
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class TimeZoneTest extends TestFmwk
|
||||
{
|
||||
@ -572,9 +568,9 @@ public class TimeZoneTest extends TestFmwk
|
||||
|
||||
GregorianCalendar gc = new GregorianCalendar();
|
||||
gc.setTime(d);
|
||||
if (time_zone.getOffset(gc.AD, gc.get(gc.YEAR), gc.get(gc.MONTH),
|
||||
gc.get(gc.DAY_OF_MONTH),
|
||||
gc.get(gc.DAY_OF_WEEK), 0)
|
||||
if (time_zone.getOffset(GregorianCalendar.AD, gc.get(GregorianCalendar.YEAR), gc.get(GregorianCalendar.MONTH),
|
||||
gc.get(GregorianCalendar.DAY_OF_MONTH),
|
||||
gc.get(GregorianCalendar.DAY_OF_WEEK), 0)
|
||||
!= -7*millisPerHour)
|
||||
errln("FAIL: getOffset returned wrong value");
|
||||
}
|
||||
|
@ -5,18 +5,16 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/CompoundTransliteratorTest.java,v $
|
||||
* $Date: 2002/02/25 22:43:57 $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.translit;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -5,223 +5,250 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/ErrorTest.java,v $
|
||||
* $Date: 2002/08/13 22:07:58 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.translit;
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import java.io.*;
|
||||
import java.text.ParseException;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @summary Error condition test of Transliterator
|
||||
*/
|
||||
public class ErrorTest extends TestFmwk {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new ErrorTest().run(args);
|
||||
}
|
||||
|
||||
public void TestTransliteratorErrors() {
|
||||
String trans="Latin-Greek";
|
||||
String bogusID="LATINGREEK-GREEKLATIN";
|
||||
String newID="Bogus-Latin";
|
||||
String newIDRules="zzz > Z; f <> ph";
|
||||
String bogusRules="a } [b-g m-p ";
|
||||
ReplaceableString testString= new ReplaceableString("A quick fox jumped over the lazy dog.");
|
||||
String insertString="cats and dogs";
|
||||
int stoppedAt = 0, len;
|
||||
Transliterator.Position pos = new Transliterator.Position();
|
||||
|
||||
Transliterator t= Transliterator.getInstance(trans, Transliterator.FORWARD);
|
||||
if(t==null){
|
||||
errln("FAIL: construction of Latin-Greek");
|
||||
return;
|
||||
}
|
||||
len = testString.length();
|
||||
stoppedAt = t.transliterate(testString, 0, 100);
|
||||
if (stoppedAt != -1) {
|
||||
errln("FAIL: Out of bounds check failed (1).");
|
||||
} else if (testString.length() != len) {
|
||||
testString= new ReplaceableString("A quick fox jumped over the lazy dog.");
|
||||
errln("FAIL: Transliterate fails and the target string was modified.");
|
||||
}
|
||||
stoppedAt = t.transliterate(testString, 100, testString.length()-1);
|
||||
if (stoppedAt != -1) {
|
||||
errln("FAIL: Out of bounds check failed (2).");
|
||||
} else if (testString.length() != len) {
|
||||
testString=new ReplaceableString("A quick fox jumped over the lazy dog.");
|
||||
errln("FAIL: Transliterate fails and the target string was modified.");
|
||||
public static void main(String[] args) throws Exception {
|
||||
new ErrorTest().run(args);
|
||||
}
|
||||
pos.start = 100;
|
||||
pos.limit = testString.length();
|
||||
try {
|
||||
t.transliterate(testString, pos);
|
||||
errln("FAIL: Start offset is out of bounds, error not reported.");
|
||||
} catch(IllegalArgumentException e) {
|
||||
logln("Start offset is out of bounds and detected.");
|
||||
}
|
||||
pos.limit = 100;
|
||||
pos.start = 0;
|
||||
|
||||
try {
|
||||
t.transliterate(testString, pos );
|
||||
errln("FAIL: Limit offset is out of bounds, error not reported.\n");
|
||||
} catch(IllegalArgumentException e) {
|
||||
logln("Start offset is out of bounds and detected.");
|
||||
}
|
||||
len = pos.contextLimit = testString.length();
|
||||
pos.contextStart = 0;
|
||||
pos.limit = len - 1;
|
||||
pos.start = 5;
|
||||
try {
|
||||
t.transliterate(testString, pos, insertString);
|
||||
if (len == pos.limit) {
|
||||
errln("FAIL: Test insertion with string: the transliteration position limit didn't change as expected.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("Insertion test with string failed for some reason.");
|
||||
public void TestTransliteratorErrors() {
|
||||
String trans = "Latin-Greek";
|
||||
String bogusID = "LATINGREEK-GREEKLATIN";
|
||||
String newID = "Bogus-Latin";
|
||||
String newIDRules = "zzz > Z; f <> ph";
|
||||
String bogusRules = "a } [b-g m-p ";
|
||||
ReplaceableString testString =
|
||||
new ReplaceableString("A quick fox jumped over the lazy dog.");
|
||||
String insertString = "cats and dogs";
|
||||
int stoppedAt = 0, len;
|
||||
Transliterator.Position pos = new Transliterator.Position();
|
||||
|
||||
Transliterator t =
|
||||
Transliterator.getInstance(trans, Transliterator.FORWARD);
|
||||
if (t == null) {
|
||||
errln("FAIL: construction of Latin-Greek");
|
||||
return;
|
||||
}
|
||||
len = testString.length();
|
||||
stoppedAt = t.transliterate(testString, 0, 100);
|
||||
if (stoppedAt != -1) {
|
||||
errln("FAIL: Out of bounds check failed (1).");
|
||||
} else if (testString.length() != len) {
|
||||
testString =
|
||||
new ReplaceableString("A quick fox jumped over the lazy dog.");
|
||||
errln("FAIL: Transliterate fails and the target string was modified.");
|
||||
}
|
||||
stoppedAt = t.transliterate(testString, 100, testString.length() - 1);
|
||||
if (stoppedAt != -1) {
|
||||
errln("FAIL: Out of bounds check failed (2).");
|
||||
} else if (testString.length() != len) {
|
||||
testString =
|
||||
new ReplaceableString("A quick fox jumped over the lazy dog.");
|
||||
errln("FAIL: Transliterate fails and the target string was modified.");
|
||||
}
|
||||
pos.start = 100;
|
||||
pos.limit = testString.length();
|
||||
try {
|
||||
t.transliterate(testString, pos);
|
||||
errln("FAIL: Start offset is out of bounds, error not reported.");
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Start offset is out of bounds and detected.");
|
||||
}
|
||||
pos.limit = 100;
|
||||
pos.start = 0;
|
||||
|
||||
try {
|
||||
t.transliterate(testString, pos);
|
||||
errln("FAIL: Limit offset is out of bounds, error not reported.\n");
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Start offset is out of bounds and detected.");
|
||||
}
|
||||
len = pos.contextLimit = testString.length();
|
||||
pos.contextStart = 0;
|
||||
pos.limit = len - 1;
|
||||
pos.start = 5;
|
||||
try {
|
||||
t.transliterate(testString, pos, insertString);
|
||||
if (len == pos.limit) {
|
||||
errln("FAIL: Test insertion with string: the transliteration position limit didn't change as expected.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("Insertion test with string failed for some reason.");
|
||||
}
|
||||
pos.contextStart = 0;
|
||||
pos.contextLimit = testString.length();
|
||||
pos.limit = testString.length() - 1;
|
||||
pos.start = 5;
|
||||
try {
|
||||
t.transliterate(testString, pos, 0x0061);
|
||||
if (len == pos.limit) {
|
||||
errln("FAIL: Test insertion with character: the transliteration position limit didn't change as expected.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("FAIL: Insertion test with UTF-16 code point failed for some reason.");
|
||||
}
|
||||
len = pos.limit = testString.length();
|
||||
pos.contextStart = 0;
|
||||
pos.contextLimit = testString.length() - 1;
|
||||
pos.start = 5;
|
||||
try {
|
||||
t.transliterate(testString, pos, insertString);
|
||||
errln("FAIL: Out of bounds check failed (3).");
|
||||
if (testString.length() != len) {
|
||||
errln("FAIL: The input string was modified though the offsets were out of bounds.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Insertion test with out of bounds indexes.");
|
||||
}
|
||||
Transliterator t1 = null;
|
||||
try {
|
||||
t1 = Transliterator.getInstance(bogusID, Transliterator.FORWARD);
|
||||
if (t1 != null) {
|
||||
errln("FAIL: construction of bogus ID \"LATINGREEK-GREEKLATIN\"");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
|
||||
//try { // unneeded - Exception cannot be thrown
|
||||
Transliterator t2 =
|
||||
Transliterator.createFromRules(
|
||||
newID,
|
||||
newIDRules,
|
||||
Transliterator.FORWARD);
|
||||
try {
|
||||
Transliterator t3 = t2.getInverse();
|
||||
errln("FAIL: The newID transliterator was not registered so createInverse should fail.");
|
||||
if (t3 != null) {
|
||||
errln("FAIL: The newID transliterator was not registered so createInverse should fail.");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
//} catch (Exception e) { }
|
||||
try {
|
||||
Transliterator t4 =
|
||||
Transliterator.createFromRules(
|
||||
newID,
|
||||
bogusRules,
|
||||
Transliterator.FORWARD);
|
||||
if (t4 != null) {
|
||||
errln("FAIL: The rules is malformed but error was not reported.");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
pos.contextStart = 0;
|
||||
pos.contextLimit = testString.length();
|
||||
pos.limit = testString.length() -1;
|
||||
pos.start = 5;
|
||||
try {
|
||||
t.transliterate(testString, pos, 0x0061);
|
||||
if (len == pos.limit) {
|
||||
errln("FAIL: Test insertion with character: the transliteration position limit didn't change as expected.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("FAIL: Insertion test with UTF-16 code point failed for some reason.");
|
||||
|
||||
public void TestUnicodeSetErrors() {
|
||||
String badPattern = "[[:L:]-[0x0300-0x0400]";
|
||||
UnicodeSet set = new UnicodeSet();
|
||||
//String result;
|
||||
|
||||
if (!set.isEmpty()) {
|
||||
errln("FAIL: The default ctor of UnicodeSet created a non-empty object.");
|
||||
}
|
||||
try {
|
||||
set.applyPattern(badPattern);
|
||||
errln("FAIL: Applied a bad pattern to the UnicodeSet object okay.");
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Test applying with the bad pattern.");
|
||||
}
|
||||
try {
|
||||
UnicodeSet set1 = new UnicodeSet(badPattern);
|
||||
errln("FAIL: Created a UnicodeSet based on bad patterns.");
|
||||
if (set1 != null) {
|
||||
errln("FAIL: Created a UnicodeSet based on bad patterns.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Test constructing with the bad pattern.");
|
||||
}
|
||||
}
|
||||
len = pos.limit = testString.length();
|
||||
pos.contextStart = 0;
|
||||
pos.contextLimit = testString.length() - 1;
|
||||
pos.start = 5;
|
||||
try {
|
||||
t.transliterate(testString, pos, insertString);
|
||||
errln("FAIL: Out of bounds check failed (3).");
|
||||
if (testString.length() != len) {
|
||||
errln("FAIL: The input string was modified though the offsets were out of bounds.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Insertion test with out of bounds indexes.");
|
||||
|
||||
public void TestUniToHexErrors() {
|
||||
Transliterator t = null;
|
||||
try {
|
||||
t = new UnicodeToHexTransliterator("", true, null);
|
||||
if (t != null) {
|
||||
errln("FAIL: Created a UnicodeToHexTransliterator with an empty pattern.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
try {
|
||||
t = new UnicodeToHexTransliterator("\\x", true, null);
|
||||
if (t != null) {
|
||||
errln("FAIL: Created a UnicodeToHexTransliterator with a bad pattern.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
t = new UnicodeToHexTransliterator();
|
||||
try {
|
||||
((UnicodeToHexTransliterator) t).applyPattern("\\x");
|
||||
errln("FAIL: UnicodeToHexTransliterator::applyPattern succeeded with a bad pattern.");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
Transliterator t1 = null;
|
||||
try {
|
||||
t1= Transliterator.getInstance(bogusID, Transliterator.FORWARD);
|
||||
if(t1!=null) {
|
||||
errln("FAIL: construction of bogus ID \"LATINGREEK-GREEKLATIN\"");
|
||||
}
|
||||
} catch (IllegalArgumentException e) { }
|
||||
|
||||
//try { // unneeded - Exception cannot be thrown
|
||||
Transliterator t2 = new RuleBasedTransliterator(newID, newIDRules);
|
||||
try {
|
||||
Transliterator t3 = t2.getInverse();
|
||||
errln("FAIL: The newID transliterator was not registered so createInverse should fail.");
|
||||
} catch (Exception e) { }
|
||||
//} catch (Exception e) { }
|
||||
try {
|
||||
Transliterator t4 = Transliterator.createFromRules(newID, bogusRules, Transliterator.FORWARD);
|
||||
if (t4 != null ) {
|
||||
errln("FAIL: The rules is malformed but error was not reported.");
|
||||
}
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
public void TestRBTErrors() {
|
||||
|
||||
public void TestUnicodeSetErrors() {
|
||||
String badPattern="[[:L:]-[0x0300-0x0400]";
|
||||
UnicodeSet set = new UnicodeSet();
|
||||
String result;
|
||||
|
||||
if (!set.isEmpty()) {
|
||||
errln("FAIL: The default ctor of UnicodeSet created a non-empty object.");
|
||||
}
|
||||
try {
|
||||
set.applyPattern(badPattern);
|
||||
errln("FAIL: Applied a bad pattern to the UnicodeSet object okay.");
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Test applying with the bad pattern.");
|
||||
String rules = "ab>y";
|
||||
String id = "MyRandom-YReverse";
|
||||
String goodPattern = "[[:L:]&[\\u0000-\\uFFFF]]"; /* all BMP letters */
|
||||
UnicodeSet set = null;
|
||||
try {
|
||||
set = new UnicodeSet(goodPattern);
|
||||
try {
|
||||
RuleBasedTransliterator t =
|
||||
new RuleBasedTransliterator(
|
||||
id,
|
||||
rules,
|
||||
Transliterator.REVERSE,
|
||||
set);
|
||||
Transliterator.registerClass(id, t.getClass(), null);
|
||||
Transliterator.unregister(id);
|
||||
try {
|
||||
Transliterator t1 =
|
||||
Transliterator.getInstance(id, Transliterator.REVERSE);
|
||||
errln("FAIL: construction of unregistered ID should have failed.");
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("FAIL: Was not able to create a good RBT to test registration.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("FAIL: Was not able to create a good UnicodeSet based on valid patterns.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
try {
|
||||
UnicodeSet set1 = new UnicodeSet(badPattern);
|
||||
errln("FAIL: Created a UnicodeSet based on bad patterns.");
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Test constructing with the bad pattern.");
|
||||
|
||||
public void TestHexToUniErrors() {
|
||||
Transliterator t = null;
|
||||
//try { // unneeded - exception cannot be thrown
|
||||
t = new HexToUnicodeTransliterator("", null);
|
||||
//} catch (Exception e) {
|
||||
// errln("FAIL: Could not create a HexToUnicodeTransliterator with an empty pattern.");
|
||||
//}
|
||||
try {
|
||||
t = new HexToUnicodeTransliterator("\\x", null);
|
||||
errln("FAIL: Created a HexToUnicodeTransliterator with a bad pattern.");
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
|
||||
t = new HexToUnicodeTransliterator();
|
||||
try {
|
||||
((HexToUnicodeTransliterator) t).applyPattern("\\x");
|
||||
errln("FAIL: HexToUnicodeTransliterator::applyPattern succeeded with a bad pattern.");
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TestUniToHexErrors() {
|
||||
Transliterator t = null;
|
||||
try {
|
||||
t = new UnicodeToHexTransliterator("", true, null);
|
||||
if (t != null) {
|
||||
errln("FAIL: Created a UnicodeToHexTransliterator with an empty pattern.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) { }
|
||||
try {
|
||||
t = new UnicodeToHexTransliterator("\\x", true, null);
|
||||
if (t != null) {
|
||||
errln("FAIL: Created a UnicodeToHexTransliterator with a bad pattern.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) { }
|
||||
t = new UnicodeToHexTransliterator();
|
||||
try {
|
||||
((UnicodeToHexTransliterator)t).applyPattern("\\x");
|
||||
errln("FAIL: UnicodeToHexTransliterator::applyPattern succeeded with a bad pattern.");
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
|
||||
public void TestRBTErrors() {
|
||||
|
||||
String rules="ab>y";
|
||||
String id="MyRandom-YReverse";
|
||||
String goodPattern="[[:L:]&[\\u0000-\\uFFFF]]"; /* all BMP letters */
|
||||
UnicodeSet set = null;
|
||||
try {
|
||||
set = new UnicodeSet(goodPattern);
|
||||
try {
|
||||
RuleBasedTransliterator t = new RuleBasedTransliterator(id, rules, Transliterator.REVERSE, set);
|
||||
Transliterator.registerClass(id, t.getClass(), null);
|
||||
Transliterator.unregister(id);
|
||||
try {
|
||||
Transliterator t1= Transliterator.getInstance(id, Transliterator.REVERSE);
|
||||
errln("FAIL: construction of unregistered ID should have failed.");
|
||||
} catch (IllegalArgumentException e) { }
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("FAIL: Was not able to create a good RBT to test registration.");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("FAIL: Was not able to create a good UnicodeSet based on valid patterns.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void TestHexToUniErrors() {
|
||||
Transliterator t = null;
|
||||
//try { // unneeded - exception cannot be thrown
|
||||
t = new HexToUnicodeTransliterator("", null);
|
||||
//} catch (Exception e) {
|
||||
// errln("FAIL: Could not create a HexToUnicodeTransliterator with an empty pattern.");
|
||||
//}
|
||||
try {
|
||||
t = new HexToUnicodeTransliterator("\\x", null);
|
||||
errln("FAIL: Created a HexToUnicodeTransliterator with a bad pattern.");
|
||||
} catch (IllegalArgumentException e) { }
|
||||
|
||||
t = new HexToUnicodeTransliterator();
|
||||
try {
|
||||
((HexToUnicodeTransliterator)t).applyPattern("\\x");
|
||||
errln("FAIL: HexToUnicodeTransliterator::applyPattern succeeded with a bad pattern.");
|
||||
} catch (IllegalArgumentException e) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,16 +5,13 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/TestUtility.java,v $
|
||||
* $Date: 2002/08/13 22:07:57 $
|
||||
* $Revision: 1.10 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.11 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.translit;
|
||||
|
||||
import com.ibm.icu.lang.UCharacter;
|
||||
import com.ibm.icu.lang.UCharacterCategory;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
|
||||
public final class TestUtility {
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java,v $
|
||||
* $Date: 2003/04/24 23:05:02 $
|
||||
* $Revision: 1.123 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.124 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -1598,7 +1598,7 @@ public class TransliteratorTest extends TestFmwk {
|
||||
public void TestUndefinedVariable() {
|
||||
String rule = "$initial } a <> \u1161;";
|
||||
try {
|
||||
Transliterator t = new RuleBasedTransliterator("<ID>", rule);
|
||||
Transliterator t = Transliterator.createFromRules("<ID>", rule,Transliterator.FORWARD);
|
||||
t = null;
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("OK: Got exception for " + rule + ", as expected: " +
|
||||
@ -2102,6 +2102,9 @@ public class TransliteratorTest extends TestFmwk {
|
||||
"d << b;";
|
||||
try {
|
||||
Transliterator t = Transliterator.createFromRules("ID", rule, Transliterator.FORWARD);
|
||||
if(t!=null){
|
||||
errln("FAIL: Did not get expected exception");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
String err = e.getMessage();
|
||||
if (err.indexOf("d << b") >= 0) {
|
||||
@ -2122,6 +2125,9 @@ public class TransliteratorTest extends TestFmwk {
|
||||
Transliterator t = null;
|
||||
try {
|
||||
t = Transliterator.createFromRules("ID", rule, Transliterator.FORWARD);
|
||||
if(t!=null){
|
||||
errln("FAIL: Did not get the expected exception");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Ok: " + e.getMessage());
|
||||
return;
|
||||
@ -2138,6 +2144,9 @@ public class TransliteratorTest extends TestFmwk {
|
||||
try {
|
||||
Transliterator t =
|
||||
Transliterator.createFromRules("ID", rule, Transliterator.FORWARD);
|
||||
if(t!=null){
|
||||
errln("FAIL: Did not get the expected exception");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
logln("Ok: " + e.getMessage());
|
||||
return;
|
||||
@ -2152,6 +2161,9 @@ public class TransliteratorTest extends TestFmwk {
|
||||
try {
|
||||
Transliterator t =
|
||||
Transliterator.createFromRules("ID", "a}b{c>d;", Transliterator.FORWARD);
|
||||
if(t!=null){
|
||||
errln("FAIL: Did not get the expected exception");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
String msg = e.getMessage();
|
||||
if (msg.indexOf("a}b{c") >= 0) {
|
||||
@ -2344,6 +2356,9 @@ public class TransliteratorTest extends TestFmwk {
|
||||
String rule = "^a > Q; a > q;";
|
||||
try {
|
||||
Transliterator t = Transliterator.createFromRules("ID", rule, Transliterator.FORWARD);
|
||||
if(t==null){
|
||||
errln("FAIL: Did not get the expected exception");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
errln("FAIL: " + rule + " => " + e);
|
||||
}
|
||||
@ -2597,6 +2612,9 @@ public class TransliteratorTest extends TestFmwk {
|
||||
errln("Incomplete, " + t.getID() + ": " + UtilityExtensions.formatInput(test, pos));
|
||||
gotError = true;
|
||||
}
|
||||
if(!gotError){
|
||||
//errln("FAIL: Did not get expected error");
|
||||
}
|
||||
}
|
||||
|
||||
public void TestFunction() {
|
||||
|
@ -5,18 +5,17 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/Attic/UnicodeFilterLogicTest.java,v $
|
||||
* $Date: 2002/08/28 16:45:19 $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.translit;
|
||||
import com.ibm.icu.lang.*;
|
||||
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* @test
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/WriteCharts.java,v $
|
||||
* $Date: 2002/06/20 01:16:48 $
|
||||
* $Revision: 1.15 $
|
||||
* $Date: 2003/05/14 19:03:18 $
|
||||
* $Revision: 1.16 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -14,9 +14,6 @@
|
||||
package com.ibm.icu.dev.test.translit;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
//import java.text.*;
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
|
||||
@ -177,7 +174,7 @@ public class WriteCharts {
|
||||
int end = sourceSet.getRangeEnd(i);
|
||||
for (int j = sourceSet.getRangeStart(i); j <= end; ++j) {
|
||||
*/
|
||||
String flag = "";
|
||||
// String flag = "";
|
||||
String ss = UTF16.valueOf(j);
|
||||
String ts = t.transliterate(ss);
|
||||
char group = 0;
|
||||
@ -252,7 +249,7 @@ public class WriteCharts {
|
||||
// if (!decomp.equals(ts)) continue;
|
||||
|
||||
String rt = inverse.transliterate(ts);
|
||||
String flag = "";
|
||||
// String flag = "";
|
||||
char group = 0x80;
|
||||
|
||||
if (!sourceSetPlusAnyways.containsAll(rt)) {
|
||||
@ -323,7 +320,7 @@ public class WriteCharts {
|
||||
}
|
||||
out.println(tableFooter);
|
||||
|
||||
String title = "";
|
||||
// String title = "";
|
||||
if ((group & 0x100) != 0) out.println("<hr><h2>Duals</h2>");
|
||||
else if ((group & 0x80) != 0) out.println("<hr><h2>Completeness</h2>");
|
||||
else out.println("<hr><h2>Round Trip</h2>");
|
||||
|
@ -28,7 +28,7 @@ public class CurrencyTest extends TestFmwk {
|
||||
*/
|
||||
public void TestAPI() {
|
||||
Currency usd = Currency.getInstance("USD");
|
||||
int hash = usd.hashCode();
|
||||
/*int hash = */usd.hashCode();
|
||||
Currency jpy = Currency.getInstance("JPY");
|
||||
if (usd.equals(jpy)) {
|
||||
errln("FAIL: USD == JPY");
|
||||
@ -44,5 +44,8 @@ public class CurrencyTest extends TestFmwk {
|
||||
}
|
||||
|
||||
Locale[] avail = Currency.getAvailableLocales();
|
||||
if(avail==null){
|
||||
errln("FAIL: getAvailableLocales returned null");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/util/ICUListResourceBundleTest.java,v $
|
||||
* $Date: 2002/08/13 22:10:20 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -51,15 +51,15 @@ public final class ICUListResourceBundleTest extends TestFmwk
|
||||
}
|
||||
public void TestAliases(){
|
||||
ResourceBundle rb = ICULocaleData.getResourceBundle("com.ibm.icu.dev.data","TestDataElements","testaliases");
|
||||
Object o = rb.getObject("CollationElements");
|
||||
Object o1 = rb.getObject("zoneTests");
|
||||
|
||||
/* Object o =*/ rb.getObject("CollationElements");
|
||||
/* Object o1 = */rb.getObject("zoneTests");
|
||||
// should not get an exception
|
||||
}
|
||||
|
||||
public void TestCircularAliases(){
|
||||
try{
|
||||
ResourceBundle rb = ICULocaleData.getResourceBundle("com.ibm.icu.dev.data","TestDataElements","testcircularalias");
|
||||
Object o = rb.getObject("aaa");
|
||||
/* Object o =*/ rb.getObject("aaa");
|
||||
}catch(java.util.MissingResourceException e){
|
||||
if(e.toString().indexOf("ircular")==-1){
|
||||
errln("Did not get the expected Exception for circular aliases");
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/util/ICUServiceTest.java,v $
|
||||
* $Date: 2003/02/05 05:45:16 $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.13 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -39,10 +39,8 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class ICUServiceTest extends TestFmwk
|
||||
{
|
||||
@ -458,7 +456,7 @@ public class ICUServiceTest extends TestFmwk
|
||||
logln("californio language factory");
|
||||
StringBuffer buf = new StringBuffer("{");
|
||||
String[] idNames = {
|
||||
califactory.californio, califactory.valley, califactory.surfer, califactory.geek
|
||||
CalifornioLanguageFactory.californio, CalifornioLanguageFactory.valley, CalifornioLanguageFactory.surfer, CalifornioLanguageFactory.geek
|
||||
};
|
||||
for (int i = 0; i < idNames.length; ++i) {
|
||||
String idName = idNames[i];
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/util/ICUServiceTestSample.java,v $
|
||||
* $Date: 2003/01/28 18:55:35 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -37,6 +37,8 @@ public class ICUServiceTestSample {
|
||||
catch (InterruptedException e) {
|
||||
}
|
||||
System.out.println("done");
|
||||
if(client==null){
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,26 +5,20 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/util/ICUServiceThreadTest.java,v $
|
||||
* $Date: 2003/02/05 05:45:16 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
import com.ibm.icu.dev.test.AbstractTestLog;
|
||||
import com.ibm.icu.dev.test.AbstractTestLog.DelegatingLog;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.TestLog;
|
||||
import com.ibm.icu.impl.ICUService;
|
||||
import com.ibm.icu.impl.ICUService.Factory;
|
||||
import com.ibm.icu.impl.ICUService.SimpleFactory;
|
||||
import com.ibm.icu.impl.ICUService.Key;
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.impl.ICULocaleService;
|
||||
import com.ibm.icu.impl.ICULocaleService.LocaleKey;
|
||||
import com.ibm.icu.impl.ICULocaleService.ICUResourceBundleFactory;
|
||||
import com.ibm.icu.text.Collator;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -38,9 +32,7 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.SortedMap;
|
||||
|
||||
public class ICUServiceThreadTest extends TestFmwk
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/util/TrieTest.java,v $
|
||||
* $Date: 2002/04/02 21:00:08 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -67,14 +67,14 @@ public final class TrieTest extends TestFmwk
|
||||
IntDataManipulate datamanipulate = new IntDataManipulate();
|
||||
// chartrie should fail with int data
|
||||
try {
|
||||
CharTrie chartrie = new CharTrie(inputStream, datamanipulate);
|
||||
/*CharTrie chartrie = */new CharTrie(inputStream, datamanipulate);
|
||||
errln("CharTrie should fail with Int data during construction");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
// inttrie should pass with int data
|
||||
try {
|
||||
inputStream.reset();
|
||||
IntTrie m_trie_ = new IntTrie(inputStream, datamanipulate);
|
||||
/*IntTrie m_trie_ = */new IntTrie(inputStream, datamanipulate);
|
||||
} catch (Exception e) {
|
||||
errln("Failed reading IntTrie data");
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/util/VersionInfoTest.java,v $
|
||||
* $Date: 2002/03/27 01:59:46 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2003/05/14 19:03:17 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -52,7 +52,7 @@ public final class VersionInfoTest extends TestFmwk
|
||||
*/
|
||||
public void TestInstance()
|
||||
{
|
||||
VersionInfo version;
|
||||
VersionInfo version=null;
|
||||
for (int i = 0; i < INSTANCE_INVALID_STRING_.length; i ++) {
|
||||
try {
|
||||
version =
|
||||
@ -84,6 +84,7 @@ public final class VersionInfoTest extends TestFmwk
|
||||
errln("valid ints should not produce an exception");
|
||||
}
|
||||
}
|
||||
if(version==null){};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,15 +5,14 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/BreakIterator.java,v $
|
||||
* $Date: 2003/05/05 23:42:17 $
|
||||
* $Revision: 1.17 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.18 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.lang.reflect.Method;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
import java.util.Locale;
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/BreakIteratorFactory.java,v $
|
||||
* $Date: 2003/05/05 23:42:17 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -21,13 +21,8 @@ import java.util.ResourceBundle;
|
||||
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.impl.ICULocaleService;
|
||||
import com.ibm.icu.impl.ICULocaleService.LocaleKey;
|
||||
import com.ibm.icu.impl.ICULocaleService.ICUResourceBundleFactory;
|
||||
import com.ibm.icu.impl.ICUService;
|
||||
import com.ibm.icu.impl.ICUService.Factory;
|
||||
import com.ibm.icu.impl.ICUService.Key;
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
|
||||
/**
|
||||
* @author Ram
|
||||
*
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/BreakTransliterator.java,v $
|
||||
* $Date: 2003/01/28 18:55:41 $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -79,7 +79,7 @@ final class BreakTransliterator extends Transliterator {
|
||||
// To make things much easier, we will stack the boundaries, and then insert at the end.
|
||||
// generally, we won't need too many, since we will be filtered.
|
||||
|
||||
for(boundary = bi.first(); boundary != bi.DONE && boundary < pos.limit; boundary = bi.next()) {
|
||||
for(boundary = bi.first(); boundary != BreakIterator.DONE && boundary < pos.limit; boundary = bi.next()) {
|
||||
if (boundary == 0) continue;
|
||||
// HACK: Check to see that preceeding item was a letter
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/CanonicalIterator.java,v $
|
||||
* $Date: 2003/01/28 18:55:41 $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -315,7 +315,7 @@ public final class CanonicalIterator {
|
||||
// there were some matches, so add all the possibilities to the set.
|
||||
String prefix= segment.substring(0,i);
|
||||
prefix += UTF16.valueOf(cp);
|
||||
int el = -1;
|
||||
//int el = -1;
|
||||
Iterator iter = remainder.iterator();
|
||||
while (iter.hasNext()) {
|
||||
String item = (String) iter.next();
|
||||
|
@ -286,10 +286,10 @@ public final class CollationElementIterator
|
||||
// couldn't find a good CE in the tailoring
|
||||
// if we got here, the codepoint MUST be over 0xFF - so we look
|
||||
// directly in the UCA
|
||||
result = m_collator_.UCA_.m_trie_.getLeadValue(ch);
|
||||
result = RuleBasedCollator.UCA_.m_trie_.getLeadValue(ch);
|
||||
if (RuleBasedCollator.isSpecial(result)) {
|
||||
// UCA also gives us a special CE
|
||||
result = nextSpecial(m_collator_.UCA_, result, ch);
|
||||
result = nextSpecial(RuleBasedCollator.UCA_, result, ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/CollationRuleParser.java,v $
|
||||
* $Date: 2003/04/09 20:03:43 $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.13 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -1687,9 +1687,9 @@ final class CollationRuleParser
|
||||
}
|
||||
current++;
|
||||
}
|
||||
int nextBrace = -1;
|
||||
//int nextBrace = -1;
|
||||
|
||||
if(noOpenBraces != 0 || (nextBrace = source.indexOf("]", start+current) /*']'*/) == -1) {
|
||||
if(noOpenBraces != 0 || (/*nextBrace =*/ source.indexOf("]", start+current) /*']'*/) == -1) {
|
||||
throwParseException(m_rules_, start);
|
||||
}
|
||||
return new UnicodeSet(source.substring(start, start+current)); //uset_openPattern(start, current);
|
||||
@ -1878,7 +1878,7 @@ final class CollationRuleParser
|
||||
|
||||
m_parsedToken_.m_strength_ = TOKEN_UNSET_;
|
||||
int sourcelimit = m_source_.length();
|
||||
int expandNext = 0;
|
||||
//int expandNext = 0;
|
||||
|
||||
while (m_current_ < sourcelimit) {
|
||||
m_parsedToken_.m_prefixOffset_ = 0;
|
||||
|
@ -5,22 +5,20 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/CollatorServiceShim.java,v $
|
||||
* $Date: 2003/05/13 16:33:01 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.impl.ICULocaleService;
|
||||
import com.ibm.icu.impl.ICULocaleService.ICUResourceBundleFactory;
|
||||
import com.ibm.icu.impl.ICULocaleService.LocaleKeyFactory;
|
||||
import com.ibm.icu.impl.ICUService;
|
||||
import com.ibm.icu.impl.ICUService.Factory;
|
||||
|
@ -5,14 +5,13 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/ComposedCharIter.java,v $
|
||||
* $Date: 2002/12/11 23:36:58 $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import com.ibm.icu.impl.NormalizerImpl;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
/**
|
||||
* <tt>ComposedCharIter</tt> is an iterator class that returns all
|
||||
|
@ -5,15 +5,14 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/CompoundTransliterator.java,v $
|
||||
* $Date: 2003/01/28 18:55:41 $
|
||||
* $Revision: 1.32 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.33 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.impl.UtilityExtensions;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,6 @@ package com.ibm.icu.text;
|
||||
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
import java.text.FieldPosition;
|
||||
@ -17,7 +16,6 @@ import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* DateFormat is an abstract class for date/time formatting subclasses which
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/DateFormatSymbols.java,v $
|
||||
* $Date: 2003/03/07 01:05:48 $
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.17 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -20,13 +20,9 @@ import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
* <code>DateFormatSymbols</code> is a public class for encapsulating
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/DecimalFormat.java,v $
|
||||
* $Date: 2003/04/24 22:58:04 $
|
||||
* $Revision: 1.29 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.30 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -1592,7 +1592,7 @@ public class DecimalFormat extends NumberFormat {
|
||||
pos = match(text, pos, getCurrency().getCurrencyCode());
|
||||
} else {
|
||||
ParsePosition ppos = new ParsePosition(pos);
|
||||
Number n = currencyChoice.parse(text, ppos);
|
||||
/* Number n = */currencyChoice.parse(text, ppos);
|
||||
pos = (ppos.getIndex() == pos) ? -1 : ppos.getIndex();
|
||||
}
|
||||
continue;
|
||||
|
@ -9,7 +9,6 @@
|
||||
*/
|
||||
|
||||
package com.ibm.icu.text;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
/**
|
||||
* A replacer that calls a transliterator to generate its output text.
|
||||
|
@ -5,13 +5,12 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/Attic/HexToUnicodeTransliterator.java,v $
|
||||
* $Date: 2002/12/03 18:56:44 $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.15 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import java.util.*;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
/**
|
||||
|
@ -3,11 +3,10 @@
|
||||
* others. All Rights Reserved.
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/NameUnicodeTransliterator.java,v $
|
||||
* $Date: 2002/09/19 23:17:02 $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.14 $
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import java.util.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.impl.UCharacterProperty;
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/Normalizer.java,v $
|
||||
* $Date: 2003/04/09 21:38:57 $
|
||||
* $Revision: 1.30 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.31 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -2659,7 +2659,7 @@ public final class Normalizer implements Cloneable{
|
||||
|
||||
char[] fcd1 = new char[300];
|
||||
char[] fcd2 = new char[300];
|
||||
int f1Index, f2Index, d1Index, d2Index;
|
||||
|
||||
Normalizer.Mode mode;
|
||||
int result;
|
||||
|
||||
@ -2671,7 +2671,6 @@ public final class Normalizer implements Cloneable{
|
||||
}
|
||||
|
||||
UnicodeSet nx=NormalizerImpl.getNX((int)(options>>Normalizer.COMPARE_NORM_OPTIONS_SHIFT));
|
||||
d1Index=d2Index=0;
|
||||
options|= NormalizerImpl.COMPARE_EQUIV;
|
||||
result=0;
|
||||
|
||||
@ -2705,7 +2704,6 @@ public final class Normalizer implements Cloneable{
|
||||
if((options& Normalizer.INPUT_IS_FCD)==0) {
|
||||
char[] dest;
|
||||
int fcdLen1, fcdLen2;
|
||||
int foldLen1, foldLen2;
|
||||
boolean isFCD1, isFCD2;
|
||||
|
||||
// check if s1 and/or s2 fulfill the FCD conditions
|
||||
|
@ -5,13 +5,12 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/NullTransliterator.java,v $
|
||||
* $Date: 2002/12/03 18:57:36 $
|
||||
* $Revision: 1.11 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* A transliterator that leaves text unchanged.
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/NumberFormatServiceShim.java,v $
|
||||
* $Date: 2003/05/13 16:33:01 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -21,7 +21,6 @@ import com.ibm.icu.impl.ICUService;
|
||||
import com.ibm.icu.impl.ICUService.Factory;
|
||||
import com.ibm.icu.impl.ICUService.Key;
|
||||
import com.ibm.icu.impl.ICULocaleService;
|
||||
import com.ibm.icu.impl.ICULocaleService.ICUResourceBundleFactory;
|
||||
import com.ibm.icu.impl.ICULocaleService.LocaleKey;
|
||||
import com.ibm.icu.impl.ICULocaleService.LocaleKeyFactory;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
|
@ -5,13 +5,13 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/RemoveTransliterator.java,v $
|
||||
* $Date: 2002/02/16 03:06:12 $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* A transliterator that removes characters. This is useful in conjunction
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/RuleBasedNumberFormat.java,v $
|
||||
* $Date: 2003/04/15 14:58:17 $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.13 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -21,7 +21,7 @@ import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Vector;
|
||||
|
||||
|
||||
/**
|
||||
* <p>A class that formats numbers according to a set of rules. This number formatter is
|
||||
@ -472,7 +472,7 @@ import java.util.Vector;
|
||||
* using these features.</p>
|
||||
*
|
||||
* @author Richard Gillam
|
||||
* $RCSfile: RuleBasedNumberFormat.java,v $ $Revision: 1.12 $ $Date: 2003/04/15 14:58:17 $
|
||||
* $RCSfile: RuleBasedNumberFormat.java,v $ $Revision: 1.13 $ $Date: 2003/05/14 19:03:31 $
|
||||
* @see NumberFormat
|
||||
* @see DecimalFormat
|
||||
* @stable ICU 2.0
|
||||
@ -1058,7 +1058,7 @@ public final class RuleBasedNumberFormat extends NumberFormat {
|
||||
// then pull out that collator's rules, append any additional
|
||||
// rules specified in the description, and create a _new_
|
||||
// collator based on the combinaiton of those rules
|
||||
RuleBasedCollator temp = (RuleBasedCollator)collator.getInstance(locale);
|
||||
RuleBasedCollator temp = (RuleBasedCollator)Collator.getInstance(locale);
|
||||
String rules = temp.getRules() + lenientParseRules;
|
||||
|
||||
collator = new RuleBasedCollator(rules);
|
||||
|
@ -5,18 +5,15 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/RuleBasedTransliterator.java,v $
|
||||
* $Date: 2002/12/03 18:57:36 $
|
||||
* $Revision: 1.58 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.59 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import java.text.ParsePosition;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.impl.data.ResourceReader;
|
||||
|
||||
|
||||
/**
|
||||
* <code>RuleBasedTransliterator</code> is a transliterator
|
||||
@ -474,6 +471,9 @@ public class RuleBasedTransliterator extends Transliterator {
|
||||
|
||||
/**
|
||||
* $Log: RuleBasedTransliterator.java,v $
|
||||
* Revision 1.59 2003/05/14 19:03:30 rviswanadha
|
||||
* jitterbug 2836: fix compiler warnings
|
||||
*
|
||||
* Revision 1.58 2002/12/03 18:57:36 alan
|
||||
* jitterbug 2087: fix @ tags
|
||||
*
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/SimpleDateFormat.java,v $
|
||||
* $Date: 2003/04/04 19:20:52 $
|
||||
* $Revision: 1.20 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.21 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -22,8 +22,6 @@ import com.ibm.icu.impl.UCharacterProperty;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.lang.ClassNotFoundException;
|
||||
import java.lang.StringIndexOutOfBoundsException;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.ParsePosition;
|
||||
@ -511,7 +509,7 @@ public class SimpleDateFormat extends DateFormat {
|
||||
int maxIntCount = Integer.MAX_VALUE;
|
||||
String current = "";
|
||||
|
||||
if ((patternCharIndex=formatData.patternChars.indexOf(ch)) == -1) {
|
||||
if ((patternCharIndex=DateFormatSymbols.patternChars.indexOf(ch)) == -1) {
|
||||
throw new IllegalArgumentException("Illegal pattern character " +
|
||||
"'" + ch + "'");
|
||||
}
|
||||
@ -1027,7 +1025,7 @@ public class SimpleDateFormat extends DateFormat {
|
||||
ParsePosition pos = new ParsePosition(0);
|
||||
int patternCharIndex = -1;
|
||||
|
||||
if ((patternCharIndex=formatData.patternChars.indexOf(ch)) == -1) {
|
||||
if ((patternCharIndex=DateFormatSymbols.patternChars.indexOf(ch)) == -1) {
|
||||
return -start;
|
||||
}
|
||||
|
||||
@ -1355,7 +1353,7 @@ public class SimpleDateFormat extends DateFormat {
|
||||
*/
|
||||
public String toLocalizedPattern() {
|
||||
return translatePattern(pattern,
|
||||
formatData.patternChars,
|
||||
DateFormatSymbols.patternChars,
|
||||
formatData.localPatternChars);
|
||||
}
|
||||
|
||||
@ -1375,7 +1373,7 @@ public class SimpleDateFormat extends DateFormat {
|
||||
public void applyLocalizedPattern(String pattern) {
|
||||
this.pattern = translatePattern(pattern,
|
||||
formatData.localPatternChars,
|
||||
formatData.patternChars);
|
||||
DateFormatSymbols.patternChars);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/StringSearch.java,v $
|
||||
* $Date: 2003/04/09 20:03:43 $
|
||||
* $Revision: 1.20 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.21 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -2417,7 +2417,7 @@ public final class StringSearch extends SearchIterator
|
||||
*/
|
||||
private int doPreviousCanonicalPrefixMatch(int textoffset)
|
||||
{
|
||||
int safelength = 0;
|
||||
// int safelength = 0;
|
||||
StringBuffer safetext;
|
||||
int safeoffset = textoffset;
|
||||
|
||||
@ -2425,7 +2425,7 @@ public final class StringSearch extends SearchIterator
|
||||
&& m_collator_.isUnsafe(m_canonicalPrefixAccents_.charAt(
|
||||
m_canonicalPrefixAccents_.length() - 1))) {
|
||||
safeoffset = getNextSafeOffset(textoffset, m_textLimitOffset_);
|
||||
safelength = safeoffset - textoffset;
|
||||
//safelength = safeoffset - textoffset;
|
||||
safetext = merge(m_canonicalPrefixAccents_, targetText, textoffset,
|
||||
safeoffset, null);
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
* others. All Rights Reserved.
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/TransformTransliterator.java,v $
|
||||
* $Date: 2002/02/16 03:06:16 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.6 $
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import java.util.*;
|
||||
//import java.util.*;
|
||||
|
||||
abstract class TransformTransliterator {
|
||||
// Currently unused
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/TransliterationRule.java,v $
|
||||
* $Date: 2003/01/28 18:55:42 $
|
||||
* $Revision: 1.48 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.49 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -46,7 +46,7 @@ import com.ibm.icu.impl.Utility;
|
||||
* <p>Copyright © IBM Corporation 1999. All rights reserved.
|
||||
*
|
||||
* @author Alan Liu
|
||||
* @version $RCSfile: TransliterationRule.java,v $ $Revision: 1.48 $ $Date: 2003/01/28 18:55:42 $
|
||||
* @version $RCSfile: TransliterationRule.java,v $ $Revision: 1.49 $ $Date: 2003/05/14 19:03:30 $
|
||||
*/
|
||||
class TransliterationRule {
|
||||
|
||||
@ -495,7 +495,7 @@ class TransliterationRule {
|
||||
* given string.
|
||||
*/
|
||||
public String toRule(boolean escapeUnprintable) {
|
||||
int i;
|
||||
// int i;
|
||||
|
||||
StringBuffer rule = new StringBuffer();
|
||||
|
||||
@ -583,6 +583,9 @@ class TransliterationRule {
|
||||
|
||||
/**
|
||||
* $Log: TransliterationRule.java,v $
|
||||
* Revision 1.49 2003/05/14 19:03:30 rviswanadha
|
||||
* jitterbug 2836: fix compiler warnings
|
||||
*
|
||||
* Revision 1.48 2003/01/28 18:55:42 rviswanadha
|
||||
* jitterbug 2309: Modularize ICU4J big bang commit
|
||||
*
|
||||
|
@ -8,7 +8,6 @@
|
||||
**********************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.lang.*;
|
||||
|
||||
/**
|
||||
@ -20,7 +19,7 @@ import com.ibm.icu.lang.*;
|
||||
* variants with the system which are then accessed via their IDs.
|
||||
*
|
||||
* @author Alan Liu
|
||||
* @version $RCSfile: UnescapeTransliterator.java,v $ $Revision: 1.5 $ $Date: 2002/02/25 22:43:58 $
|
||||
* @version $RCSfile: UnescapeTransliterator.java,v $ $Revision: 1.6 $ $Date: 2003/05/14 19:03:30 $
|
||||
*/
|
||||
class UnescapeTransliterator extends Transliterator {
|
||||
|
||||
|
@ -3,11 +3,10 @@
|
||||
* others. All Rights Reserved.
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/UnicodeNameTransliterator.java,v $
|
||||
* $Date: 2002/09/09 16:11:07 $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2003/05/14 19:03:30 $
|
||||
* $Revision: 1.10 $
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import java.util.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
|
||||
/**
|
||||
|
@ -5,16 +5,14 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/UnicodeSetIterator.java,v $
|
||||
* $Date: 2002/12/09 16:40:00 $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.13 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* UnicodeSetIterator iterates over the contents of a UnicodeSet. It
|
||||
|
@ -5,13 +5,13 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/Attic/UnicodeToHexTransliterator.java,v $
|
||||
* $Date: 2002/12/03 18:56:46 $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2003/05/14 19:03:31 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* A transliterator that converts from Unicode characters to
|
||||
|
@ -3,13 +3,11 @@
|
||||
* others. All Rights Reserved.
|
||||
*********************************************************************
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/ChineseCalendar.java,v $
|
||||
* $Date: 2002/12/18 19:35:06 $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2003/05/14 19:03:48 $
|
||||
* $Revision: 1.15 $
|
||||
*/
|
||||
package com.ibm.icu.util;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/Currency.java,v $
|
||||
* $Date: 2003/04/21 21:02:42 $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2003/05/14 19:03:48 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -19,7 +19,6 @@ import java.util.ResourceBundle;
|
||||
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
|
||||
/**
|
||||
* A class encapsulating a currency, as defined by ISO 4217. A
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/CurrencyServiceShim.java,v $
|
||||
* $Date: 2003/05/05 23:42:18 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2003/05/14 19:03:48 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -17,10 +17,8 @@ import java.util.Locale;
|
||||
import com.ibm.icu.impl.ICULocaleData;
|
||||
|
||||
import com.ibm.icu.impl.ICUService;
|
||||
import com.ibm.icu.impl.ICUService.Key;
|
||||
import com.ibm.icu.impl.ICUService.Factory;
|
||||
import com.ibm.icu.impl.ICULocaleService;
|
||||
import com.ibm.icu.impl.ICULocaleService.ICUResourceBundleFactory;
|
||||
|
||||
/**
|
||||
* This is a package-access implementation of registration for
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/util/IslamicCalendar.java,v $
|
||||
* $Date: 2002/12/18 19:35:07 $
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 2003/05/14 19:03:48 $
|
||||
* $Revision: 1.17 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -14,9 +14,7 @@ package com.ibm.icu.util;
|
||||
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import java.util.Date;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
import java.util.Locale;
|
||||
import com.ibm.icu.util.CalendarAstronomer;
|
||||
|
||||
/**
|
||||
* <code>IslamicCalendar</code> is a subclass of <code>Calendar</code>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user