ICU-12603 Annotates ICU4J unit test classes which use JUnit with @RunWith(JUnit4.class).
X-SVN-Rev: 40375
This commit is contained in:
parent
ef72d0734e
commit
a782748606
@ -27,6 +27,8 @@ import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.charset.CharsetCallback;
|
||||
import com.ibm.icu.charset.CharsetDecoderICU;
|
||||
@ -37,6 +39,7 @@ import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestCharset extends TestFmwk {
|
||||
@Test
|
||||
public void TestUTF16Converter(){
|
||||
|
@ -27,6 +27,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.charset.CharsetICU;
|
||||
import com.ibm.icu.charset.CharsetProviderICU;
|
||||
@ -35,6 +37,7 @@ import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestSelection extends TestFmwk {
|
||||
@Test
|
||||
public void TestConversionUTF16() {
|
||||
|
@ -18,6 +18,8 @@ import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
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.util.CollectionUtilities;
|
||||
@ -43,6 +45,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* @author Mark Davis
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class AlphabeticIndexTest extends TestFmwk {
|
||||
/**
|
||||
*
|
||||
|
@ -23,6 +23,8 @@ import java.util.MissingResourceException;
|
||||
import java.util.Set;
|
||||
|
||||
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.Utility;
|
||||
@ -38,6 +40,7 @@ import com.ibm.icu.text.UnicodeSet;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationAPITest extends TestFmwk {
|
||||
/**
|
||||
* This tests the collation key related APIs.
|
||||
|
@ -17,11 +17,14 @@ package com.ibm.icu.dev.test.collator;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationChineseTest extends TestFmwk{
|
||||
public CollationChineseTest()
|
||||
{
|
||||
|
@ -13,6 +13,8 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
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.text.CollationKey;
|
||||
@ -28,6 +30,7 @@ import com.ibm.icu.text.RuleBasedCollator;
|
||||
* @author Brian Rower - IBM - August 2008
|
||||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationCreationMethodTest extends TestFmwk
|
||||
{
|
||||
@Test
|
||||
|
@ -17,12 +17,15 @@ package com.ibm.icu.dev.test.collator;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationCurrencyTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestCurrency() {
|
||||
|
@ -19,6 +19,8 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationElementIterator;
|
||||
@ -27,6 +29,7 @@ import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.Normalizer;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationDummyTest extends TestFmwk {
|
||||
//testSourceCases[][] and testTargetCases[][], testCases[][] are ported from the file callcoll.c in icu4c
|
||||
private static char[][] testSourceCases = {
|
||||
|
@ -18,11 +18,14 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationEnglishTest extends TestFmwk{
|
||||
private static char[][] testSourceCases = {
|
||||
{0x0061 /* 'a' */, 0x0062 /* 'b' */},
|
||||
|
@ -16,12 +16,15 @@ package com.ibm.icu.dev.test.collator;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationFinnishTest extends TestFmwk {
|
||||
private static char[][] testSourceCases = {
|
||||
{0x77, 0x61, 0x74},
|
||||
|
@ -18,12 +18,15 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationFrenchTest extends TestFmwk{
|
||||
private static char[][] testSourceCases = {
|
||||
{0x0061/*'a'*/, 0x0062/*'b'*/, 0x0063/*'c'*/},
|
||||
|
@ -18,6 +18,8 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
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.text.CollationKey;
|
||||
@ -31,6 +33,7 @@ import com.ibm.icu.text.RuleBasedCollator;
|
||||
* less than the string itself appended with any character.
|
||||
*/
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationFrozenMonkeyTest extends TestFmwk {
|
||||
|
||||
private String source = "-abcdefghijklmnopqrstuvwxyz#&^$@";
|
||||
|
@ -18,11 +18,14 @@
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationGermanTest extends TestFmwk{
|
||||
private static char[][] testSourceCases = {
|
||||
{0x47, 0x72, 0x00F6, 0x00DF, 0x65},
|
||||
|
@ -20,6 +20,8 @@ import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
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.lang.UCharacter;
|
||||
@ -29,6 +31,7 @@ import com.ibm.icu.text.RuleBasedCollator;
|
||||
import com.ibm.icu.text.UCharacterIterator;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationIteratorTest extends TestFmwk {
|
||||
|
||||
String test1 = "What subset of all possible test cases?";
|
||||
|
@ -18,6 +18,8 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationKey;
|
||||
@ -25,6 +27,7 @@ import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationKanaTest extends TestFmwk{
|
||||
private static char[][] testSourceCases = {
|
||||
{0xff9E},
|
||||
|
@ -20,6 +20,8 @@ import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
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.ICUData;
|
||||
@ -40,6 +42,7 @@ import com.ibm.icu.text.UnicodeSetIterator;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationMiscTest extends TestFmwk {
|
||||
//private static final int NORM_BUFFER_TEST_LEN_ = 32;
|
||||
private static final class Tester
|
||||
|
@ -18,6 +18,8 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
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.text.CollationKey;
|
||||
@ -31,6 +33,7 @@ import com.ibm.icu.text.RuleBasedCollator;
|
||||
* less than the string itself appended with any character.
|
||||
*/
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationMonkeyTest extends TestFmwk {
|
||||
|
||||
private String source = "-abcdefghijklmnopqrstuvwxyz#&^$@";
|
||||
|
@ -20,6 +20,8 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.CollationElementIterator;
|
||||
@ -27,6 +29,7 @@ import com.ibm.icu.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationRegressionTest extends TestFmwk {
|
||||
// @bug 4048446
|
||||
//
|
||||
@ -1191,7 +1194,7 @@ public class CollationRegressionTest extends TestFmwk {
|
||||
}
|
||||
System.out.print(": ");
|
||||
for(int i=0;i<bytes.length;i++) {
|
||||
sb.append(" 0x"+Integer.toHexString(((int)bytes[i])&0xff));
|
||||
sb.append(" 0x"+Integer.toHexString((bytes[i])&0xff));
|
||||
}
|
||||
sb.append("\n");
|
||||
return sb;
|
||||
|
@ -20,12 +20,15 @@ import java.util.MissingResourceException;
|
||||
import java.util.Set;
|
||||
|
||||
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.text.Collator;
|
||||
import com.ibm.icu.text.Collator.CollatorFactory;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationServiceTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestRegister() {
|
||||
@ -160,6 +163,7 @@ public class CollationServiceTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collator createCollator(ULocale loc) {
|
||||
CollatorInfo ci = (CollatorInfo)map.get(loc);
|
||||
if (ci != null) {
|
||||
@ -168,6 +172,7 @@ public class CollationServiceTest extends TestFmwk {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName(ULocale objectLocale, ULocale displayLocale) {
|
||||
CollatorInfo ci = (CollatorInfo)map.get(objectLocale);
|
||||
if (ci != null) {
|
||||
@ -176,6 +181,7 @@ public class CollationServiceTest extends TestFmwk {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set getSupportedLocaleIDs() {
|
||||
if (ids == null) {
|
||||
HashSet set = new HashSet();
|
||||
@ -198,12 +204,14 @@ public class CollationServiceTest extends TestFmwk {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collator createCollator(ULocale loc) {
|
||||
return delegate.createCollator(loc);
|
||||
}
|
||||
|
||||
// use CollatorFactory getDisplayName(ULocale, ULocale) for coverage
|
||||
|
||||
@Override
|
||||
public Set getSupportedLocaleIDs() {
|
||||
return delegate.getSupportedLocaleIDs();
|
||||
}
|
||||
|
@ -18,11 +18,14 @@
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationSpanishTest extends TestFmwk {
|
||||
private static char[][] testSourceCases = {
|
||||
{0x61, 0x6c, 0x69, 0x61, 0x73},
|
||||
|
@ -18,6 +18,8 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
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.TestUtil;
|
||||
@ -50,6 +52,7 @@ import com.ibm.icu.util.IllformedLocaleException;
|
||||
import com.ibm.icu.util.Output;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationTest extends TestFmwk {
|
||||
public CollationTest() {
|
||||
}
|
||||
@ -1475,7 +1478,7 @@ public class CollationTest extends TestFmwk {
|
||||
if (b != bytes[i]) {
|
||||
break;
|
||||
}
|
||||
if ((int)b == Collation.LEVEL_SEPARATOR_BYTE) {
|
||||
if (b == Collation.LEVEL_SEPARATOR_BYTE) {
|
||||
++level;
|
||||
if (level == Collation.CASE_LEVEL && !collHasCaseLevel) {
|
||||
++level;
|
||||
|
@ -21,6 +21,8 @@ import java.util.Comparator;
|
||||
import java.util.Locale;
|
||||
|
||||
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.TestUtil;
|
||||
@ -29,6 +31,7 @@ import com.ibm.icu.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationThaiTest extends TestFmwk {
|
||||
|
||||
final int MAX_FAILURES_TO_SHOW = -1;
|
||||
@ -281,7 +284,7 @@ public class CollationThaiTest extends TestFmwk {
|
||||
|
||||
RuleBasedCollator collator;
|
||||
try {
|
||||
collator = (RuleBasedCollator)getThaiCollator();
|
||||
collator = getThaiCollator();
|
||||
} catch (Exception e) {
|
||||
warnln("could not construct Thai collator");
|
||||
return;
|
||||
@ -303,6 +306,7 @@ public class CollationThaiTest extends TestFmwk {
|
||||
|
||||
private static final class StrCmp implements Comparator<String>
|
||||
{
|
||||
@Override
|
||||
public int compare(String string1, String string2)
|
||||
{
|
||||
return collator.compare(string1, string2);
|
||||
|
@ -13,9 +13,13 @@ import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.text.Collator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationThreadTest extends TestFmwk {
|
||||
private static final String[] threadTestData;
|
||||
static {
|
||||
@ -195,6 +199,7 @@ public class CollationThreadTest extends TestFmwk {
|
||||
this.r = r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
synchronized (control) {
|
||||
|
@ -18,11 +18,14 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CollationTurkishTest extends TestFmwk{
|
||||
private static char[][] testSourceCases = {
|
||||
{0x73, 0x0327},
|
||||
|
@ -17,12 +17,15 @@ package com.ibm.icu.dev.test.collator;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class G7CollationTest extends TestFmwk{
|
||||
private static String[] testCases = {
|
||||
"blackbirds", "Pat", "p\u00E9ch\u00E9", "p\u00EAche", "p\u00E9cher",
|
||||
|
@ -18,11 +18,14 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.CollationKey;
|
||||
import com.ibm.icu.text.Collator;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class LotusCollationKoreanTest extends TestFmwk{
|
||||
private static char[][] testSourceCases = {
|
||||
{0xac00}
|
||||
|
@ -18,6 +18,8 @@ import java.io.IOException;
|
||||
|
||||
import org.junit.Before;
|
||||
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.TestUtil;
|
||||
@ -29,6 +31,7 @@ import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class UCAConformanceTest extends TestFmwk {
|
||||
|
||||
public UCAConformanceTest() {
|
||||
|
@ -15,6 +15,8 @@ import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
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.text.BreakIterator;
|
||||
@ -32,8 +34,7 @@ import com.ibm.icu.util.JapaneseCalendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestDefault() {
|
||||
@ -214,7 +215,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
|
||||
// Modifiable clone
|
||||
logln("Create a modifiable clone");
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
|
||||
if (gp1.isFrozen()) {
|
||||
errln("FAIL: The object returned by cloneAsThawed() must not be frozen yet");
|
||||
@ -495,7 +496,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
}
|
||||
|
||||
// Safe clone
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
territory = gp1.getTerritory();
|
||||
if (!territory.equals("CA")) {
|
||||
errln("FAIL: Territory is " + territory + " - Expected: CA");
|
||||
@ -594,7 +595,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
|
||||
// Safe clone
|
||||
logln("cloneAsThawed");
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
cur = gp.getCurrency();
|
||||
code = cur.getCurrencyCode();
|
||||
if (!code.equals("BRL")) {
|
||||
@ -674,7 +675,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
|
||||
// Safe clone
|
||||
logln("cloneAsThawed");
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
cal = gp.getCalendar();
|
||||
calType = cal.getType();
|
||||
if (!calType.equals("japanese")) {
|
||||
@ -757,7 +758,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
|
||||
// Modifiable clone
|
||||
logln("cloneAsThawed");
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
tz = gp1.getTimeZone();
|
||||
tzid = tz.getID();
|
||||
if (!tzid.equals(customJstId)) {
|
||||
@ -840,7 +841,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
|
||||
// Modifiable clone
|
||||
logln("cloneAsThawed");
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
coll = gp1.getCollator();
|
||||
locStr = coll.getLocale(ULocale.VALID_LOCALE).toString();
|
||||
if (!locStr.equals("it")) {
|
||||
@ -939,7 +940,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
|
||||
// Modifiable clone
|
||||
logln("cloneAsThawed");
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
brk = gp1.getBreakIterator(GlobalizationPreferences.BI_WORD);
|
||||
/* TODO: JB#5383
|
||||
locStr = brk.getLocale(ULocale.VALID_LOCALE).toString();
|
||||
@ -1354,7 +1355,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
|
||||
// Modifiable clone
|
||||
logln("cloneAsThawed");
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
gp1.setDateFormat(GlobalizationPreferences.DF_LONG, GlobalizationPreferences.DF_NONE, customLD);
|
||||
|
||||
df = gp1.getDateFormat(GlobalizationPreferences.DF_SHORT, GlobalizationPreferences.DF_SHORT);
|
||||
@ -1535,7 +1536,7 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
||||
}
|
||||
|
||||
// Create a modifiable clone
|
||||
GlobalizationPreferences gp1 = (GlobalizationPreferences)gp.cloneAsThawed();
|
||||
GlobalizationPreferences gp1 = gp.cloneAsThawed();
|
||||
|
||||
// Number type format's locale is still he_IL
|
||||
nf = gp1.getNumberFormat(GlobalizationPreferences.NF_NUMBER);
|
||||
|
@ -14,6 +14,8 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
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.text.RbnfScannerProviderImpl;
|
||||
@ -21,6 +23,7 @@ import com.ibm.icu.text.RbnfLenientScannerProvider;
|
||||
import com.ibm.icu.text.RuleBasedNumberFormat;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RbnfLenientScannerTest extends TestFmwk {
|
||||
private static final RbnfLenientScannerProvider provider = new RbnfScannerProviderImpl();
|
||||
|
||||
@ -160,7 +163,7 @@ public class RbnfLenientScannerTest extends TestFmwk {
|
||||
if (r == null) {
|
||||
r = createRandom();
|
||||
}
|
||||
n = ((int)(r.nextInt(10000) - 3000)) / 16d;
|
||||
n = (r.nextInt(10000) - 3000) / 16d;
|
||||
}
|
||||
|
||||
String s = fmt.format(n);
|
||||
|
@ -29,6 +29,8 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.BreakIterator;
|
||||
@ -39,6 +41,7 @@ import com.ibm.icu.text.SearchIterator.ElementComparisonType;
|
||||
import com.ibm.icu.text.StringSearch;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class SearchTest extends TestFmwk {
|
||||
|
||||
//inner class
|
||||
|
@ -11,6 +11,8 @@ package com.ibm.icu.dev.test.util;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
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.ICUData;
|
||||
@ -19,7 +21,7 @@ import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public final class ICUResourceBundleCollationTest extends TestFmwk {
|
||||
private static final String COLLATION_RESNAME = "collations";
|
||||
private static final String COLLATION_KEYWORD = "collation";
|
||||
@ -146,7 +148,7 @@ public final class ICUResourceBundleCollationTest extends TestFmwk {
|
||||
|
||||
@Test
|
||||
public void TestOpen(){
|
||||
UResourceBundle bundle = (UResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_COLLATION_BASE_NAME, "en_US_POSIX");
|
||||
UResourceBundle bundle = UResourceBundle.getBundleInstance(ICUData.ICU_COLLATION_BASE_NAME, "en_US_POSIX");
|
||||
if(bundle==null){
|
||||
errln("could not load the stream");
|
||||
}
|
||||
|
@ -13,10 +13,13 @@ import java.util.HashMap;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class LocaleAliasCollationTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
private static final ULocale[][] _LOCALES = {
|
||||
{new ULocale("en", "RH"), new ULocale("en", "ZW")},
|
||||
|
@ -23,6 +23,8 @@ import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
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.text.Collator;
|
||||
@ -33,17 +35,21 @@ import com.ibm.icu.text.LocaleDisplayNames.UiListItem;
|
||||
import com.ibm.icu.util.IllformedLocaleException;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ULocaleCollationTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestCollator() {
|
||||
checkService("ja_JP_YOKOHAMA", new ServiceFacade() {
|
||||
@Override
|
||||
public Object create(ULocale req) {
|
||||
return Collator.getInstance(req);
|
||||
}
|
||||
}, null, new Registrar() {
|
||||
@Override
|
||||
public Object register(ULocale loc, Object prototype) {
|
||||
return Collator.registerInstance((Collator) prototype, loc);
|
||||
}
|
||||
@Override
|
||||
public boolean unregister(Object key) {
|
||||
return Collator.unregister(key);
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
|
||||
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.TestUtil;
|
||||
@ -24,6 +26,7 @@ import com.ibm.icu.text.BidiClassifier;
|
||||
* BiDi conformance test, using the Unicode BidiTest.txt and BidiCharacterTest.txt files.
|
||||
* Ported from ICU4C intltest/bidiconf.cpp .
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class BiDiConformanceTest extends TestFmwk {
|
||||
public BiDiConformanceTest() {}
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
package com.ibm.icu.dev.test.bidi;
|
||||
|
||||
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.lang.UCharacter;
|
||||
@ -19,6 +21,7 @@ import com.ibm.icu.text.BidiTransform.Order;
|
||||
* @author Lina Kemmel
|
||||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestBidiTransform extends TestFmwk {
|
||||
|
||||
static final char LATN_ZERO = '\u0030';
|
||||
|
@ -14,6 +14,8 @@ package com.ibm.icu.dev.test.bigdec;
|
||||
import java.math.BigInteger;
|
||||
|
||||
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.TestUtil;
|
||||
@ -97,6 +99,7 @@ import com.ibm.icu.math.BigDecimal;
|
||||
* @author Mike Cowlishaw
|
||||
*/
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DiagBigDecimalTest extends TestFmwk {
|
||||
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;
|
||||
|
@ -14,6 +14,8 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.CalendarAstronomer;
|
||||
@ -27,6 +29,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 {
|
||||
static final double PI = Math.PI;
|
||||
|
||||
|
@ -23,6 +23,8 @@ import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
@ -43,6 +45,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* 4145158 4145983 4147269 4149677 4162587 4165343 4166109 4167060 4173516
|
||||
* 4174361 4177484 4197699 4209071 4288792
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class CalendarRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
static final String[] FIELD_NAME = {
|
||||
"ERA", "YEAR", "MONTH", "WEEK_OF_YEAR", "WEEK_OF_MONTH",
|
||||
|
@ -10,6 +10,8 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.text.ChineseDateFormat;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
@ -63,6 +65,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* Tue May 22 2096 = 4733-04*-01, Year 53, Cycle 79
|
||||
* Sun Mar 22 2099 = 4736-02*-01, Year 56, Cycle 79
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class ChineseTest extends CalendarTestFmwk {
|
||||
/**
|
||||
* Test basic mapping to and from Gregorian.
|
||||
|
@ -9,8 +9,12 @@
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.util.Calendar;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ChineseTestCase extends TestCase {
|
||||
|
||||
/**
|
||||
@ -46,6 +50,7 @@ public class ChineseTestCase extends TestCase {
|
||||
/**
|
||||
* Return a String representation of this test case's time.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return dowToString(get(Calendar.DAY_OF_WEEK)) +
|
||||
get(Calendar.YEAR) + "of" + get(Calendar.ERA) +
|
||||
|
@ -18,14 +18,18 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.DateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.SimpleTimeZone;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
public class CompatibilityTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class CompatibilityTest extends TestFmwk {
|
||||
static final String[] FIELD_NAME = {
|
||||
"ERA", "YEAR", "MONTH", "WEEK_OF_YEAR", "WEEK_OF_MONTH",
|
||||
"DAY_OF_MONTH", "DAY_OF_YEAR", "DAY_OF_WEEK",
|
||||
@ -274,7 +278,7 @@ public class CompatibilityTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
int tzoffset = 123400;
|
||||
|
||||
SimpleTimeZone zone = new SimpleTimeZone(tzoffset, tzid);
|
||||
Calendar cal = (Calendar)Calendar.getInstance((SimpleTimeZone)zone.clone());
|
||||
Calendar cal = Calendar.getInstance((SimpleTimeZone)zone.clone());
|
||||
|
||||
if (!zone.equals(cal.getTimeZone())) errln("FAIL: Calendar.getTimeZone failed");
|
||||
|
||||
@ -300,7 +304,7 @@ public class CompatibilityTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
cal.after(cal2)) errln("FAIL: equals/before/after failed");
|
||||
|
||||
// Roll back to January
|
||||
cal.roll(Calendar.MONTH, (int)(1 + Calendar.DECEMBER - cal.get(Calendar.MONTH)));
|
||||
cal.roll(Calendar.MONTH, 1 + Calendar.DECEMBER - cal.get(Calendar.MONTH));
|
||||
if (cal.equals(cal2) ||
|
||||
cal2.before(cal) ||
|
||||
cal.after(cal2)) errln("FAIL: equals/before/after failed");
|
||||
|
@ -12,6 +12,8 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
@ -26,6 +28,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Tests for the <code>CopticCalendar</code> class.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class CopticTest extends CalendarTestFmwk
|
||||
{
|
||||
/** Constants to save typing. */
|
||||
|
@ -10,6 +10,8 @@ package com.ibm.icu.dev.test.calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
@ -18,6 +20,7 @@ import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DangiTest extends CalendarTestFmwk {
|
||||
/**
|
||||
* Test basic mapping to and from Gregorian.
|
||||
|
@ -12,6 +12,8 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
@ -25,6 +27,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Tests for the <code>EthiopicCalendar</code> class.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class EthiopicTest extends CalendarTestFmwk
|
||||
{
|
||||
/** Constants to save typing. */
|
||||
|
@ -13,6 +13,8 @@ import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
@ -24,6 +26,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Tests for the <code>HebrewCalendar</code> class.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class HebrewTest extends CalendarTestFmwk {
|
||||
// Constants to save typing.
|
||||
public static final int TISHRI = HebrewCalendar.TISHRI;
|
||||
|
@ -13,6 +13,8 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.LocaleUtility;
|
||||
@ -29,6 +31,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Tests for the <code>Holiday</code> class.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class HolidayTest extends TestFmwk {
|
||||
@Before
|
||||
public void init() throws Exception {
|
||||
|
@ -15,6 +15,8 @@ import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.impl.CalendarAstronomer;
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
@ -35,6 +37,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* @summary Tests of new functionality in IBMCalendar
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class IBMCalendarTest extends CalendarTestFmwk {
|
||||
/**
|
||||
* Test weekend support in IBMCalendar.
|
||||
|
@ -12,6 +12,8 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
@ -25,6 +27,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Tests for the <code>IndianCalendar</code> class.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class IndianTest extends CalendarTestFmwk
|
||||
{
|
||||
// Months in indian calendar are 0-based. Here taking 1-based names:
|
||||
|
@ -17,6 +17,8 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.LocaleUtility;
|
||||
@ -32,6 +34,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Tests for the <code>IslamicCalendar</code> class.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class IslamicTest extends CalendarTestFmwk {
|
||||
/** Constants to save typing. */
|
||||
public static final int MUHARRAM = IslamicCalendar.MUHARRAM;
|
||||
|
@ -14,6 +14,8 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
@ -26,6 +28,7 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Tests for the <code>JapaneseCalendar</code> class.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class JapaneseTest extends CalendarTestFmwk {
|
||||
|
||||
@Test
|
||||
|
@ -10,11 +10,14 @@ package com.ibm.icu.dev.test.calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.PersianCalendar;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class PersianTest extends CalendarTestFmwk {
|
||||
/**
|
||||
* Test basic mapping to and from Gregorian.
|
||||
|
@ -21,6 +21,8 @@ import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
@ -38,6 +40,7 @@ import com.ibm.icu.text.CharsetMatch;
|
||||
/**
|
||||
* @author andy
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class TestCharsetDetector extends TestFmwk
|
||||
{
|
||||
public TestCharsetDetector()
|
||||
@ -1216,6 +1219,7 @@ public class TestCharsetDetector extends TestFmwk
|
||||
n = num;
|
||||
}
|
||||
private int n;
|
||||
@Override
|
||||
public void run() {
|
||||
// System.out.println("Thread " + n + " is running.");
|
||||
CharsetDetector det = new CharsetDetector();
|
||||
|
@ -9,10 +9,13 @@
|
||||
package com.ibm.icu.dev.test.compression;
|
||||
|
||||
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.text.UnicodeDecompressor;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DecompressionTest extends TestFmwk {
|
||||
/** Print out a segment of a character array, if in verbose mode */
|
||||
private void log(char [] chars, int start, int count) {
|
||||
|
@ -9,11 +9,14 @@
|
||||
package com.ibm.icu.dev.test.compression;
|
||||
|
||||
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.text.UnicodeCompressor;
|
||||
import com.ibm.icu.text.UnicodeDecompressor;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ExhaustiveTest extends TestFmwk {
|
||||
/** Test simple compress/decompress API, returning # of errors */
|
||||
@Test
|
||||
@ -368,7 +371,7 @@ public class ExhaustiveTest extends TestFmwk {
|
||||
displayed as hex values */
|
||||
private void printChars(char[] chars, int len) {
|
||||
for(int i = 0; i < len; i++) {
|
||||
int c = (int)chars[i];
|
||||
int c = chars[i];
|
||||
if(c < 0x0020 || c >= 0x7f) {
|
||||
log("[0x");
|
||||
log(Integer.toHexString(c));
|
||||
@ -396,19 +399,19 @@ public class ExhaustiveTest extends TestFmwk {
|
||||
case SINGLEBYTEMODE:
|
||||
while(curByteIndex < byteBufferLimit
|
||||
&& mode == SINGLEBYTEMODE) {
|
||||
aByte = ((int)byteBuffer[curByteIndex++]) & 0xFF;
|
||||
aByte = (byteBuffer[curByteIndex++]) & 0xFF;
|
||||
switch(aByte) {
|
||||
default:
|
||||
log(Integer.toHexString(((int) aByte) & 0xFF) + " ");
|
||||
log(Integer.toHexString((aByte) & 0xFF) + " ");
|
||||
break;
|
||||
// quote unicode
|
||||
case SQUOTEU:
|
||||
log("SQUOTEU ");
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -423,7 +426,7 @@ public class ExhaustiveTest extends TestFmwk {
|
||||
case SQUOTE4: case SQUOTE5: case SQUOTE6: case SQUOTE7:
|
||||
log("SQUOTE" + (aByte - SQUOTE0) + " ");
|
||||
if(curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -438,7 +441,7 @@ public class ExhaustiveTest extends TestFmwk {
|
||||
case SDEFINE4: case SDEFINE5: case SDEFINE6: case SDEFINE7:
|
||||
log("SDEFINE" + (aByte - SDEFINE0) + " ");
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -446,10 +449,10 @@ public class ExhaustiveTest extends TestFmwk {
|
||||
case SDEFINEX:
|
||||
log("SDEFINEX ");
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -459,14 +462,14 @@ public class ExhaustiveTest extends TestFmwk {
|
||||
|
||||
case UNICODEMODE:
|
||||
while(curByteIndex < byteBufferLimit && mode == UNICODEMODE) {
|
||||
aByte = ((int)byteBuffer[curByteIndex++]) & 0xFF;
|
||||
aByte = (byteBuffer[curByteIndex++]) & 0xFF;
|
||||
switch(aByte) {
|
||||
// handle all define tags
|
||||
case UDEFINE0: case UDEFINE1: case UDEFINE2: case UDEFINE3:
|
||||
case UDEFINE4: case UDEFINE5: case UDEFINE6: case UDEFINE7:
|
||||
log("UDEFINE" + (aByte - UDEFINE0) + " ");
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
mode = SINGLEBYTEMODE;
|
||||
break;
|
||||
@ -475,10 +478,10 @@ public class ExhaustiveTest extends TestFmwk {
|
||||
case UDEFINEX:
|
||||
log("UDEFINEX ");
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -493,17 +496,17 @@ public class ExhaustiveTest extends TestFmwk {
|
||||
case UQUOTEU:
|
||||
log("UQUOTEU ");
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
log(Integer.toHexString(((int) aByte) & 0xFF) + " ");
|
||||
log(Integer.toHexString((aByte) & 0xFF) + " ");
|
||||
if (curByteIndex < byteBufferLimit) {
|
||||
log(Integer.toHexString(((int) byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
log(Integer.toHexString((byteBuffer[curByteIndex++]) & 0xFF) + " ");
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -15,11 +15,14 @@ import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
|
||||
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.duration.impl.XMLRecordReader;
|
||||
import com.ibm.icu.impl.duration.impl.XMLRecordWriter;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DataReadWriteTest extends TestFmwk {
|
||||
// strip line ends and trailing spaces
|
||||
private String normalize(String str) {
|
||||
|
@ -20,6 +20,8 @@ import javax.xml.datatype.DatatypeConstants.Field;
|
||||
import javax.xml.datatype.Duration;
|
||||
|
||||
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.text.DurationFormat;
|
||||
@ -30,6 +32,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* @author srl
|
||||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class ICUDurationTest extends TestFmwk {
|
||||
/**
|
||||
* Allows us to not depend on javax.xml.datatype.DatatypeFactory.
|
||||
@ -372,9 +375,13 @@ public class ICUDurationTest extends TestFmwk {
|
||||
public void TestDurationFormat(){
|
||||
@SuppressWarnings("serial")
|
||||
class TestDurationFormat extends DurationFormat {
|
||||
@Override
|
||||
public StringBuffer format(Object object, StringBuffer toAppend, FieldPosition pos) {return null;}
|
||||
@Override
|
||||
public String formatDurationFrom(long duration, long referenceDate) {return null;}
|
||||
@Override
|
||||
public String formatDurationFromNow(long duration) {return null;}
|
||||
@Override
|
||||
public String formatDurationFromNowTo(Date targetDate) {return null;}
|
||||
public TestDurationFormat() {super();}
|
||||
|
||||
|
@ -21,6 +21,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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.duration.BasicPeriodFormatterService;
|
||||
@ -37,6 +39,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 {
|
||||
|
||||
private static final TimeUnit[] units = {
|
||||
@ -536,46 +539,57 @@ class FileTestData extends LanguageTestFmwk.TestData {
|
||||
private String[] fractionalUnitTargets;
|
||||
private String[] multipleUnitTargets;
|
||||
|
||||
@Override
|
||||
int[] getFullPluralizedFormCounts() {
|
||||
return fullPluralizedFormCounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getFullPluralizedFormTargets() {
|
||||
return fullPluralizedFormTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getMediumFormTargets() {
|
||||
return mediumFormTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getShortFormTargets() {
|
||||
return shortFormTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getCustomMinuteTargets() {
|
||||
return customMinuteTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getLimitedUnitTargets() {
|
||||
return limitedUnitTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
int[] getHalfUnitCounts() {
|
||||
return halfUnitCounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getHalfUnitTargets() {
|
||||
return halfUnitTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
float[] getFractionalUnitCounts() {
|
||||
return fractionalUnitCounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getFractionalUnitTargets() {
|
||||
return fractionalUnitTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getMultipleUnitTargets() {
|
||||
return multipleUnitTargets;
|
||||
}
|
||||
@ -695,46 +709,57 @@ class DefaultData extends LanguageTestFmwk.TestData {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
int[] getFullPluralizedFormCounts() {
|
||||
return fullPluralizedFormCounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getFullPluralizedFormTargets() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getMediumFormTargets() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getShortFormTargets() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getCustomMinuteTargets() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getLimitedUnitTargets() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
int[] getHalfUnitCounts() {
|
||||
return halfUnitCounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getHalfUnitTargets() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
float[] getFractionalUnitCounts() {
|
||||
return fractionalUnitCounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getFractionalUnitTargets() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getMultipleUnitTargets() {
|
||||
return null;
|
||||
}
|
||||
|
@ -12,6 +12,8 @@
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
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.duration.BasicPeriodFormatterService;
|
||||
@ -21,6 +23,7 @@ import com.ibm.icu.impl.duration.PeriodBuilderFactory;
|
||||
import com.ibm.icu.impl.duration.TimeUnit;
|
||||
import com.ibm.icu.impl.duration.TimeUnitConstants;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class PeriodBuilderFactoryTest extends TestFmwk implements TimeUnitConstants {
|
||||
private PeriodBuilderFactory pbf;
|
||||
|
||||
|
@ -12,11 +12,14 @@
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
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.duration.Period;
|
||||
import com.ibm.icu.impl.duration.TimeUnit;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class PeriodTest extends TestFmwk {
|
||||
@Test
|
||||
public void testIsSet() {
|
||||
|
@ -9,6 +9,8 @@
|
||||
package com.ibm.icu.dev.test.duration;
|
||||
|
||||
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.duration.BasicPeriodFormatterService;
|
||||
@ -18,6 +20,7 @@ import com.ibm.icu.impl.duration.PeriodFormatterService;
|
||||
import com.ibm.icu.text.DurationFormat;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RegressionTest extends TestFmwk {
|
||||
// bug6397
|
||||
@Test
|
||||
|
@ -15,11 +15,14 @@ import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
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.duration.impl.PeriodFormatterData;
|
||||
import com.ibm.icu.impl.duration.impl.ResourceBasedPeriodFormatterDataService;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ResourceBasedPeriodFormatterDataServiceTest extends TestFmwk {
|
||||
@Test
|
||||
public void testAvailable() {
|
||||
|
@ -12,6 +12,8 @@ import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
||||
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.Utility;
|
||||
@ -23,6 +25,7 @@ import com.ibm.icu.text.NumberFormat;
|
||||
* @test
|
||||
* General test of Big NumberFormat
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class BigNumberFormatTest extends TestFmwk {
|
||||
|
||||
static final int ILLEGAL = -1;
|
||||
|
@ -25,6 +25,8 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
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.Properties;
|
||||
@ -37,6 +39,7 @@ import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.CurrencyAmount;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CompactDecimalFormatTest extends TestFmwk {
|
||||
Object[][] EnglishTestData = {
|
||||
// default is 2 digits of accuracy
|
||||
|
@ -20,14 +20,18 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.DateFormatSymbols;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
|
||||
/**
|
||||
* Performs miscellaneous tests for DateFormat, SimpleDateFormat, DateFormatSymbols
|
||||
**/
|
||||
public class DateFormatMiscTests extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatMiscTests extends TestFmwk {
|
||||
/*
|
||||
* @bug 4097450
|
||||
*/
|
||||
|
@ -28,7 +28,10 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.DateFormat;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
@ -42,7 +45,8 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Performs regression test for DateFormat
|
||||
**/
|
||||
public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatRegressionTest extends TestFmwk {
|
||||
/**
|
||||
* @bug 4029195
|
||||
*/
|
||||
@ -982,7 +986,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln(what + "=" + s);
|
||||
first = s.charAt(0);
|
||||
if(first<kHindiZero || first>(kHindiZero+9)) {
|
||||
errln(what + "- wrong digit, got " + s + " (integer digit value " + new Integer((int)first).toString());
|
||||
errln(what + "- wrong digit, got " + s + " (integer digit value " + new Integer(first).toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -993,7 +997,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln(what + ": " + s);
|
||||
first = s.charAt(0);
|
||||
if(first<kArabicZero || first>(kArabicZero+9)) {
|
||||
errln(what + " wrong digit, got " + s + " (integer digit value " + new Integer((int)first).toString());
|
||||
errln(what + " wrong digit, got " + s + " (integer digit value " + new Integer(first).toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1004,7 +1008,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln(what + ": " + s);
|
||||
first = s.charAt(0);
|
||||
if(first<kArabicZero || first>(kArabicZero+9)) {
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer((int)first).toString());
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer(first).toString());
|
||||
}
|
||||
}
|
||||
{
|
||||
@ -1014,7 +1018,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln(what + ": " + s);
|
||||
first = s.charAt(0);
|
||||
if(first<kLatinZero || first>(kLatinZero+9)) {
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer((int)first).toString());
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer(first).toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1025,7 +1029,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln(what+ ": " + s);
|
||||
first = s.charAt(0);
|
||||
if(first<kArabicZero || first>(kArabicZero+9)) {
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer((int)first).toString());
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer(first).toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1036,7 +1040,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln(what+ ": " + s);
|
||||
first = s.charAt(0);
|
||||
if(first<kArabicZero || first>(kArabicZero+9)) {
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer((int)first).toString());
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer(first).toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1047,7 +1051,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln(what+ ": " + s);
|
||||
first = s.charAt(0);
|
||||
if(first<kArabicZero || first>(kArabicZero+9)) {
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer((int)first).toString());
|
||||
errln(what + " wrong digit but got " + s + " (integer digit value " + new Integer(first).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1476,6 +1480,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
String s0 = fmt.format(d);
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
|
@ -20,14 +20,18 @@ import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.DateFormat;
|
||||
import com.ibm.icu.text.DateFormatSymbols;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
public class DateFormatRegressionTestJ extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatRegressionTestJ extends TestFmwk {
|
||||
|
||||
private static final String TIME_STRING = "2000/11/17 08:01:00";
|
||||
private static final long UTC_LONG = 974476860000L;
|
||||
@ -257,6 +261,7 @@ public class DateFormatRegressionTestJ extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
//Class used by Test4407042
|
||||
class DateParseThread extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
SimpleDateFormat sdf = (SimpleDateFormat) sdf_.clone();
|
||||
TimeZone defaultTZ = TimeZone.getDefault();
|
||||
@ -284,6 +289,7 @@ public class DateFormatRegressionTestJ extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
//Class used by Test4407042
|
||||
class DateFormatThread extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
SimpleDateFormat sdf = (SimpleDateFormat) sdf_.clone();
|
||||
TimeZone tz = TimeZone.getTimeZone("PST");
|
||||
|
@ -21,7 +21,10 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
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.text.DateFormat;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
@ -31,7 +34,8 @@ import com.ibm.icu.util.TimeZone;
|
||||
/**
|
||||
* Performs round-trip tests for DateFormat
|
||||
**/
|
||||
public class DateFormatRoundTripTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatRoundTripTest extends TestFmwk {
|
||||
public boolean INFINITE = false;
|
||||
public boolean quick = true;
|
||||
private SimpleDateFormat dateFormat;
|
||||
|
@ -37,7 +37,10 @@ import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
|
||||
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.ICUData;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.text.ChineseDateFormat;
|
||||
@ -63,7 +66,8 @@ import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateFormatTest extends TestFmwk {
|
||||
/**
|
||||
* Verify that patterns have the correct values and could produce the
|
||||
* the DateFormat instances that contain the correct localized patterns.
|
||||
@ -2394,9 +2398,9 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
f.format((Object)cal, buf, pos);
|
||||
f.format((Object)now, buf, pos);
|
||||
f.format((Object)new Long(now.getTime()), buf, pos);
|
||||
f.format(new Long(now.getTime()), buf, pos);
|
||||
try {
|
||||
f.format((Object)"Howdy", buf, pos);
|
||||
f.format("Howdy", buf, pos);
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
@ -4000,7 +4004,7 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
String expected = data[i + 1];
|
||||
if (!out.equals(expected))
|
||||
{
|
||||
errln((String)"FAIL: " + in + " -> " + out + " expected -> " + expected);
|
||||
errln("FAIL: " + in + " -> " + out + " expected -> " + expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4023,7 +4027,7 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
String res1 = result.toString();
|
||||
String expected = "\u4e8c\u3007\u3007\u4e5d\u5e74\u4e03\u6708\u4e8c\u5341\u516b\u65e5";
|
||||
if (! res1.equals(expected)) {
|
||||
errln((String)"FAIL: -> " + result.toString() + " expected -> " + expected);
|
||||
errln("FAIL: -> " + result.toString() + " expected -> " + expected);
|
||||
}
|
||||
ParsePosition pp = new ParsePosition(0);
|
||||
Date parsedate = sdf.parse(expected, pp);
|
||||
@ -4090,7 +4094,7 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
String expected = DATA[i][1];
|
||||
|
||||
if (!result.equals(expected))
|
||||
errln((String) "FAIL: -> " + result.toString() + " expected -> " + expected);
|
||||
errln("FAIL: -> " + result.toString() + " expected -> " + expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,8 @@ import java.util.ListIterator;
|
||||
import java.util.Locale;
|
||||
|
||||
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.Utility;
|
||||
@ -39,7 +41,8 @@ import com.ibm.icu.util.Output;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class DateIntervalFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateIntervalFormatTest extends TestFmwk {
|
||||
|
||||
/**
|
||||
*
|
||||
@ -1187,7 +1190,7 @@ public class DateIntervalFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
} catch (Exception e){}
|
||||
|
||||
// Tests when "if ( firstPatternIndex == -1 || secondPatternIndex == -1 )" is true
|
||||
dii = (DateIntervalInfo) dii.cloneAsThawed();
|
||||
dii = dii.cloneAsThawed();
|
||||
try{
|
||||
dii.setFallbackIntervalPattern("");
|
||||
errln("DateIntervalInfo.setFallbackIntervalPattern(String fallbackPattern) " +
|
||||
@ -1242,7 +1245,7 @@ public class DateIntervalFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
// Tests when "if ( lrgDiffCalUnit > MINIMUM_SUPPORTED_CALENDAR_FIELD )" is true
|
||||
// MINIMUM_SUPPORTED_CALENDAR_FIELD = Calendar.SECOND;
|
||||
try{
|
||||
dii = (DateIntervalInfo) dii.cloneAsThawed();
|
||||
dii = dii.cloneAsThawed();
|
||||
dii.setIntervalPattern("", Calendar.SECOND+1, "");
|
||||
errln("DateIntervalInfo.setIntervalPattern(String,int,String) " +
|
||||
"was suppose to return an exception when the " +
|
||||
@ -1848,6 +1851,7 @@ public class DateIntervalFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
class TestThread extends Thread {
|
||||
public String errorMessage;
|
||||
@Override
|
||||
public void run() {
|
||||
for (int loop=0; loop < 2000; ++loop) {
|
||||
ListIterator<String> expectedItr = expectedResults.listIterator();
|
||||
|
@ -23,6 +23,8 @@ import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
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.PatternTokenizer;
|
||||
@ -40,6 +42,7 @@ import com.ibm.icu.util.SimpleTimeZone;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class DateTimeGeneratorTest extends TestFmwk {
|
||||
public static boolean GENERATE_TEST_DATA;
|
||||
static {
|
||||
|
@ -25,12 +25,16 @@ import java.util.Random;
|
||||
|
||||
import org.junit.Before;
|
||||
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.text.DateFormat;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class IntlTestDateFormat extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDateFormat extends TestFmwk {
|
||||
// Values in milliseconds (== Date)
|
||||
private static final long ONESECOND = 1000;
|
||||
private static final long ONEMINUTE = 60 * ONESECOND;
|
||||
|
@ -25,7 +25,10 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.TestUtil;
|
||||
import com.ibm.icu.dev.test.TestUtil.JavaVendor;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
@ -33,7 +36,8 @@ import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
public class IntlTestDateFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDateFormatAPI extends TestFmwk
|
||||
{
|
||||
// Test that the equals method works correctly.
|
||||
@Test
|
||||
|
@ -19,7 +19,10 @@ import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
|
||||
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.text.DateFormat;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
@ -30,7 +33,8 @@ import com.ibm.icu.text.SimpleDateFormat;
|
||||
* try to test the full functionality. It just calls each function in the class and
|
||||
* verifies that it works on a basic level.
|
||||
*/
|
||||
public class IntlTestDateFormatAPIC extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDateFormatAPIC extends TestFmwk {
|
||||
/**
|
||||
* Test hiding of parse() and format() APIs in the Format hierarchy.
|
||||
* We test the entire hierarchy, even though this test is located in
|
||||
|
@ -21,12 +21,16 @@ package com.ibm.icu.dev.test.format;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.DateFormatSymbols;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class IntlTestDateFormatSymbols extends com.ibm.icu.dev.test.TestFmwk
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDateFormatSymbols extends TestFmwk
|
||||
{
|
||||
// Test getMonths
|
||||
@Test
|
||||
|
@ -25,14 +25,18 @@ import java.text.ParsePosition;
|
||||
import java.util.Locale;
|
||||
|
||||
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.math.BigDecimal;
|
||||
import com.ibm.icu.math.MathContext;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
|
||||
public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDecimalFormatAPI extends TestFmwk
|
||||
{
|
||||
/**
|
||||
* Problem 1: simply running
|
||||
|
@ -24,7 +24,10 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.CurrencyPluralInfo;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
@ -34,7 +37,8 @@ import com.ibm.icu.util.ULocale;
|
||||
// This is an API test, not a unit test. It doesn't test very many cases, and doesn't
|
||||
// try to test the full functionality. It just calls each function in the class and
|
||||
// verifies that it works on a basic level.
|
||||
public class IntlTestDecimalFormatAPIC extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDecimalFormatAPIC extends TestFmwk {
|
||||
|
||||
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
|
||||
@Test
|
||||
|
@ -23,14 +23,18 @@ import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.text.NumberingSystem;
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class IntlTestDecimalFormatSymbols extends com.ibm.icu.dev.test.TestFmwk
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDecimalFormatSymbols extends TestFmwk
|
||||
{
|
||||
// Test the API of DecimalFormatSymbols; primarily a simple get/set set.
|
||||
@Test
|
||||
|
@ -18,14 +18,18 @@ import java.text.FieldPosition;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
|
||||
/**
|
||||
* Tests for DecimalFormatSymbols
|
||||
**/
|
||||
public class IntlTestDecimalFormatSymbolsC extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestDecimalFormatSymbolsC extends TestFmwk {
|
||||
/**
|
||||
* Test the API of DecimalFormatSymbols; primarily a simple get/set set.
|
||||
*/
|
||||
|
@ -17,6 +17,8 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
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.text.DecimalFormat;
|
||||
@ -26,7 +28,8 @@ import com.ibm.icu.text.NumberFormat;
|
||||
* This test does round-trip testing (format -> parse -> format -> parse -> etc.) of
|
||||
* NumberFormat.
|
||||
*/
|
||||
public class IntlTestNumberFormat extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestNumberFormat extends TestFmwk {
|
||||
|
||||
public NumberFormat fNumberFormat;
|
||||
|
||||
|
@ -24,11 +24,15 @@ import java.text.ParsePosition;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.NumberFormat;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class IntlTestNumberFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestNumberFormatAPI extends TestFmwk
|
||||
{
|
||||
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
|
||||
@Test
|
||||
@ -216,11 +220,17 @@ public class IntlTestNumberFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
errln("NumberFormat.getPattern(Locale, int) should delegate to (ULocale,)");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
@Override
|
||||
public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
@Override
|
||||
public StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
@Override
|
||||
public StringBuffer format(java.math.BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
@Override
|
||||
public StringBuffer format(com.ibm.icu.math.BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
@Override
|
||||
public Number parse(String text, ParsePosition parsePosition) {return null;}
|
||||
}
|
||||
new StubNumberFormat().run();
|
||||
|
@ -27,7 +27,10 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.DateFormatSymbols;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
|
||||
@ -35,7 +38,8 @@ import com.ibm.icu.text.SimpleDateFormat;
|
||||
* @test 1.4 98/03/06
|
||||
* @summary test International Simple Date Format API
|
||||
*/
|
||||
public class IntlTestSimpleDateFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
@RunWith(JUnit4.class)
|
||||
public class IntlTestSimpleDateFormatAPI extends TestFmwk
|
||||
{
|
||||
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
|
||||
@Test
|
||||
|
@ -12,11 +12,14 @@ import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.ListFormatter;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class ListFormatterTest extends TestFmwk {
|
||||
String[] HardcodedTestData = {
|
||||
"",
|
||||
|
@ -28,6 +28,8 @@ import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
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.serializable.FormatHandler;
|
||||
@ -50,6 +52,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* for information on how to update with each new release.
|
||||
* @author markdavis
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class MeasureUnitTest extends TestFmwk {
|
||||
|
||||
static class OrderedPair<F extends Comparable, S extends Comparable> extends Pair<F, S> implements Comparable<OrderedPair<F, S>> {
|
||||
|
@ -4,12 +4,15 @@
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
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.util.Currency;
|
||||
import com.ibm.icu.util.MeasureUnit;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class MeasureUnitThreadTest extends TestFmwk {
|
||||
|
||||
@Test
|
||||
|
@ -17,7 +17,10 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.MessagePattern;
|
||||
import com.ibm.icu.text.MessagePatternUtil;
|
||||
import com.ibm.icu.text.MessagePatternUtil.ArgNode;
|
||||
@ -31,7 +34,8 @@ import com.ibm.icu.text.MessagePatternUtil.VariantNode;
|
||||
* Test MessagePatternUtil (MessagePattern-as-tree-of-nodes API)
|
||||
* by building parallel trees of nodes and verifying that they match.
|
||||
*/
|
||||
public final class MessagePatternUtilTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public final class MessagePatternUtilTest extends TestFmwk {
|
||||
// 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.
|
||||
|
@ -46,12 +46,16 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
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.text.MessageFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class MessageRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class MessageRegressionTest extends TestFmwk {
|
||||
/* @bug 4074764
|
||||
* Null exception when formatting pattern with MessageFormat
|
||||
* with no parameters.
|
||||
|
@ -11,12 +11,16 @@ package com.ibm.icu.dev.test.format;
|
||||
import java.util.Arrays;
|
||||
|
||||
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.text.NumberFormat;
|
||||
import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class NumberFormatRegistrationTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatRegistrationTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestRegistration() {
|
||||
final ULocale SRC_LOC = ULocale.FRANCE;
|
||||
@ -34,6 +38,7 @@ public class NumberFormatRegistrationTest extends com.ibm.icu.dev.test.TestFmwk
|
||||
currencyStyle = NumberFormat.getIntegerInstance(swapLoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NumberFormat createFormat(ULocale loc, int formatType) {
|
||||
if (formatType == FORMAT_CURRENCY) {
|
||||
return currencyStyle;
|
||||
|
@ -23,7 +23,10 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.DateFormat;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
@ -34,7 +37,8 @@ import com.ibm.icu.util.ULocale;
|
||||
/**
|
||||
* Performs regression test for MessageFormat
|
||||
**/
|
||||
public class NumberFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatRegressionTest extends TestFmwk {
|
||||
/**
|
||||
* alphaWorks upgrade
|
||||
*/
|
||||
|
@ -18,14 +18,18 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
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.text.DecimalFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
|
||||
/**
|
||||
* Performs round-trip tests for NumberFormat
|
||||
**/
|
||||
public class NumberFormatRoundTripTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatRoundTripTest extends TestFmwk {
|
||||
|
||||
public double MAX_ERROR = 1e-14;
|
||||
public double max_numeric_error = 0.0;
|
||||
|
@ -9,6 +9,8 @@
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
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.text.DecimalFormat;
|
||||
@ -21,6 +23,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* @author rocketman
|
||||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatSpecificationTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestBasicPatterns() {
|
||||
|
@ -35,6 +35,8 @@ import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
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.TestUtil;
|
||||
@ -66,6 +68,7 @@ import com.ibm.icu.util.Currency.CurrencyUsage;
|
||||
import com.ibm.icu.util.CurrencyAmount;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberFormatTest extends TestFmwk {
|
||||
|
||||
@Test
|
||||
|
@ -39,6 +39,8 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
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.ICUData;
|
||||
@ -51,6 +53,7 @@ import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class NumberRegressionTests extends TestFmwk {
|
||||
private static final char EURO = '\u20ac';
|
||||
|
||||
|
@ -13,6 +13,8 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
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.Utility;
|
||||
@ -25,6 +27,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* @author tschumann (Tim Schumann)
|
||||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class PluralFormatTest extends TestFmwk {
|
||||
private void helperTestRules(String localeIDs, String testPattern, Map<Integer,String> changes) {
|
||||
String[] locales = Utility.split(localeIDs, ',');
|
||||
|
@ -19,6 +19,8 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
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.text.DecimalFormat;
|
||||
@ -35,6 +37,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* @author tschumann (Tim Schumann)
|
||||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class PluralFormatUnitTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestConstructor() {
|
||||
|
@ -11,6 +11,8 @@ package com.ibm.icu.dev.test.format;
|
||||
import java.util.Arrays;
|
||||
|
||||
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.SimpleFormatterImpl;
|
||||
@ -28,6 +30,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* @author markdavis
|
||||
*
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class PluralRangesTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestLocaleData() {
|
||||
|
@ -33,6 +33,8 @@ import java.util.TreeMap;
|
||||
import java.util.TreeSet;
|
||||
|
||||
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.serializable.SerializableTestUtility;
|
||||
@ -55,6 +57,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* @author dougfelt (Doug Felt)
|
||||
* @author markdavis (Mark Davis) [for fractional support]
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class PluralRulesTest extends TestFmwk {
|
||||
|
||||
PluralRulesFactory factory = PluralRulesFactory.NORMAL;
|
||||
@ -882,6 +885,7 @@ public class PluralRulesTest extends TestFmwk {
|
||||
}
|
||||
|
||||
static final Comparator<Set<StandardPluralCategories>> SHORTEST_FIRST = new Comparator<Set<StandardPluralCategories>>() {
|
||||
@Override
|
||||
public int compare(Set<StandardPluralCategories> arg0, Set<StandardPluralCategories> arg1) {
|
||||
int diff = arg0.size() - arg1.size();
|
||||
if (diff != 0) {
|
||||
@ -927,6 +931,7 @@ public class PluralRulesTest extends TestFmwk {
|
||||
}
|
||||
|
||||
private static final Comparator<PluralRules> PLURAL_RULE_COMPARATOR = new Comparator<PluralRules>() {
|
||||
@Override
|
||||
public int compare(PluralRules o1, PluralRules o2) {
|
||||
return o1.compareTo(o2);
|
||||
}
|
||||
@ -1066,12 +1071,14 @@ public class PluralRulesTest extends TestFmwk {
|
||||
}
|
||||
|
||||
public static class FixedDecimalHandler implements SerializableTestUtility.Handler {
|
||||
@Override
|
||||
public Object[] getTestObjects() {
|
||||
FixedDecimal items[] = { new FixedDecimal(3d), new FixedDecimal(3d, 2), new FixedDecimal(3.1d, 1),
|
||||
new FixedDecimal(3.1d, 2), };
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSameBehavior(Object a, Object b) {
|
||||
FixedDecimal a1 = (FixedDecimal) a;
|
||||
FixedDecimal b1 = (FixedDecimal) b;
|
||||
|
@ -11,11 +11,14 @@ package com.ibm.icu.dev.test.format;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.RuleBasedNumberFormat;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RBNFParseTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestParse() {
|
||||
|
@ -11,10 +11,13 @@ package com.ibm.icu.dev.test.format;
|
||||
import java.util.Locale;
|
||||
|
||||
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.text.RuleBasedNumberFormat;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RbnfRoundTripTest extends TestFmwk {
|
||||
/**
|
||||
* Perform an exhaustive round-trip test on the English spellout rules
|
||||
|
@ -14,6 +14,8 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
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.math.BigDecimal;
|
||||
@ -28,6 +30,7 @@ import com.ibm.icu.util.ULocale;
|
||||
* This does not test lenient parse mode, since testing the default implementation
|
||||
* introduces a dependency on collation. See RbnfLenientScannerTest.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class RbnfTest extends TestFmwk {
|
||||
static String fracRules =
|
||||
"%main:\n" +
|
||||
|
@ -11,6 +11,8 @@ package com.ibm.icu.dev.test.format;
|
||||
import java.util.Locale;
|
||||
|
||||
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.math.BigDecimal;
|
||||
@ -24,6 +26,7 @@ import com.ibm.icu.text.RelativeDateTimeFormatter.RelativeUnit;
|
||||
import com.ibm.icu.text.RelativeDateTimeFormatter.Style;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class RelativeDateTimeFormatterTest extends TestFmwk {
|
||||
@Test
|
||||
public void TestRelativeDateWithQuantity() {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user