mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
parent
ca631eaa26
commit
3c44e031be
179 changed files with 523 additions and 268 deletions
|
@ -23,7 +23,7 @@ import com.ibm.icu.text.LocaleDisplayNames.DialectHandling;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestLocaleNamePackaging extends TestFmwk {
|
||||
public class TestLocaleNamePackaging extends CoreTestFmwk {
|
||||
public TestLocaleNamePackaging() {
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -21,7 +22,6 @@ import com.ibm.icu.dev.test.ModuleTest.TestDataPair;
|
|||
import com.ibm.icu.dev.test.TestDataModule;
|
||||
import com.ibm.icu.dev.test.TestDataModule.DataMap;
|
||||
import com.ibm.icu.dev.test.TestDataModule.TestData;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.util.CalendarFieldsSet;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
|
@ -40,7 +40,7 @@ import junitparams.Parameters;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnitParamsRunner.class)
|
||||
public class DataDrivenCalendarTest extends TestFmwk {
|
||||
public class DataDrivenCalendarTest extends CoreTestFmwk {
|
||||
|
||||
public DataDrivenCalendarTest() {
|
||||
//super("com/ibm/icu/dev/data/testdata/", "calendar");
|
||||
|
@ -54,7 +54,6 @@ public class DataDrivenCalendarTest extends TestFmwk {
|
|||
/* (non-Javadoc)
|
||||
* @see com.ibm.icu.dev.test.ModuleTest#processModules()
|
||||
*/
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
@Parameters(method="getTestData")
|
||||
public void calendarTest(TestDataPair pair) {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -28,7 +29,6 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.impl.number.DecimalFormatProperties;
|
||||
import com.ibm.icu.impl.number.PatternStringParser;
|
||||
import com.ibm.icu.text.CompactDecimalFormat;
|
||||
|
@ -41,7 +41,7 @@ import com.ibm.icu.util.CurrencyAmount;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CompactDecimalFormatTest extends TestFmwk {
|
||||
public class CompactDecimalFormatTest extends CoreTestFmwk {
|
||||
Object[][] EnglishTestData = {
|
||||
// default is 2 digits of accuracy
|
||||
{0.0d, "0"},
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
|
@ -23,7 +24,6 @@ import com.ibm.icu.dev.test.ModuleTest.TestDataPair;
|
|||
import com.ibm.icu.dev.test.TestDataModule;
|
||||
import com.ibm.icu.dev.test.TestDataModule.DataMap;
|
||||
import com.ibm.icu.dev.test.TestDataModule.TestData;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.util.CalendarFieldsSet;
|
||||
import com.ibm.icu.dev.test.util.DateTimeStyleSet;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
|
@ -41,7 +41,7 @@ import junitparams.Parameters;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnitParamsRunner.class)
|
||||
public class DataDrivenFormatTest extends TestFmwk {
|
||||
public class DataDrivenFormatTest extends CoreTestFmwk {
|
||||
|
||||
/**
|
||||
* @param baseName
|
||||
|
@ -59,7 +59,6 @@ public class DataDrivenFormatTest extends TestFmwk {
|
|||
/* (non-Javadoc)
|
||||
* @see com.ibm.icu.dev.test.ModuleTest#processModules()
|
||||
*/
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
@Parameters(method="getTestData")
|
||||
public void formatTest(TestDataPair pair) {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -69,7 +70,7 @@ import com.ibm.icu.util.UResourceBundle;
|
|||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatTest extends TestFmwk {
|
||||
public class DateFormatTest extends CoreTestFmwk {
|
||||
/**
|
||||
* Verify that patterns have the correct values and could produce the
|
||||
* the DateFormat instances that contain the correct localized patterns.
|
||||
|
@ -614,7 +615,6 @@ public class DateFormatTest extends TestFmwk {
|
|||
expect(DATA, new Locale("en", "", ""));
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void TestGenericTime() {
|
||||
|
||||
|
@ -720,7 +720,6 @@ public class DateFormatTest extends TestFmwk {
|
|||
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void TestGenericTimeZoneOrder() {
|
||||
// generic times should parse the same no matter what the placement of the time zone string
|
||||
|
@ -2202,7 +2201,6 @@ public class DateFormatTest extends TestFmwk {
|
|||
/**
|
||||
* Test DateFormat(Calendar) API
|
||||
*/
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void TestDateFormatCalendar() {
|
||||
DateFormat date=null, time=null, full=null;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.AttributedCharacterIterator;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
|
@ -38,11 +39,12 @@ import com.ibm.icu.util.ULocale;
|
|||
// try to test the full functionality. It just calls each function in the class and
|
||||
// verifies that it works on a basic level.
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDecimalFormatAPIC extends TestFmwk {
|
||||
public class IntlTestDecimalFormatAPIC extends CoreTestFmwk {
|
||||
|
||||
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
|
||||
@Test
|
||||
public void TestAPI() {
|
||||
Locale startLocale = Locale.getDefault();
|
||||
|
||||
logln("DecimalFormat API test---");
|
||||
logln("");
|
||||
|
@ -250,6 +252,7 @@ public class IntlTestDecimalFormatAPIC extends TestFmwk {
|
|||
// errln("ERROR: Couldn't create a DecimalFormat");
|
||||
// }
|
||||
|
||||
Locale.setDefault(startLocale);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -29,7 +30,7 @@ import com.ibm.icu.text.DecimalFormatSymbols;
|
|||
* Tests for DecimalFormatSymbols
|
||||
**/
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDecimalFormatSymbolsC extends TestFmwk {
|
||||
public class IntlTestDecimalFormatSymbolsC extends CoreTestFmwk {
|
||||
/**
|
||||
* Test the API of DecimalFormatSymbols; primarily a simple get/set set.
|
||||
*/
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -60,7 +61,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* @author markdavis
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class MeasureUnitTest extends TestFmwk {
|
||||
public class MeasureUnitTest extends CoreTestFmwk {
|
||||
|
||||
static class OrderedPair<F extends Comparable, S extends Comparable> extends Pair<F, S> implements Comparable<OrderedPair<F, S>> {
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
|
@ -38,7 +39,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* Performs regression test for MessageFormat
|
||||
**/
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatRegressionTest extends TestFmwk {
|
||||
public class NumberFormatRegressionTest extends CoreTestFmwk {
|
||||
/**
|
||||
* alphaWorks upgrade
|
||||
*/
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -24,7 +25,7 @@ import com.ibm.icu.util.ULocale;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatSpecificationTest extends TestFmwk {
|
||||
public class NumberFormatSpecificationTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestBasicPatterns() {
|
||||
double num = 1234.567;
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.dev.test.TestUtil;
|
||||
import com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPIC.FieldContainer;
|
||||
import com.ibm.icu.impl.DontCareFieldPosition;
|
||||
|
@ -69,7 +69,7 @@ import com.ibm.icu.util.CurrencyAmount;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatTest extends TestFmwk {
|
||||
public class NumberFormatTest extends CoreTestFmwk {
|
||||
|
||||
@Test
|
||||
public void TestRoundingScientific10542() {
|
||||
|
@ -208,7 +208,7 @@ public class NumberFormatTest extends TestFmwk {
|
|||
double value = parser.parse("-0,5").doubleValue();
|
||||
assertEquals("Expect -0.5", -0.5, value);
|
||||
} catch (ParseException e) {
|
||||
TestFmwk.errln("Parsing -0.5 should have succeeded.");
|
||||
errln("Parsing -0.5 should have succeeded.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ public class NumberFormatTest extends TestFmwk {
|
|||
double value = parser.parse("\u208B0.5").doubleValue();
|
||||
assertEquals("Expect -0.5", -0.5, value);
|
||||
} catch (ParseException e) {
|
||||
TestFmwk.errln("Parsing -0.5 should have succeeded.");
|
||||
errln("Parsing -0.5 should have succeeded.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4625,14 +4625,14 @@ public class NumberFormatTest extends TestFmwk {
|
|||
result = parser.parse(value2Parse).doubleValue();
|
||||
assertEquals("wrong parsed value", parseValue, result);
|
||||
} catch (ParseException e) {
|
||||
TestFmwk.errln("Parsing " + value2Parse + " should have succeeded with " + testPattern[i] +
|
||||
errln("Parsing " + value2Parse + " should have succeeded with " + testPattern[i] +
|
||||
" and isDecimalPointMatchRequired set to: " + parser.isDecimalPatternMatchRequired());
|
||||
}
|
||||
try {
|
||||
result = parser.parse(value2ParseWithDecimal).doubleValue();
|
||||
assertEquals("wrong parsed value", parseValueWithDecimal, result);
|
||||
} catch (ParseException e) {
|
||||
TestFmwk.errln("Parsing " + value2ParseWithDecimal + " should have succeeded with " + testPattern[i] +
|
||||
errln("Parsing " + value2ParseWithDecimal + " should have succeeded with " + testPattern[i] +
|
||||
" and isDecimalPointMatchRequired set to: " + parser.isDecimalPatternMatchRequired());
|
||||
}
|
||||
|
||||
|
@ -4640,7 +4640,7 @@ public class NumberFormatTest extends TestFmwk {
|
|||
try {
|
||||
result = parser.parse(value2Parse).doubleValue();
|
||||
if(hasDecimalPoint){
|
||||
TestFmwk.errln("Parsing " + value2Parse + " should NOT have succeeded with " + testPattern[i] +
|
||||
errln("Parsing " + value2Parse + " should NOT have succeeded with " + testPattern[i] +
|
||||
" and isDecimalPointMatchRequired set to: " + parser.isDecimalPatternMatchRequired());
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
|
@ -4649,7 +4649,7 @@ public class NumberFormatTest extends TestFmwk {
|
|||
try {
|
||||
result = parser.parse(value2ParseWithDecimal).doubleValue();
|
||||
if(!hasDecimalPoint){
|
||||
TestFmwk.errln("Parsing " + value2ParseWithDecimal + " should NOT have succeeded with " + testPattern[i] +
|
||||
errln("Parsing " + value2ParseWithDecimal + " should NOT have succeeded with " + testPattern[i] +
|
||||
" and isDecimalPointMatchRequired set to: " + parser.isDecimalPatternMatchRequired() +
|
||||
" (got: " + result + ")");
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.impl.ICUData;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
|
@ -56,7 +56,7 @@ import com.ibm.icu.util.ULocale;
|
|||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberRegressionTests extends TestFmwk {
|
||||
public class NumberRegressionTests extends CoreTestFmwk {
|
||||
private static final char EURO = '\u20ac';
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -33,7 +34,7 @@ import com.ibm.icu.util.ULocale;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class PluralRangesTest extends TestFmwk {
|
||||
public class PluralRangesTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestLocaleData() {
|
||||
String[][] tests = {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -73,7 +74,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* @author markdavis (Mark Davis) [for fractional support]
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class PluralRulesTest extends TestFmwk {
|
||||
public class PluralRulesTest extends CoreTestFmwk {
|
||||
|
||||
PluralRulesFactory factory = PluralRulesFactory.NORMAL;
|
||||
|
||||
|
@ -1712,6 +1713,8 @@ public class PluralRulesTest extends TestFmwk {
|
|||
|
||||
@Test
|
||||
public void testBug20264() {
|
||||
Locale startLocale = Locale.getDefault();
|
||||
|
||||
String expected = "1.23400";
|
||||
FixedDecimal fd = new FixedDecimal(1.234, 5, 2);
|
||||
assertEquals("FixedDecimal toString", expected, fd.toString());
|
||||
|
@ -1719,6 +1722,8 @@ public class PluralRulesTest extends TestFmwk {
|
|||
assertEquals("FixedDecimal toString", expected, fd.toString());
|
||||
Locale.setDefault(Locale.GERMAN);
|
||||
assertEquals("FixedDecimal toString", expected, fd.toString());
|
||||
|
||||
Locale.setDefault(startLocale);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.math.BigInteger;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
@ -31,7 +32,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* introduces a dependency on collation. See RbnfLenientScannerTest.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class RbnfTest extends TestFmwk {
|
||||
public class RbnfTest extends CoreTestFmwk {
|
||||
static String fracRules =
|
||||
"%main:\n" +
|
||||
// this rule formats the number if it's 1 or more. It formats
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
|
@ -47,7 +47,7 @@ import com.ibm.icu.util.TimeZone;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestMessageFormat extends TestFmwk {
|
||||
public class TestMessageFormat extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestBug3()
|
||||
{
|
||||
|
@ -151,7 +151,6 @@ public class TestMessageFormat extends TestFmwk {
|
|||
}
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void TestPattern() // aka PatternTest()
|
||||
{
|
||||
|
@ -270,7 +269,6 @@ public class TestMessageFormat extends TestFmwk {
|
|||
form.format(testArgs1, buffer2, fieldpos).toString());
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void TestStaticFormat()
|
||||
{
|
||||
|
@ -808,7 +806,6 @@ public class TestMessageFormat extends TestFmwk {
|
|||
* Verify that MessageFormat accommodates more than 10 arguments and
|
||||
* more than 10 subformats.
|
||||
*/
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void TestUnlimitedArgsAndSubformats() {
|
||||
final String pattern =
|
||||
|
@ -1226,7 +1223,6 @@ public class TestMessageFormat extends TestFmwk {
|
|||
} catch (IllegalArgumentException e) {}
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void testNumericFormatWithMap() {
|
||||
MessageFormat mf = new MessageFormat("X:{2} Y:{1}");
|
||||
|
@ -1603,7 +1599,6 @@ public class TestMessageFormat extends TestFmwk {
|
|||
}
|
||||
|
||||
// Test case for formatToCharacterIterator
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void TestFormatToCharacterIterator() {
|
||||
MessageFormat[] msgfmts = {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
|
@ -53,7 +54,7 @@ import com.ibm.icu.util.TimeZoneTransition;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class TimeZoneFormatTest extends TestFmwk {
|
||||
public class TimeZoneFormatTest extends CoreTestFmwk {
|
||||
|
||||
private static boolean JDKTZ = (TimeZone.getDefaultTimeZoneType() == TimeZone.TIMEZONE_JDK);
|
||||
private static final Pattern EXCL_TZ_PATTERN = Pattern.compile(".*/Riyadh8[7-9]");
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.math.BigDecimal;
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.CurrencyAmount;
|
||||
|
@ -27,7 +27,7 @@ import com.ibm.icu.util.CurrencyAmount;
|
|||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
@SuppressWarnings("javadoc")
|
||||
public class Mf2FeaturesTest extends TestFmwk {
|
||||
public class Mf2FeaturesTest extends CoreTestFmwk {
|
||||
|
||||
// November 23, 2022 at 7:42:37.123 PM
|
||||
static final Date TEST_DATE = new Date(1669261357123L);
|
||||
|
@ -59,7 +59,6 @@ public class Mf2FeaturesTest extends TestFmwk {
|
|||
.build());
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void testArgumentMissing() {
|
||||
// Test to check what happens if an argument name from the placeholder is not found
|
||||
|
@ -88,7 +87,6 @@ public class Mf2FeaturesTest extends TestFmwk {
|
|||
.build());
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void testDefaultLocale() {
|
||||
String message = "{Date: {$date :datetime skeleton=yMMMMdEEEE}.}";
|
||||
|
@ -124,7 +122,6 @@ public class Mf2FeaturesTest extends TestFmwk {
|
|||
Locale.setDefault(originalLocale);
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void testAllKindOfDates() {
|
||||
// Default function
|
||||
|
@ -361,7 +358,6 @@ public class Mf2FeaturesTest extends TestFmwk {
|
|||
.build());
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void testDefaultFunctionAndOptions() {
|
||||
TestUtils.runTestCase(new TestCase.Builder()
|
||||
|
@ -436,7 +432,6 @@ public class Mf2FeaturesTest extends TestFmwk {
|
|||
|
||||
// Local Variables
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void testSimpleLocaleVariable() {
|
||||
TestUtils.runTestCase(new TestCase.Builder()
|
||||
|
@ -448,7 +443,6 @@ public class Mf2FeaturesTest extends TestFmwk {
|
|||
.build());
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
public void testLocaleVariableWithSelect() {
|
||||
String message = ""
|
||||
|
|
|
@ -16,7 +16,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.impl.Norm2AllModes;
|
||||
import com.ibm.icu.impl.Normalizer2Impl;
|
||||
import com.ibm.icu.impl.USerializedSet;
|
||||
|
@ -34,7 +34,7 @@ import com.ibm.icu.text.UnicodeSetIterator;
|
|||
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class BasicTest extends TestFmwk {
|
||||
public class BasicTest extends CoreTestFmwk {
|
||||
String[][] canonTests = {
|
||||
// Input Decomposed Composed
|
||||
{ "cat", "cat", "cat" },
|
||||
|
|
|
@ -19,7 +19,7 @@ import org.junit.Assert;
|
|||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.dev.test.format.FormattedValueTest;
|
||||
import com.ibm.icu.dev.test.serializable.SerializableTestUtility;
|
||||
import com.ibm.icu.impl.IllegalIcuArgumentException;
|
||||
|
@ -62,7 +62,7 @@ import com.ibm.icu.util.MeasureUnit;
|
|||
import com.ibm.icu.util.NoUnit;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class NumberFormatterApiTest extends TestFmwk {
|
||||
public class NumberFormatterApiTest extends CoreTestFmwk {
|
||||
|
||||
private static final Currency USD = Currency.getInstance("USD");
|
||||
private static final Currency GBP = Currency.getInstance("GBP");
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.number;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.ibm.icu.impl.StringSegment;
|
||||
|
@ -30,7 +28,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* @author sffc
|
||||
*
|
||||
*/
|
||||
public class NumberParserTest {
|
||||
public class NumberParserTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void testBasic() {
|
||||
Object[][] cases = new Object[][] {
|
||||
|
@ -199,13 +197,13 @@ public class NumberParserTest {
|
|||
|
||||
ParsedNumber resultObject = new ParsedNumber();
|
||||
parser.parse("epäluku", false, resultObject);
|
||||
assertTrue(resultObject.success());
|
||||
assertEquals(Double.NaN, resultObject.getNumber().doubleValue(), 0.0);
|
||||
assertTrue("Parsing locale fi spellout number", resultObject.success());
|
||||
Assert.assertEquals(Double.NaN, resultObject.getNumber().doubleValue(), 0.0);
|
||||
|
||||
resultObject = new ParsedNumber();
|
||||
parser.parse("1,2e3", false, resultObject);
|
||||
assertTrue(resultObject.success());
|
||||
assertEquals(1200.0, resultObject.getNumber().doubleValue(), 0.0);
|
||||
assertTrue("Parsing formatted compact decimal", resultObject.success());
|
||||
Assert.assertEquals(1200.0, resultObject.getNumber().doubleValue(), 0.0);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -219,9 +217,9 @@ public class NumberParserTest {
|
|||
series.addMatcher(IgnorablesMatcher.getInstance(0));
|
||||
series.freeze();
|
||||
|
||||
assertFalse(series.smokeTest(new StringSegment("x", false)));
|
||||
assertFalse(series.smokeTest(new StringSegment("-", false)));
|
||||
assertTrue(series.smokeTest(new StringSegment("+", false)));
|
||||
Assert.assertFalse(series.smokeTest(new StringSegment("x", false)));
|
||||
Assert.assertFalse(series.smokeTest(new StringSegment("-", false)));
|
||||
Assert.assertTrue(series.smokeTest(new StringSegment("+", false)));
|
||||
|
||||
Object[][] cases = new Object[][] {
|
||||
{ "", 0, true },
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.ArrayList;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.dev.test.TestUtil;
|
||||
import com.ibm.icu.number.LocalizedNumberFormatter;
|
||||
import com.ibm.icu.number.NumberFormatter;
|
||||
|
@ -18,7 +18,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* @author sffc
|
||||
*
|
||||
*/
|
||||
public class NumberPermutationTest extends TestFmwk {
|
||||
public class NumberPermutationTest extends CoreTestFmwk {
|
||||
|
||||
static final String[] kSkeletonParts = {
|
||||
// Notation
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Set;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.dev.test.format.FormattedValueTest;
|
||||
import com.ibm.icu.impl.ICUData;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
|
@ -41,7 +41,7 @@ import com.ibm.icu.util.UResourceBundle;
|
|||
* @author sffc
|
||||
*
|
||||
*/
|
||||
public class NumberRangeFormatterTest extends TestFmwk {
|
||||
public class NumberRangeFormatterTest extends CoreTestFmwk {
|
||||
|
||||
private static final Currency USD = Currency.getInstance("USD");
|
||||
private static final Currency CHF = Currency.getInstance("CHF");
|
||||
|
|
|
@ -5,6 +5,7 @@ package com.ibm.icu.dev.test.number;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.ibm.icu.dev.test.format.FormattedValueTest;
|
||||
|
@ -21,7 +22,7 @@ import com.ibm.icu.util.Currency;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/** @author sffc */
|
||||
public class PatternStringTest {
|
||||
public class PatternStringTest extends CoreTestFmwk {
|
||||
|
||||
@Test
|
||||
public void testLocalized() {
|
||||
|
@ -35,8 +36,8 @@ public class PatternStringTest {
|
|||
String localized = "’.'ab'c'b''a'''#,##0a0b'a%'";
|
||||
String toStandard = "+-'ab'c'b''a'''#,##0.0%'a%'";
|
||||
|
||||
assertEquals(localized, PatternStringUtils.convertLocalized(standard, symbols, true));
|
||||
assertEquals(toStandard, PatternStringUtils.convertLocalized(localized, symbols, false));
|
||||
assertEquals("Localized decimal format symbols", localized, PatternStringUtils.convertLocalized(standard, symbols, true));
|
||||
assertEquals("Standard (unlocalized) decimal format symbols", toStandard, PatternStringUtils.convertLocalized(localized, symbols, false));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -7,6 +7,7 @@ import static org.junit.Assert.assertNotEquals;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -42,20 +43,20 @@ import com.ibm.icu.util.Currency.CurrencyUsage;
|
|||
import com.ibm.icu.util.MeasureUnit;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class PropertiesTest {
|
||||
public class PropertiesTest extends CoreTestFmwk {
|
||||
|
||||
@Test
|
||||
public void testBasicEquals() {
|
||||
DecimalFormatProperties p1 = new DecimalFormatProperties();
|
||||
DecimalFormatProperties p2 = new DecimalFormatProperties();
|
||||
assertEquals(p1, p2);
|
||||
assertEquals("DecimalFormatProperties.equals()", p1, p2);
|
||||
|
||||
p1.setPositivePrefix("abc");
|
||||
assertNotEquals(p1, p2);
|
||||
assertNotEquals("DecimalFormatProperties.equals()", p1, p2);
|
||||
p2.setPositivePrefix("xyz");
|
||||
assertNotEquals(p1, p2);
|
||||
assertNotEquals("DecimalFormatProperties.equals()", p1, p2);
|
||||
p1.setPositivePrefix("xyz");
|
||||
assertEquals(p1, p2);
|
||||
assertEquals("DecimalFormatProperties.equals()", p1, p2);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -124,50 +125,50 @@ public class PropertiesTest {
|
|||
Object val0 = getSampleValueForType(field.getType(), 0);
|
||||
Object val1 = getSampleValueForType(field.getType(), 1);
|
||||
Object val2 = getSampleValueForType(field.getType(), 2);
|
||||
assertNotEquals(val0, val1);
|
||||
assertNotEquals("Test setup values should be different", val0, val1);
|
||||
setter.invoke(p1, val0);
|
||||
setter.invoke(p2, val0);
|
||||
assertEquals(p1, p2);
|
||||
assertEquals(p1.hashCode(), p2.hashCode());
|
||||
assertEquals(getter.invoke(p1), getter.invoke(p2));
|
||||
assertEquals(getter.invoke(p1), val0);
|
||||
assertNotEquals(getter.invoke(p1), val1);
|
||||
assertEquals("Equal outputs for equal DecimalFormatProperties inputs", p1, p2);
|
||||
assertEquals("Equal outputs for equal DecimalFormatProperties inputs", p1.hashCode(), p2.hashCode());
|
||||
assertEquals("Equal outputs for equal DecimalFormatProperties inputs", getter.invoke(p1), getter.invoke(p2));
|
||||
assertEquals("Getter returns equal val set by setter for DecimalFormatProperties", getter.invoke(p1), val0);
|
||||
assertNotEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), val1);
|
||||
hashCodes.add(p1.hashCode());
|
||||
setter.invoke(p1, val1);
|
||||
assertNotEquals("Field " + field + " is missing from equals()", p1, p2);
|
||||
assertNotEquals(getter.invoke(p1), getter.invoke(p2));
|
||||
assertNotEquals(getter.invoke(p1), val0);
|
||||
assertEquals(getter.invoke(p1), val1);
|
||||
assertNotEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), getter.invoke(p2));
|
||||
assertNotEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), val0);
|
||||
assertEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), val1);
|
||||
setter.invoke(p1, val0);
|
||||
assertEquals("Field " + field + " setter might have side effects", p1, p2);
|
||||
assertEquals(p1.hashCode(), p2.hashCode());
|
||||
assertEquals(getter.invoke(p1), getter.invoke(p2));
|
||||
assertEquals("Getter returns equal vals for equal inputs", p1.hashCode(), p2.hashCode());
|
||||
assertEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), getter.invoke(p2));
|
||||
setter.invoke(p1, val1);
|
||||
setter.invoke(p2, val1);
|
||||
assertEquals(p1, p2);
|
||||
assertEquals(p1.hashCode(), p2.hashCode());
|
||||
assertEquals(getter.invoke(p1), getter.invoke(p2));
|
||||
assertEquals("Getter returns equal vals for equal inputs", p1, p2);
|
||||
assertEquals("Getter returns equal vals for equal inputs", p1.hashCode(), p2.hashCode());
|
||||
assertEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), getter.invoke(p2));
|
||||
setter.invoke(p1, val2);
|
||||
setter.invoke(p1, val1);
|
||||
assertEquals("Field " + field + " setter might have side effects", p1, p2);
|
||||
assertEquals(p1.hashCode(), p2.hashCode());
|
||||
assertEquals(getter.invoke(p1), getter.invoke(p2));
|
||||
assertEquals("Getter returns equal vals for equal inputs", p1.hashCode(), p2.hashCode());
|
||||
assertEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), getter.invoke(p2));
|
||||
hashCodes.add(p1.hashCode());
|
||||
|
||||
// Check for clone behavior
|
||||
DecimalFormatProperties copy = p1.clone();
|
||||
assertEquals("Field " + field + " did not get copied in clone", p1, copy);
|
||||
assertEquals(p1.hashCode(), copy.hashCode());
|
||||
assertEquals(getter.invoke(p1), getter.invoke(copy));
|
||||
assertEquals("Getter returns equal vals for equal inputs", p1.hashCode(), copy.hashCode());
|
||||
assertEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), getter.invoke(copy));
|
||||
|
||||
// Check for copyFrom behavior
|
||||
setter.invoke(p1, val0);
|
||||
assertNotEquals(p1, p2);
|
||||
assertNotEquals(getter.invoke(p1), getter.invoke(p2));
|
||||
assertNotEquals("Getter returns equal vals for equal inputs", p1, p2);
|
||||
assertNotEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), getter.invoke(p2));
|
||||
p2.copyFrom(p1);
|
||||
assertEquals("Field " + field + " is missing from copyFrom()", p1, p2);
|
||||
assertEquals(p1.hashCode(), p2.hashCode());
|
||||
assertEquals(getter.invoke(p1), getter.invoke(p2));
|
||||
assertEquals("Getter returns equal vals for equal inputs", p1.hashCode(), p2.hashCode());
|
||||
assertEquals("Getter returns equal vals for equal inputs", getter.invoke(p1), getter.invoke(p2));
|
||||
|
||||
// Load values into p3 and p4 for clear() behavior test
|
||||
setter.invoke(p3, getSampleValueForType(field.getType(), 3));
|
||||
|
@ -184,7 +185,7 @@ public class PropertiesTest {
|
|||
}
|
||||
|
||||
// Check for clear() behavior
|
||||
assertNotEquals(p3, p4);
|
||||
assertNotEquals("Setup for check for clear() behavior", p3, p4);
|
||||
p3.clear();
|
||||
p4.clear();
|
||||
assertEquals("A field is missing from the clear() function", p3, p4);
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.impl.breakiter.DictionaryBreakEngine;
|
||||
import com.ibm.icu.impl.breakiter.LSTMBreakEngine;
|
||||
import com.ibm.icu.lang.UScript;
|
||||
|
@ -28,7 +28,7 @@ import com.ibm.icu.util.UResourceBundle;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class LSTMBreakEngineTest extends TestFmwk {
|
||||
public class LSTMBreakEngineTest extends CoreTestFmwk {
|
||||
|
||||
private static final ClassLoader testLoader = LSTMBreakEngineTest.class.getClassLoader();
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.junit.Ignore;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.dev.test.serializable.SerializableTestUtility.Handler;
|
||||
|
||||
import junitparams.JUnitParamsRunner;
|
||||
|
@ -38,7 +38,7 @@ import junitparams.Parameters;
|
|||
* @author emader
|
||||
*/
|
||||
@RunWith(JUnitParamsRunner.class)
|
||||
public class CompatibilityTest extends TestFmwk
|
||||
public class CompatibilityTest extends CoreTestFmwk
|
||||
{
|
||||
private static final class FileHolder {
|
||||
String className;
|
||||
|
@ -78,7 +78,6 @@ public class CompatibilityTest extends TestFmwk
|
|||
}
|
||||
}
|
||||
|
||||
@Ignore // TODO(ICU-22505)
|
||||
@Test
|
||||
@Parameters(method="generateClassList")
|
||||
public void testCompatibility(FileHolder holder) throws ClassNotFoundException, IOException {
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.dev.test.serializable.SerializableTestUtility.Handler;
|
||||
|
||||
import junitparams.JUnitParamsRunner;
|
||||
|
@ -27,7 +27,7 @@ import junitparams.Parameters;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnitParamsRunner.class)
|
||||
public class CoverageTest extends TestFmwk {
|
||||
public class CoverageTest extends CoreTestFmwk {
|
||||
|
||||
@Test
|
||||
@Parameters(method="generateClassList")
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.text.StringPrepParseException;
|
||||
import com.ibm.icu.text.UCharacterIterator;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import com.ibm.icu.text.UCharacterIterator;
|
|||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestIDNARef extends TestFmwk {
|
||||
public class TestIDNARef extends CoreTestFmwk {
|
||||
private StringPrepParseException unassignedException = new StringPrepParseException("",StringPrepParseException.UNASSIGNED_ERROR);
|
||||
|
||||
@Test
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.text.StringPrep;
|
||||
import com.ibm.icu.text.StringPrepParseException;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import com.ibm.icu.text.StringPrepParseException;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestStringPrep extends TestFmwk {
|
||||
public class TestStringPrep extends CoreTestFmwk {
|
||||
/*
|
||||
There are several special identifiers ("who") which need to be
|
||||
understood universally, rather than in the context of a particular
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.impl.CurrencyData;
|
||||
import com.ibm.icu.text.CurrencyDisplayNames;
|
||||
import com.ibm.icu.text.CurrencyMetaInfo;
|
||||
|
@ -43,7 +43,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* @summary General test of Currency
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class CurrencyTest extends TestFmwk {
|
||||
public class CurrencyTest extends CoreTestFmwk {
|
||||
/**
|
||||
* Test of basic API.
|
||||
*/
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.impl.ICUData;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.impl.UResource;
|
||||
|
@ -44,7 +44,7 @@ import com.ibm.icu.util.UResourceBundleIterator;
|
|||
import com.ibm.icu.util.UResourceTypeMismatchException;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public final class ICUResourceBundleTest extends TestFmwk {
|
||||
public final class ICUResourceBundleTest extends CoreTestFmwk {
|
||||
private static final ClassLoader testLoader = ICUResourceBundleTest.class.getClassLoader();
|
||||
|
||||
@Test
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.impl.ICULocaleService;
|
||||
import com.ibm.icu.impl.ICULocaleService.ICUResourceBundleFactory;
|
||||
import com.ibm.icu.impl.ICULocaleService.LocaleKey;
|
||||
|
@ -43,7 +43,7 @@ import com.ibm.icu.impl.LocaleUtility;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ICUServiceTest extends TestFmwk
|
||||
public class ICUServiceTest extends CoreTestFmwk
|
||||
{
|
||||
private String lrmsg(String message, Object lhs, Object rhs) {
|
||||
return message + " lhs: " + lhs + " rhs: " + rhs;
|
||||
|
|
|
@ -16,7 +16,7 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.lang.UScript;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
|
@ -32,7 +32,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class LocaleDataTest extends TestFmwk{
|
||||
public class LocaleDataTest extends CoreTestFmwk{
|
||||
private ULocale[] availableLocales = null;
|
||||
|
||||
public LocaleDataTest(){
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.junit.Assert;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import com.ibm.icu.dev.test.TestUtil;
|
||||
import com.ibm.icu.dev.test.TestUtil.JavaVendor;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
|
@ -59,7 +59,7 @@ import junitparams.JUnitParamsRunner;
|
|||
import junitparams.Parameters;
|
||||
|
||||
@RunWith(JUnitParamsRunner.class)
|
||||
public class ULocaleTest extends TestFmwk {
|
||||
public class ULocaleTest extends CoreTestFmwk {
|
||||
|
||||
// Ticket #8078 and #11674
|
||||
private static final boolean JAVA7_OR_LATER =
|
||||
|
@ -4125,7 +4125,7 @@ public class ULocaleTest extends TestFmwk {
|
|||
|
||||
cldrVersion = LocaleData.getCLDRVersion();
|
||||
|
||||
TestFmwk.logln("uloc_getCLDRVersion() returned: '"+cldrVersion+"'");
|
||||
logln("uloc_getCLDRVersion() returned: '"+cldrVersion+"'");
|
||||
|
||||
// why isn't this public for tests somewhere?
|
||||
final ClassLoader testLoader = ICUResourceBundleTest.class.getClassLoader();
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
// © 2023 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
package com.ibm.icu.dev.test;
|
||||
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import org.junit.Rule;
|
||||
import org.junit.rules.TestName;
|
||||
|
||||
/**
|
||||
* A base class for testing within the cross-component tests in the `common_tests` component.
|
||||
*
|
||||
* <p>This subclass of TestFmwk allows the usage of functionality from the `core` component. TestFmwk
|
||||
* is not able to depend on `core` since it is located in `framework`, while `core` tests already
|
||||
* use TestFmwk, which requires that `core` depends on `framework`. We cannot have a cycle in our
|
||||
* dependencies.
|
||||
*
|
||||
* <p>With the allowance for this test class to use functionality from components, we can do things
|
||||
* like assert whether tests are properly resetting the ICU and JDK time zones to their original
|
||||
* values at the end of their execution.
|
||||
*/
|
||||
public class CoreTestFmwk extends TestFmwk {
|
||||
|
||||
private com.ibm.icu.util.TimeZone testStartDefaultIcuTz;
|
||||
|
||||
private java.util.TimeZone testStartDefaultJdkTz;
|
||||
|
||||
private com.ibm.icu.util.ULocale testStartDefaultULocale;
|
||||
|
||||
private java.util.Locale testStartDefaultLocale;
|
||||
|
||||
@Rule
|
||||
public TestName name = new TestName();
|
||||
|
||||
@Override
|
||||
public void localTestInitialize() {
|
||||
super.localTestInitialize();
|
||||
|
||||
// Just like TestFmwk initializes JDK TimeZone and Locale before every test,
|
||||
// do the same for ICU TimeZone and ULocale.
|
||||
ULocale.setDefault(ULocale.forLocale(defaultLocale));
|
||||
com.ibm.icu.util.TimeZone.setDefault(
|
||||
com.ibm.icu.util.TimeZone.getTimeZone(defaultTimeZone.getID()));
|
||||
|
||||
// Save starting timezones
|
||||
testStartDefaultIcuTz = com.ibm.icu.util.TimeZone.getDefault();
|
||||
testStartDefaultJdkTz = java.util.TimeZone.getDefault();
|
||||
|
||||
// Save starting locales
|
||||
testStartDefaultULocale = com.ibm.icu.util.ULocale.getDefault();
|
||||
testStartDefaultLocale = java.util.Locale.getDefault();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void localTestTeardown() {
|
||||
String testMethodName = name.getMethodName();
|
||||
|
||||
// Assert that timezones are in a good state
|
||||
|
||||
com.ibm.icu.util.TimeZone testEndDefaultIcuTz = com.ibm.icu.util.TimeZone.getDefault();
|
||||
java.util.TimeZone testEndDefaultJdkTz = java.util.TimeZone.getDefault();
|
||||
|
||||
assertEquals("In [" + testMethodName + "] Test should keep in sync ICU & JDK TZs",
|
||||
testEndDefaultIcuTz.getID(),
|
||||
testEndDefaultJdkTz.getID());
|
||||
|
||||
assertEquals("In [" + testMethodName + "] Test should reset ICU default TZ",
|
||||
testStartDefaultIcuTz.getID(), testEndDefaultIcuTz.getID());
|
||||
assertEquals("In [" + testMethodName + "] Test should reset JDK default TZ",
|
||||
testStartDefaultJdkTz.getID(), testEndDefaultJdkTz.getID());
|
||||
|
||||
// Assert that locales are in a good state
|
||||
|
||||
com.ibm.icu.util.ULocale testEndDefaultULocale = com.ibm.icu.util.ULocale.getDefault();
|
||||
java.util.Locale testEndDefaultLocale = java.util.Locale.getDefault();
|
||||
|
||||
assertEquals("In [" + testMethodName + "] Test should reset ICU ULocale",
|
||||
testStartDefaultULocale.toLanguageTag(), testEndDefaultULocale.toLanguageTag());
|
||||
assertEquals("In [" + testMethodName + "] Test should reset JDK Locale",
|
||||
testStartDefaultLocale.toLanguageTag(), testEndDefaultLocale.toLanguageTag());
|
||||
|
||||
super.localTestTeardown();
|
||||
}
|
||||
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.bidi;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -27,7 +28,7 @@ import com.ibm.icu.text.BidiClassifier;
|
|||
* Ported from ICU4C intltest/bidiconf.cpp .
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class BiDiConformanceTest extends TestFmwk {
|
||||
public class BiDiConformanceTest extends CoreTestFmwk {
|
||||
public BiDiConformanceTest() {}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.bidi;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
|
@ -24,7 +25,7 @@ import com.ibm.icu.util.VersionInfo;
|
|||
* @author Lina Kemmel, Matitiahu Allouche
|
||||
*/
|
||||
|
||||
public class BidiFmwk extends TestFmwk {
|
||||
public class BidiFmwk extends CoreTestFmwk {
|
||||
|
||||
protected static final char[] charFromDirProp = {
|
||||
/* L R EN ES ET AN CS B S WS ON */
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.bidi;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -22,7 +23,7 @@ import com.ibm.icu.text.BidiTransform.Order;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestBidiTransform extends TestFmwk {
|
||||
public class TestBidiTransform extends CoreTestFmwk {
|
||||
|
||||
static final char LATN_ZERO = '\u0030';
|
||||
static final char ARAB_ZERO = '\u0660';
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
/* The generated code has been manually modified. */
|
||||
package com.ibm.icu.dev.test.bigdec;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -100,7 +101,7 @@ import com.ibm.icu.math.BigDecimal;
|
|||
*/
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DiagBigDecimalTest extends TestFmwk {
|
||||
public class DiagBigDecimalTest extends CoreTestFmwk {
|
||||
private static final com.ibm.icu.math.BigDecimal zero = com.ibm.icu.math.BigDecimal.ZERO;
|
||||
private static final com.ibm.icu.math.BigDecimal one = com.ibm.icu.math.BigDecimal.ONE;
|
||||
private static final com.ibm.icu.math.BigDecimal two = new com.ibm.icu.math.BigDecimal(2);
|
||||
|
|
|
@ -10,6 +10,7 @@ package com.ibm.icu.dev.test.calendar;
|
|||
|
||||
// AstroTest
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -30,7 +31,7 @@ import com.ibm.icu.util.TimeZone;
|
|||
// TODO: try finding next new moon after 07/28/1984 16:00 GMT
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class AstroTest extends TestFmwk {
|
||||
public class AstroTest extends CoreTestFmwk {
|
||||
static final double PI = Math.PI;
|
||||
|
||||
@Test
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -46,7 +47,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* 4174361 4177484 4197699 4209071 4288792
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class CalendarRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
public class CalendarRegressionTest extends CoreTestFmwk {
|
||||
static final String[] FIELD_NAME = {
|
||||
"ERA", "YEAR", "MONTH", "WEEK_OF_YEAR", "WEEK_OF_MONTH",
|
||||
"DAY_OF_MONTH", "DAY_OF_YEAR", "DAY_OF_WEEK",
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
@ -26,7 +27,7 @@ import com.ibm.icu.util.SimpleTimeZone;
|
|||
* A base class for classes that test individual Calendar subclasses.
|
||||
* Defines various useful utility methods and constants
|
||||
*/
|
||||
public class CalendarTestFmwk extends TestFmwk {
|
||||
public class CalendarTestFmwk extends CoreTestFmwk {
|
||||
|
||||
// Constants for use by subclasses, solely to save typing
|
||||
public final static int SUN = Calendar.SUNDAY;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -29,7 +30,7 @@ import com.ibm.icu.util.SimpleTimeZone;
|
|||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CompatibilityTest extends TestFmwk {
|
||||
public class CompatibilityTest extends CoreTestFmwk {
|
||||
static final String[] FIELD_NAME = {
|
||||
"ERA", "YEAR", "MONTH", "WEEK_OF_YEAR", "WEEK_OF_MONTH",
|
||||
"DAY_OF_MONTH", "DAY_OF_YEAR", "DAY_OF_WEEK",
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -18,7 +19,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* Tests for EraRules class
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class EraRulesTest extends TestFmwk {
|
||||
public class EraRulesTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void testAPIs() {
|
||||
for (CalType calType : CalType.values()) {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -31,12 +32,14 @@ import com.ibm.icu.util.ULocale;
|
|||
* Tests for the <code>Holiday</code> class.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class HolidayTest extends TestFmwk {
|
||||
public class HolidayTest extends CoreTestFmwk {
|
||||
|
||||
// Do not use Before annotation, because TestFmwk's Before
|
||||
// method must be executed first to initialize default time zone
|
||||
@Override
|
||||
protected void localTestInitialize() {
|
||||
public void localTestInitialize() {
|
||||
super.localTestInitialize();
|
||||
|
||||
cal = new GregorianCalendar(1, 0, 1);
|
||||
longTimeAgo = cal.getTime();
|
||||
now = new Date();
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -13,7 +14,7 @@ import com.ibm.icu.util.HebrewCalendar;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class InTemporalLeapYearTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
public class InTemporalLeapYearTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestGregorian() {
|
||||
// test from year 1800 to 2500
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -12,7 +13,7 @@ import com.ibm.icu.util.HebrewCalendar;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class OrdinalMonthTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
public class OrdinalMonthTest extends CoreTestFmwk {
|
||||
|
||||
private void VerifyMonth(String message, Calendar cc, int expectedMonth,
|
||||
int expectedOrdinalMonth, boolean expectedLeapMonth,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -15,7 +16,7 @@ import com.ibm.icu.util.HebrewCalendar;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class TemporalMonthCodeTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
public class TemporalMonthCodeTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestChineseCalendarGetTemporalMonthCode() {
|
||||
RunChineseGetTemporalMonthCode(
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.charsetdet;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
@ -41,7 +42,7 @@ import com.ibm.icu.text.CharsetMatch;
|
|||
* @author andy
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestCharsetDetector extends TestFmwk
|
||||
public class TestCharsetDetector extends CoreTestFmwk
|
||||
{
|
||||
public TestCharsetDetector()
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.compression;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -16,7 +17,7 @@ import com.ibm.icu.dev.test.TestFmwk;
|
|||
import com.ibm.icu.text.UnicodeDecompressor;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DecompressionTest extends TestFmwk {
|
||||
public class DecompressionTest extends CoreTestFmwk {
|
||||
/** Print out a segment of a character array, if in verbose mode */
|
||||
private void log(char [] chars, int start, int count) {
|
||||
log("|");
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.compression;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -17,7 +18,7 @@ import com.ibm.icu.text.UnicodeCompressor;
|
|||
import com.ibm.icu.text.UnicodeDecompressor;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ExhaustiveTest extends TestFmwk {
|
||||
public class ExhaustiveTest extends CoreTestFmwk {
|
||||
/** Test simple compress/decompress API, returning # of errors */
|
||||
@Test
|
||||
public void testSimple() throws Exception {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
|
||||
|
@ -23,7 +24,7 @@ import com.ibm.icu.impl.duration.impl.XMLRecordReader;
|
|||
import com.ibm.icu.impl.duration.impl.XMLRecordWriter;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DataReadWriteTest extends TestFmwk {
|
||||
public class DataReadWriteTest extends CoreTestFmwk {
|
||||
// strip line ends and trailing spaces
|
||||
private String normalize(String str) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.FieldPosition;
|
||||
import java.util.Date;
|
||||
|
@ -33,7 +34,7 @@ import com.ibm.icu.util.ULocale;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class ICUDurationTest extends TestFmwk {
|
||||
public class ICUDurationTest extends CoreTestFmwk {
|
||||
/**
|
||||
* Allows us to not depend on javax.xml.datatype.DatatypeFactory.
|
||||
* We need just a tiny subset of the Duration API:
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
@ -40,7 +41,7 @@ import com.ibm.icu.impl.duration.impl.DataRecord.EUnitVariant;
|
|||
* Test cases for en
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public abstract class LanguageTestFmwk extends TestFmwk implements TimeUnitConstants {
|
||||
public abstract class LanguageTestFmwk extends CoreTestFmwk implements TimeUnitConstants {
|
||||
|
||||
private static final TimeUnit[] units = {
|
||||
TimeUnit.YEAR, TimeUnit.MONTH, TimeUnit.WEEK, TimeUnit.DAY, TimeUnit.HOUR,
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -24,7 +25,7 @@ import com.ibm.icu.impl.duration.TimeUnit;
|
|||
import com.ibm.icu.impl.duration.TimeUnitConstants;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class PeriodBuilderFactoryTest extends TestFmwk implements TimeUnitConstants {
|
||||
public class PeriodBuilderFactoryTest extends CoreTestFmwk implements TimeUnitConstants {
|
||||
private PeriodBuilderFactory pbf;
|
||||
|
||||
private static final long[] approxDurations = {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -20,7 +21,7 @@ import com.ibm.icu.impl.duration.Period;
|
|||
import com.ibm.icu.impl.duration.TimeUnit;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class PeriodTest extends TestFmwk {
|
||||
public class PeriodTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void testIsSet() {
|
||||
Period p = Period.at(0, TimeUnit.YEAR);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -21,7 +22,7 @@ import com.ibm.icu.text.DurationFormat;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RegressionTest extends TestFmwk {
|
||||
public class RegressionTest extends CoreTestFmwk {
|
||||
// bug6397
|
||||
@Test
|
||||
public void TestDisallowedMillis() {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
|
@ -23,7 +24,7 @@ import com.ibm.icu.impl.duration.impl.PeriodFormatterData;
|
|||
import com.ibm.icu.impl.duration.impl.ResourceBasedPeriodFormatterDataService;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ResourceBasedPeriodFormatterDataServiceTest extends TestFmwk {
|
||||
public class ResourceBasedPeriodFormatterDataServiceTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void testAvailable() {
|
||||
ResourceBasedPeriodFormatterDataService service =
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -26,7 +27,7 @@ import com.ibm.icu.text.NumberFormat;
|
|||
* General test of Big NumberFormat
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class BigNumberFormatTest extends TestFmwk {
|
||||
public class BigNumberFormatTest extends CoreTestFmwk {
|
||||
|
||||
static final int ILLEGAL = -1;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -22,7 +23,7 @@ import com.ibm.icu.impl.Utility;
|
|||
/**
|
||||
* A collection of methods to run the data driven number format test suite.
|
||||
*/
|
||||
public class DataDrivenNumberFormatTestUtility extends TestFmwk {
|
||||
public class DataDrivenNumberFormatTestUtility extends CoreTestFmwk {
|
||||
|
||||
/**
|
||||
* Base class for code under test.
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
|
@ -31,7 +32,7 @@ import com.ibm.icu.text.SimpleDateFormat;
|
|||
* Performs miscellaneous tests for DateFormat, SimpleDateFormat, DateFormatSymbols
|
||||
**/
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatMiscTests extends TestFmwk {
|
||||
public class DateFormatMiscTests extends CoreTestFmwk {
|
||||
/*
|
||||
* @bug 4097450
|
||||
*/
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -46,7 +47,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* Performs regression test for DateFormat
|
||||
**/
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatRegressionTest extends TestFmwk {
|
||||
public class DateFormatRegressionTest extends CoreTestFmwk {
|
||||
/**
|
||||
* @bug 4029195
|
||||
*/
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
|
@ -31,7 +32,7 @@ import com.ibm.icu.util.Calendar;
|
|||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatRegressionTestJ extends TestFmwk {
|
||||
public class DateFormatRegressionTestJ extends CoreTestFmwk {
|
||||
|
||||
private static final String TIME_STRING = "2000/11/17 08:01:00";
|
||||
private static final long UTC_LONG = 974476860000L;
|
||||
|
@ -170,6 +171,8 @@ public class DateFormatRegressionTestJ extends TestFmwk {
|
|||
//about regression test
|
||||
@Test
|
||||
public void Test4266432() {
|
||||
Locale startLocale = Locale.getDefault();
|
||||
|
||||
Locale.setDefault(Locale.JAPAN);
|
||||
Locale loc = Locale.getDefault();
|
||||
String dateFormat = "MM/dd/yy HH:mm:ss zzz";
|
||||
|
@ -179,6 +182,8 @@ public class DateFormatRegressionTestJ extends TestFmwk {
|
|||
logln("Under " + loc +" locale");
|
||||
Date d = fmt.parse("01/22/92 04:52:00 GMT", p0);
|
||||
logln(d.toString());
|
||||
|
||||
Locale.setDefault(startLocale);
|
||||
}
|
||||
|
||||
//SimpleDateFormat inconsistent for number of digits for years
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
|
@ -35,7 +36,7 @@ import com.ibm.icu.util.TimeZone;
|
|||
* Performs round-trip tests for DateFormat
|
||||
**/
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatRoundTripTest extends TestFmwk {
|
||||
public class DateFormatRoundTripTest extends CoreTestFmwk {
|
||||
public boolean INFINITE = false;
|
||||
public boolean quick = true;
|
||||
private SimpleDateFormat dateFormat;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format.Field;
|
||||
import java.text.ParseException;
|
||||
|
@ -49,7 +50,7 @@ import com.ibm.icu.util.TimeZone;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateIntervalFormatTest extends TestFmwk {
|
||||
public class DateIntervalFormatTest extends CoreTestFmwk {
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
@ -43,7 +44,7 @@ import com.ibm.icu.util.TimeZone;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateTimeGeneratorTest extends TestFmwk {
|
||||
public class DateTimeGeneratorTest extends CoreTestFmwk {
|
||||
public static boolean GENERATE_TEST_DATA;
|
||||
static {
|
||||
try {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
|
@ -34,7 +35,7 @@ import com.ibm.icu.text.SimpleDateFormat;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDateFormat extends TestFmwk {
|
||||
public class IntlTestDateFormat extends CoreTestFmwk {
|
||||
// Values in milliseconds (== Date)
|
||||
private static final long ONESECOND = 1000;
|
||||
private static final long ONEMINUTE = 60 * ONESECOND;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
|
@ -35,7 +36,7 @@ import com.ibm.icu.util.Calendar;
|
|||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDateFormatAPI extends TestFmwk
|
||||
public class IntlTestDateFormatAPI extends CoreTestFmwk
|
||||
{
|
||||
// Test that the equals method works correctly.
|
||||
@Test
|
||||
|
@ -74,6 +75,8 @@ public class IntlTestDateFormatAPI extends TestFmwk
|
|||
@Test
|
||||
public void TestAPI()
|
||||
{
|
||||
Locale startLocale = Locale.getDefault();
|
||||
|
||||
logln("DateFormat API test---"); logln("");
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
|
||||
|
@ -228,5 +231,7 @@ public class IntlTestDateFormatAPI extends TestFmwk
|
|||
// catch (Exception e) {
|
||||
// errln("ERROR: Couldn't create a DateFormat");
|
||||
// }
|
||||
|
||||
Locale.setDefault(startLocale);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
|
@ -34,7 +35,7 @@ import com.ibm.icu.text.SimpleDateFormat;
|
|||
* verifies that it works on a basic level.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDateFormatAPIC extends TestFmwk {
|
||||
public class IntlTestDateFormatAPIC extends CoreTestFmwk {
|
||||
/**
|
||||
* Test hiding of parse() and format() APIs in the Format hierarchy.
|
||||
* We test the entire hierarchy, even though this test is located in
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -30,7 +31,7 @@ import com.ibm.icu.util.Calendar;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDateFormatSymbols extends TestFmwk
|
||||
public class IntlTestDateFormatSymbols extends CoreTestFmwk
|
||||
{
|
||||
// Test getMonths
|
||||
@Test
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
|
@ -36,7 +37,7 @@ import com.ibm.icu.text.DecimalFormatSymbols;
|
|||
import com.ibm.icu.text.NumberFormat;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDecimalFormatAPI extends TestFmwk
|
||||
public class IntlTestDecimalFormatAPI extends CoreTestFmwk
|
||||
{
|
||||
/**
|
||||
* Problem 1: simply running
|
||||
|
@ -101,6 +102,8 @@ public class IntlTestDecimalFormatAPI extends TestFmwk
|
|||
@Test
|
||||
public void TestAPI()
|
||||
{
|
||||
Locale startLocale = Locale.getDefault();
|
||||
|
||||
logln("DecimalFormat API test---"); logln("");
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
|
||||
|
@ -265,6 +268,8 @@ public class IntlTestDecimalFormatAPI extends TestFmwk
|
|||
if( ! s3.equals(p2) ) {
|
||||
errln("ERROR: toLocalizedPattern() result did not match pattern applied");
|
||||
}
|
||||
|
||||
Locale.setDefault(startLocale);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -34,7 +35,7 @@ import com.ibm.icu.util.Currency;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDecimalFormatSymbols extends TestFmwk
|
||||
public class IntlTestDecimalFormatSymbols extends CoreTestFmwk
|
||||
{
|
||||
// Test the API of DecimalFormatSymbols; primarily a simple get/set set.
|
||||
@Test
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -31,7 +32,7 @@ import com.ibm.icu.util.ULocale;
|
|||
* NumberFormat.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestNumberFormat extends TestFmwk {
|
||||
public class IntlTestNumberFormat extends CoreTestFmwk {
|
||||
|
||||
public NumberFormat fNumberFormat;
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.math.BigInteger;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
|
@ -32,12 +33,14 @@ import com.ibm.icu.text.NumberFormat;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestNumberFormatAPI extends TestFmwk
|
||||
public class IntlTestNumberFormatAPI extends CoreTestFmwk
|
||||
{
|
||||
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
|
||||
@Test
|
||||
public void TestAPI()
|
||||
{
|
||||
Locale startLocale = Locale.getDefault();
|
||||
|
||||
logln("NumberFormat API test---"); logln("");
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
|
||||
|
@ -204,6 +207,8 @@ public class IntlTestNumberFormatAPI extends TestFmwk
|
|||
// catch (Exception e) {
|
||||
// errln("ERROR: Couldn't create a DecimalFormat");
|
||||
// }
|
||||
|
||||
Locale.setDefault(startLocale);
|
||||
}
|
||||
|
||||
// Jitterbug 4451, for coverage
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
|
@ -39,12 +40,14 @@ import com.ibm.icu.text.SimpleDateFormat;
|
|||
* @summary test International Simple Date Format API
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestSimpleDateFormatAPI extends TestFmwk
|
||||
public class IntlTestSimpleDateFormatAPI extends CoreTestFmwk
|
||||
{
|
||||
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
|
||||
@Test
|
||||
public void TestAPI()
|
||||
{
|
||||
Locale startLocale = Locale.getDefault();
|
||||
|
||||
logln("SimpleDateFormat API test---"); logln("");
|
||||
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
|
@ -185,6 +188,8 @@ public class IntlTestSimpleDateFormatAPI extends TestFmwk
|
|||
// catch (Exception e) {
|
||||
// errln("ERROR: Couldn't create a SimpleDateFormat");
|
||||
// }
|
||||
|
||||
Locale.setDefault(startLocale);
|
||||
}
|
||||
|
||||
// Jitterbug 4451, for coverage
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -26,7 +27,7 @@ import com.ibm.icu.text.ListFormatter.Width;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ListFormatterTest extends TestFmwk {
|
||||
public class ListFormatterTest extends CoreTestFmwk {
|
||||
String[] HardcodedTestData = {
|
||||
"",
|
||||
"A",
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -16,7 +17,7 @@ import com.ibm.icu.util.MeasureUnit;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class MeasureUnitThreadTest extends TestFmwk {
|
||||
public class MeasureUnitThreadTest extends CoreTestFmwk {
|
||||
|
||||
@Test
|
||||
public void MUThreadTest() {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -35,7 +36,7 @@ import com.ibm.icu.text.MessagePatternUtil.VariantNode;
|
|||
* by building parallel trees of nodes and verifying that they match.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public final class MessagePatternUtilTest extends TestFmwk {
|
||||
public final class MessagePatternUtilTest extends CoreTestFmwk {
|
||||
// The following nested "Expect..." classes are used to build
|
||||
// a tree structure parallel to what the MessagePatternUtil class builds.
|
||||
// These nested test classes are not static so that they have access to TestFmwk methods.
|
||||
|
|
|
@ -32,6 +32,7 @@ attribution to Taligent may not be removed.
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -55,7 +56,7 @@ import com.ibm.icu.text.NumberFormat;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class MessageRegressionTest extends TestFmwk {
|
||||
public class MessageRegressionTest extends CoreTestFmwk {
|
||||
/* @bug 4074764
|
||||
* Null exception when formatting pattern with MessageFormat
|
||||
* with no parameters.
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.text.ParsePosition;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -20,7 +21,7 @@ import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatRegistrationTest extends TestFmwk {
|
||||
public class NumberFormatRegistrationTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestRegistration() {
|
||||
final ULocale SRC_LOC = ULocale.FRANCE;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -29,7 +30,7 @@ import com.ibm.icu.text.NumberFormat;
|
|||
* Performs round-trip tests for NumberFormat
|
||||
**/
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatRoundTripTest extends TestFmwk {
|
||||
public class NumberFormatRoundTripTest extends CoreTestFmwk {
|
||||
|
||||
public double MAX_ERROR = 1e-14;
|
||||
public double max_numeric_error = 0.0;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
@ -31,7 +32,7 @@ import junitparams.Parameters;
|
|||
* the CLDR project.
|
||||
*/
|
||||
@RunWith(JUnitParamsRunner.class)
|
||||
public class PersonNameConsistencyTest extends TestFmwk {
|
||||
public class PersonNameConsistencyTest extends CoreTestFmwk {
|
||||
/**
|
||||
* Change this to true to cause the tests that would normally be skipped to also run (without
|
||||
* causing the test suite to fail).
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
|
@ -18,7 +19,7 @@ import com.ibm.icu.text.PersonNameFormatter;
|
|||
import com.ibm.icu.text.SimplePersonName;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class PersonNameFormatterTest extends TestFmwk{
|
||||
public class PersonNameFormatterTest extends CoreTestFmwk{
|
||||
private static class NameAndTestCases {
|
||||
public String nameFields;
|
||||
public String[][] testCases;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
@ -28,7 +29,7 @@ import com.ibm.icu.util.ULocale;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class PluralFormatTest extends TestFmwk {
|
||||
public class PluralFormatTest extends CoreTestFmwk {
|
||||
private void helperTestRules(String localeIDs, String testPattern, Map<Integer,String> changes) {
|
||||
String[] locales = Utility.split(localeIDs, ',');
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Collection;
|
||||
|
@ -39,7 +40,7 @@ import com.ibm.icu.util.ULocale;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class PluralFormatUnitTest extends TestFmwk {
|
||||
public class PluralFormatUnitTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestConstructor() {
|
||||
// Test correct formatting of numbers.
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -21,7 +22,7 @@ import com.ibm.icu.text.RuleBasedNumberFormat;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RBNFParseTest extends TestFmwk {
|
||||
public class RBNFParseTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestParse() {
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -18,7 +19,7 @@ import com.ibm.icu.dev.test.TestFmwk;
|
|||
import com.ibm.icu.text.RuleBasedNumberFormat;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RbnfRoundTripTest extends TestFmwk {
|
||||
public class RbnfRoundTripTest extends CoreTestFmwk {
|
||||
/**
|
||||
* Perform an exhaustive round-trip test on the English spellout rules
|
||||
*/
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -29,7 +30,7 @@ import com.ibm.icu.text.RuleBasedNumberFormat;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RelativeDateTimeFormatterTest extends TestFmwk {
|
||||
public class RelativeDateTimeFormatterTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestRelativeDateWithQuantity() {
|
||||
Object[][] data = {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -23,7 +24,7 @@ import com.ibm.icu.util.ULocale;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class ScientificNumberFormatterTest extends TestFmwk {
|
||||
public class ScientificNumberFormatterTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void TestBasic() {
|
||||
ScientificNumberFormatter markup = ScientificNumberFormatter.getMarkupInstance(
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
|
||||
|
@ -24,7 +25,7 @@ import com.ibm.icu.text.SelectFormat;
|
|||
* This class tests the API functionality of the SelectFormat
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class SelectFormatAPITest extends TestFmwk {
|
||||
public class SelectFormatAPITest extends CoreTestFmwk {
|
||||
|
||||
static final String SIMPLE_PATTERN1 = "feminine {feminineVerbValue1} other{otherVerbValue1}";
|
||||
static final String SIMPLE_PATTERN2 = "feminine {feminineVerbValue2} other{otherVerbValue2}";
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -21,7 +22,7 @@ import com.ibm.icu.text.SelectFormat;
|
|||
* This class does the unit testing for the SelectFormat
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class SelectFormatUnitTest extends TestFmwk {
|
||||
public class SelectFormatUnitTest extends CoreTestFmwk {
|
||||
|
||||
static final String SIMPLE_PATTERN = "feminine {feminineVerbValue} other{otherVerbValue}";
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Locale;
|
||||
|
@ -32,7 +33,7 @@ import com.ibm.icu.util.ULocale;
|
|||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class TimeUnitTest extends TestFmwk {
|
||||
public class TimeUnitTest extends CoreTestFmwk {
|
||||
@Test
|
||||
public void Test10219FractionalPlurals() {
|
||||
TimeUnitFormat tuf = new TimeUnitFormat(ULocale.ENGLISH, TimeUnitFormat.FULL_NAME);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.impl;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
|
||||
|
@ -14,7 +15,7 @@ import com.ibm.icu.dev.test.TestFmwk;
|
|||
import com.ibm.icu.impl.CSCharacterIterator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CSCharacterIteratorTest extends TestFmwk {
|
||||
public class CSCharacterIteratorTest extends CoreTestFmwk {
|
||||
public CSCharacterIteratorTest() {};
|
||||
|
||||
@Test
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.impl;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -17,7 +18,7 @@ import com.ibm.icu.impl.CacheValue;
|
|||
import com.ibm.icu.impl.CacheValue.Strength;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CacheTest extends TestFmwk {
|
||||
public class CacheTest extends CoreTestFmwk {
|
||||
public CacheTest() {}
|
||||
|
||||
/** Code coverage for CacheValue. */
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.dev.test.impl;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package com.ibm.icu.dev.test.iterator;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
|
||||
|
@ -29,7 +30,7 @@ import com.ibm.icu.text.UTF16;
|
|||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestUCharacterIterator extends TestFmwk{
|
||||
public class TestUCharacterIterator extends CoreTestFmwk{
|
||||
|
||||
// constructor -----------------------------------------------------
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
package com.ibm.icu.dev.test.lang;
|
||||
|
||||
import com.ibm.icu.dev.test.CoreTestFmwk;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
|
@ -17,7 +18,7 @@ import com.ibm.icu.lang.UScript;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(Enclosed.class)
|
||||
public class DataDrivenUScriptTest extends TestFmwk {
|
||||
public class DataDrivenUScriptTest extends CoreTestFmwk {
|
||||
|
||||
private static String scriptsToString(int[] scripts) {
|
||||
if (scripts == null) {
|
||||
|
@ -114,7 +115,7 @@ public class DataDrivenUScriptTest extends TestFmwk {
|
|||
}
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
public static class TestMultipleUScript extends TestFmwk {
|
||||
public static class TestMultipleUScript extends CoreTestFmwk {
|
||||
private String testLocaleName;
|
||||
private Locale testLocale;
|
||||
private int[] expected;
|
||||
|
@ -165,7 +166,7 @@ public class DataDrivenUScriptTest extends TestFmwk {
|
|||
}
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
public static class GetCodeTest extends TestFmwk {
|
||||
public static class GetCodeTest extends CoreTestFmwk {
|
||||
private String testName;
|
||||
private int expected;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue