ICU-79 update tests for new rules
X-SVN-Rev: 6318
This commit is contained in:
parent
6b80c279e9
commit
2b89bfbb70
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/CompoundTransliteratorTest.java,v $
|
||||
* $Date: 2001/09/24 19:56:41 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2001/10/19 00:35:59 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -170,17 +170,17 @@ public class CompoundTransliteratorTest extends TestFmwk {
|
||||
"Any-Hex;Hex-Any;Any-Hex", "hello", "\\u0068\\u0065\\u006C\\u006C\\u006F",
|
||||
"Any-Hex;Hex-Any", "hello! How are you?", "hello! How are you?",
|
||||
"Devanagari-Latin;Latin-Devanagari", "\u092D\u0948'\u0930'\u0935", "\u092D\u0948\u0930\u0935", // quotes lost
|
||||
"Latin-Cyrillic;Cyrillic-Latin", "a'b'k'd'e'f'g'h'i'j'Shch'shch'zh'h", "abkdefghijShchshchzhh",
|
||||
"Latin-Cyrillic;Cyrillic-Latin", "a'b'k'd'e'f'g'h'i'j'Shch'shch'zh'h", "a'b'k'd'e'f'g'h'i'j'Shch'shch'zh'h",
|
||||
"Latin-Greek;Greek-Latin", "ABGabgAKLMN", "ABGabgAKLMN",
|
||||
"Latin-Arabic;Arabic-Latin", "Ad'r'a'b'i'k'dh'dd'gh", "Adrabikdhddgh",
|
||||
//"Latin-Arabic;Arabic-Latin", "Ad'r'a'b'i'k'dh'dd'gh", "Adrabikdhddgh",
|
||||
"Hiragana-Katakana", "\u3041\u308f\u3099\u306e\u304b\u3092\u3099",
|
||||
"\u30A1\u30f7\u30ce\u30ab\u30fa",
|
||||
"Hiragana-Katakana;Katakana-Hiragana", "\u3041\u308f\u3099\u306e\u304b\u3051",
|
||||
"\u3041\u308f\u3099\u306e\u304b\u3051",
|
||||
"Katakana-Hiragana;Hiragana-Katakana", "\u30A1\u30f7\u30ce\u30f5\u30f6",
|
||||
"\u30A1\u30f7\u30ce\u30ab\u30b1",
|
||||
"Latin-Kana;Kana-Latin", "VAVIVUVEVOhuZIZUZONINUNAsesuzezu",
|
||||
"VAVIVUVEVOhuZIZUZONINUNAsesuzezu",
|
||||
"Latin-Katakana;Katakana-Latin", "vavivuvevohuzizuzoninunasesuzezu",
|
||||
"vavivuvevohuzizuzoninunasesuzezu",
|
||||
};
|
||||
CompoundTransliterator ct2=null;
|
||||
for(int i=0; i<Data.length; i+=3){
|
||||
|
@ -16,34 +16,36 @@ public class RoundTripTest extends TestFmwk {
|
||||
}
|
||||
|
||||
public void TestHiragana() throws IOException, ParseException {
|
||||
new Test("Latin-Kana",
|
||||
new Test("Latin-Hiragana",
|
||||
TestUtility.LATIN_SCRIPT, TestUtility.HIRAGANA_SCRIPT)
|
||||
.test("[a-z]", "[\u3040-\u3094]", this);
|
||||
}
|
||||
|
||||
public void TestKatakana() throws IOException, ParseException {
|
||||
new Test("Latin-Kana",
|
||||
new Test("Latin-Katakana",
|
||||
TestUtility.LATIN_SCRIPT, TestUtility.KATAKANA_SCRIPT)
|
||||
.test("[A-Z]", "[\u30A1-\u30FA]", this);
|
||||
.test("[a-z]", "[\u30A1-\u30FA]", this);
|
||||
}
|
||||
|
||||
public void TestArabic() throws IOException, ParseException {
|
||||
new Test("Latin-Arabic",
|
||||
TestUtility.LATIN_SCRIPT, TestUtility.ARABIC_SCRIPT)
|
||||
.test("[a-z]", "[\u0620-\u065F-[\u0640]]", this);
|
||||
}
|
||||
// Some transliterators removed for 2.0
|
||||
|
||||
public void TestHebrew() throws IOException, ParseException {
|
||||
new Test("Latin-Hebrew",
|
||||
TestUtility.LATIN_SCRIPT, TestUtility.HEBREW_SCRIPT)
|
||||
.test(null, "[\u05D0-\u05EF]", this);
|
||||
}
|
||||
// public void TestArabic() throws IOException, ParseException {
|
||||
// new Test("Latin-Arabic",
|
||||
// TestUtility.LATIN_SCRIPT, TestUtility.ARABIC_SCRIPT)
|
||||
// .test("[a-z]", "[\u0620-\u065F-[\u0640]]", this);
|
||||
// }
|
||||
|
||||
public void TestHangul() throws IOException, ParseException {
|
||||
Test t = new TestHangul();
|
||||
t.setPairLimit(30); // Don't run full test -- too long
|
||||
t.test(null, null, this);
|
||||
}
|
||||
// public void TestHebrew() throws IOException, ParseException {
|
||||
// new Test("Latin-Hebrew",
|
||||
// TestUtility.LATIN_SCRIPT, TestUtility.HEBREW_SCRIPT)
|
||||
// .test(null, "[\u05D0-\u05EF]", this);
|
||||
// }
|
||||
|
||||
// public void TestHangul() throws IOException, ParseException {
|
||||
// Test t = new TestHangul();
|
||||
// t.setPairLimit(30); // Don't run full test -- too long
|
||||
// t.test(null, null, this);
|
||||
// }
|
||||
|
||||
public void TestJamo() throws IOException, ParseException {
|
||||
Test t = new Test("Latin-Jamo",
|
||||
@ -333,16 +335,16 @@ public class RoundTripTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
|
||||
static class TestHangul extends Test {
|
||||
TestHangul () {
|
||||
super("Jamo-Hangul", TestUtility.JAMO_SCRIPT, TestUtility.HANGUL_SCRIPT);
|
||||
}
|
||||
|
||||
public boolean isSource(char c) {
|
||||
if (0x1113 <= c && c <= 0x1160) return false;
|
||||
if (0x1176 <= c && c <= 0x11F9) return false;
|
||||
if (0x3131 <= c && c <= 0x318E) return false;
|
||||
return super.isSource(c);
|
||||
}
|
||||
}
|
||||
// static class TestHangul extends Test {
|
||||
// TestHangul () {
|
||||
// super("Jamo-Hangul", TestUtility.JAMO_SCRIPT, TestUtility.HANGUL_SCRIPT);
|
||||
// }
|
||||
//
|
||||
// public boolean isSource(char c) {
|
||||
// if (0x1113 <= c && c <= 0x1160) return false;
|
||||
// if (0x1176 <= c && c <= 0x11F9) return false;
|
||||
// if (0x3131 <= c && c <= 0x318E) return false;
|
||||
// return super.isSource(c);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/test/translit/Attic/CompoundTransliteratorTest.java,v $
|
||||
* $Date: 2001/09/24 19:56:41 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2001/10/19 00:35:59 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -170,17 +170,17 @@ public class CompoundTransliteratorTest extends TestFmwk {
|
||||
"Any-Hex;Hex-Any;Any-Hex", "hello", "\\u0068\\u0065\\u006C\\u006C\\u006F",
|
||||
"Any-Hex;Hex-Any", "hello! How are you?", "hello! How are you?",
|
||||
"Devanagari-Latin;Latin-Devanagari", "\u092D\u0948'\u0930'\u0935", "\u092D\u0948\u0930\u0935", // quotes lost
|
||||
"Latin-Cyrillic;Cyrillic-Latin", "a'b'k'd'e'f'g'h'i'j'Shch'shch'zh'h", "abkdefghijShchshchzhh",
|
||||
"Latin-Cyrillic;Cyrillic-Latin", "a'b'k'd'e'f'g'h'i'j'Shch'shch'zh'h", "a'b'k'd'e'f'g'h'i'j'Shch'shch'zh'h",
|
||||
"Latin-Greek;Greek-Latin", "ABGabgAKLMN", "ABGabgAKLMN",
|
||||
"Latin-Arabic;Arabic-Latin", "Ad'r'a'b'i'k'dh'dd'gh", "Adrabikdhddgh",
|
||||
//"Latin-Arabic;Arabic-Latin", "Ad'r'a'b'i'k'dh'dd'gh", "Adrabikdhddgh",
|
||||
"Hiragana-Katakana", "\u3041\u308f\u3099\u306e\u304b\u3092\u3099",
|
||||
"\u30A1\u30f7\u30ce\u30ab\u30fa",
|
||||
"Hiragana-Katakana;Katakana-Hiragana", "\u3041\u308f\u3099\u306e\u304b\u3051",
|
||||
"\u3041\u308f\u3099\u306e\u304b\u3051",
|
||||
"Katakana-Hiragana;Hiragana-Katakana", "\u30A1\u30f7\u30ce\u30f5\u30f6",
|
||||
"\u30A1\u30f7\u30ce\u30ab\u30b1",
|
||||
"Latin-Kana;Kana-Latin", "VAVIVUVEVOhuZIZUZONINUNAsesuzezu",
|
||||
"VAVIVUVEVOhuZIZUZONINUNAsesuzezu",
|
||||
"Latin-Katakana;Katakana-Latin", "vavivuvevohuzizuzoninunasesuzezu",
|
||||
"vavivuvevohuzizuzoninunasesuzezu",
|
||||
};
|
||||
CompoundTransliterator ct2=null;
|
||||
for(int i=0; i<Data.length; i+=3){
|
||||
|
@ -16,34 +16,36 @@ public class RoundTripTest extends TestFmwk {
|
||||
}
|
||||
|
||||
public void TestHiragana() throws IOException, ParseException {
|
||||
new Test("Latin-Kana",
|
||||
new Test("Latin-Hiragana",
|
||||
TestUtility.LATIN_SCRIPT, TestUtility.HIRAGANA_SCRIPT)
|
||||
.test("[a-z]", "[\u3040-\u3094]", this);
|
||||
}
|
||||
|
||||
public void TestKatakana() throws IOException, ParseException {
|
||||
new Test("Latin-Kana",
|
||||
new Test("Latin-Katakana",
|
||||
TestUtility.LATIN_SCRIPT, TestUtility.KATAKANA_SCRIPT)
|
||||
.test("[A-Z]", "[\u30A1-\u30FA]", this);
|
||||
.test("[a-z]", "[\u30A1-\u30FA]", this);
|
||||
}
|
||||
|
||||
public void TestArabic() throws IOException, ParseException {
|
||||
new Test("Latin-Arabic",
|
||||
TestUtility.LATIN_SCRIPT, TestUtility.ARABIC_SCRIPT)
|
||||
.test("[a-z]", "[\u0620-\u065F-[\u0640]]", this);
|
||||
}
|
||||
// Some transliterators removed for 2.0
|
||||
|
||||
public void TestHebrew() throws IOException, ParseException {
|
||||
new Test("Latin-Hebrew",
|
||||
TestUtility.LATIN_SCRIPT, TestUtility.HEBREW_SCRIPT)
|
||||
.test(null, "[\u05D0-\u05EF]", this);
|
||||
}
|
||||
// public void TestArabic() throws IOException, ParseException {
|
||||
// new Test("Latin-Arabic",
|
||||
// TestUtility.LATIN_SCRIPT, TestUtility.ARABIC_SCRIPT)
|
||||
// .test("[a-z]", "[\u0620-\u065F-[\u0640]]", this);
|
||||
// }
|
||||
|
||||
public void TestHangul() throws IOException, ParseException {
|
||||
Test t = new TestHangul();
|
||||
t.setPairLimit(30); // Don't run full test -- too long
|
||||
t.test(null, null, this);
|
||||
}
|
||||
// public void TestHebrew() throws IOException, ParseException {
|
||||
// new Test("Latin-Hebrew",
|
||||
// TestUtility.LATIN_SCRIPT, TestUtility.HEBREW_SCRIPT)
|
||||
// .test(null, "[\u05D0-\u05EF]", this);
|
||||
// }
|
||||
|
||||
// public void TestHangul() throws IOException, ParseException {
|
||||
// Test t = new TestHangul();
|
||||
// t.setPairLimit(30); // Don't run full test -- too long
|
||||
// t.test(null, null, this);
|
||||
// }
|
||||
|
||||
public void TestJamo() throws IOException, ParseException {
|
||||
Test t = new Test("Latin-Jamo",
|
||||
@ -333,16 +335,16 @@ public class RoundTripTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
|
||||
static class TestHangul extends Test {
|
||||
TestHangul () {
|
||||
super("Jamo-Hangul", TestUtility.JAMO_SCRIPT, TestUtility.HANGUL_SCRIPT);
|
||||
}
|
||||
|
||||
public boolean isSource(char c) {
|
||||
if (0x1113 <= c && c <= 0x1160) return false;
|
||||
if (0x1176 <= c && c <= 0x11F9) return false;
|
||||
if (0x3131 <= c && c <= 0x318E) return false;
|
||||
return super.isSource(c);
|
||||
}
|
||||
}
|
||||
// static class TestHangul extends Test {
|
||||
// TestHangul () {
|
||||
// super("Jamo-Hangul", TestUtility.JAMO_SCRIPT, TestUtility.HANGUL_SCRIPT);
|
||||
// }
|
||||
//
|
||||
// public boolean isSource(char c) {
|
||||
// if (0x1113 <= c && c <= 0x1160) return false;
|
||||
// if (0x1176 <= c && c <= 0x11F9) return false;
|
||||
// if (0x3131 <= c && c <= 0x318E) return false;
|
||||
// return super.isSource(c);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user