ICU-1980 fixed bugs in transliteration tests caused by change in U3.2 properties
X-SVN-Rev: 9105
This commit is contained in:
parent
06e5522c10
commit
b6fb82ff0e
@ -26,20 +26,38 @@ public class RoundTripTest extends TestFmwk {
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
Note: Unicode 3.2 added new Hiragana/Katakana characters:
|
||||
|
||||
3095..3096 ; 3.2 # [2] HIRAGANA LETTER SMALL KA..HIRAGANA LETTER SMALL KE
|
||||
309F..30A0 ; 3.2 # [2] HIRAGANA DIGRAPH YORI..KATAKANA-HIRAGANA DOUBLE HYPHEN
|
||||
30FF ; 3.2 # KATAKANA DIGRAPH KOTO
|
||||
31F0..31FF ; 3.2 # [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO
|
||||
|
||||
We will not add them to the rules until they are more supported (e.g. in fonts on Windows)
|
||||
A bug has been filed to remind us to do this: #1979.
|
||||
*/
|
||||
|
||||
static String KATAKANA = "[[[:katakana:][\u30A1-\u30FA\u30FC]]-[\u30FF\u31F0-\u31FF]]";
|
||||
static String HIRAGANA = "[[[:hiragana:][\u3040-\u3094]]-[\u3095-\u3096\u309F-\u30A0]]";
|
||||
static String LENGTH = "[\u30FC]";
|
||||
static String HALFWIDTH_KATAKANA = "[\uFF65-\uFF9D]";
|
||||
static String KATAKANA_ITERATION = "[\u30FD\u30FE]";
|
||||
static String HIRAGANA_ITERATION = "[\u309D\u309E]";
|
||||
|
||||
public void TestKana() throws IOException, ParseException {
|
||||
new Test("Katakana-Hiragana")
|
||||
.test("[[:katakana:]\u30A1-\u30FA\u30FC]", "[[:hiragana:]\u3040-\u3094\u30FC]",
|
||||
"[\u30FC\u309D\u309E\uFF66-\uFF9D]", this, new Legal());
|
||||
.test(KATAKANA, "[" + HIRAGANA + LENGTH + "]", "[" + HALFWIDTH_KATAKANA + LENGTH + "]", this, new Legal());
|
||||
}
|
||||
|
||||
public void TestHiragana() throws IOException, ParseException {
|
||||
new Test("Latin-Hiragana")
|
||||
.test("[a-zA-Z]", "[[:hiragana:]\u3040-\u3094]", "[\u309D\u309E]", this, new Legal());
|
||||
.test("[a-zA-Z]", HIRAGANA, HIRAGANA_ITERATION, this, new Legal());
|
||||
}
|
||||
|
||||
|
||||
public void TestKatakana() throws IOException, ParseException {
|
||||
new Test("Latin-Katakana")
|
||||
.test("[a-zA-Z]", "[[:katakana:]\u30A1-\u30FA\u30FC]", "[\u30FD\u30FE\uFF66-\uFF9D]", this, new Legal());
|
||||
.test("[a-zA-Z]", KATAKANA, "[" + KATAKANA_ITERATION + HALFWIDTH_KATAKANA + "]", this, new Legal());
|
||||
}
|
||||
|
||||
// Some transliterators removed for 2.0
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java,v $
|
||||
* $Date: 2002/06/26 18:10:04 $
|
||||
* $Revision: 1.108 $
|
||||
* $Date: 2002/07/11 23:45:26 $
|
||||
* $Revision: 1.109 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
@ -823,8 +823,8 @@ public class TransliteratorTest extends TestFmwk {
|
||||
Transliterator.getInstance("Name-Any");
|
||||
|
||||
expect(uni2name, "\u00A0abc\u4E01\u00B5\u0A81\uFFFD\u0004\u0009\u0081\uFFFF",
|
||||
"{NO-BREAK SPACE}abc{CJK UNIFIED IDEOGRAPH-4E01}{MICRO SIGN}{GUJARATI SIGN CANDRABINDU}{REPLACEMENT CHARACTER}{END OF TRANSMISSION}{HORIZONTAL TABULATION}{<control-0081>}{<noncharacter-FFFF>}");
|
||||
expect(name2uni, "{ NO-BREAK SPACE}abc{ CJK UNIFIED IDEOGRAPH-4E01 }{x{MICRO SIGN}{GUJARATI SIGN CANDRABINDU}{REPLACEMENT CHARACTER}{END OF TRANSMISSION}{HORIZONTAL TABULATION}{<control-0081>}{<noncharacter-FFFF>}{<control-0004>}{",
|
||||
"{NO-BREAK SPACE}abc{CJK UNIFIED IDEOGRAPH-4E01}{MICRO SIGN}{GUJARATI SIGN CANDRABINDU}{REPLACEMENT CHARACTER}{END OF TRANSMISSION}{CHARACTER TABULATION}{<control-0081>}{<noncharacter-FFFF>}");
|
||||
expect(name2uni, "{ NO-BREAK SPACE}abc{ CJK UNIFIED IDEOGRAPH-4E01 }{x{MICRO SIGN}{GUJARATI SIGN CANDRABINDU}{REPLACEMENT CHARACTER}{END OF TRANSMISSION}{CHARACTER TABULATION}{<control-0081>}{<noncharacter-FFFF>}{<control-0004>}{",
|
||||
"\u00A0abc\u4E01{x\u00B5\u0A81\uFFFD\u0004\u0009\u0081\uFFFF\u0004{");
|
||||
}
|
||||
|
||||
@ -2268,7 +2268,7 @@ public class TransliteratorTest extends TestFmwk {
|
||||
|
||||
// ff, i, dotless-i, I, dotted-I, LJLjlj deseret deeDEE
|
||||
{"Title", "ab'cD ffi\u0131I\u0130 \u01C7\u01C8\u01C9 " + DESERET_dee + DESERET_DEE,
|
||||
"Ab'cd Ffi\u0131ii \u01C8\u01C9\u01C9 " + DESERET_DEE + DESERET_dee},
|
||||
"Ab'cd Ffi\u0131ii\u0307 \u01C8\u01C9\u01C9 " + DESERET_DEE + DESERET_dee},
|
||||
//TODO: enable this test once Titlecase works right
|
||||
//{"Title", "\uFB00i\u0131I\u0130 \u01C7\u01C8\u01C9 " + DESERET_dee + DESERET_DEE,
|
||||
// "Ffi\u0131ii \u01C8\u01C9\u01C9 " + DESERET_DEE + DESERET_dee},
|
||||
@ -2276,7 +2276,7 @@ public class TransliteratorTest extends TestFmwk {
|
||||
{"Upper", "ab'cD \uFB00i\u0131I\u0130 \u01C7\u01C8\u01C9 " + DESERET_dee + DESERET_DEE,
|
||||
"AB'CD FFIII\u0130 \u01C7\u01C7\u01C7 " + DESERET_DEE + DESERET_DEE},
|
||||
{"Lower", "ab'cD \uFB00i\u0131I\u0130 \u01C7\u01C8\u01C9 " + DESERET_dee + DESERET_DEE,
|
||||
"ab'cd \uFB00i\u0131ii \u01C9\u01C9\u01C9 " + DESERET_dee + DESERET_dee},
|
||||
"ab'cd \uFB00i\u0131ii\u0307 \u01C9\u01C9\u01C9 " + DESERET_dee + DESERET_dee},
|
||||
|
||||
{"Upper", "ab'cD \uFB00i\u0131I\u0130 \u01C7\u01C8\u01C9 " + DESERET_dee + DESERET_DEE},
|
||||
{"Lower", "ab'cD \uFB00i\u0131I\u0130 \u01C7\u01C8\u01C9 " + DESERET_dee + DESERET_DEE},
|
||||
|
Loading…
Reference in New Issue
Block a user