| Index: icu46/source/test/intltest/rbbiapts.cpp
|
| ===================================================================
|
| --- icu46/source/test/intltest/rbbiapts.cpp (revision 68397)
|
| +++ icu46/source/test/intltest/rbbiapts.cpp (working copy)
|
| @@ -156,9 +156,13 @@
|
| if(*a!=*b){
|
| errln("Failed: boilerplate method operator!= does not return correct results");
|
| }
|
| - BreakIterator* c = BreakIterator::createWordInstance(Locale("ja"),status);
|
| - if(a && c){
|
| - if(*c==*a){
|
| + // Japanese word break iteratos is identical to root with
|
| + // a dictionary-based break iterator, but Thai character break iterator
|
| + // is still different from Root.
|
| + BreakIterator* c = BreakIterator::createCharacterInstance(Locale("ja"),status);
|
| + BreakIterator* d = BreakIterator::createCharacterInstance(Locale("th"),status);
|
| + if(c && d){
|
| + if(*c==*d){
|
| errln("Failed: boilerplate method opertator== does not return correct results");
|
| }
|
| }else{
|
| @@ -167,6 +171,7 @@
|
| delete a;
|
| delete b;
|
| delete c;
|
| + delete d;
|
| }
|
|
|
| void RBBIAPITest::TestgetRules()
|
| @@ -635,21 +640,21 @@
|
| //
|
| void RBBIAPITest::TestRuleStatus() {
|
| UChar str[30];
|
| - u_unescape("plain word 123.45 \\u9160\\u9161 \\u30a1\\u30a2 \\u3041\\u3094",
|
| - // 012345678901234567 8 9 0 1 2 3 4 5 6
|
| - // Ideographic Katakana Hiragana
|
| + //no longer test Han or hiragana breaking here: ruleStatusVec would return nothing
|
| + // changed UBRK_WORD_KANA to UBRK_WORD_IDEO
|
| + u_unescape("plain word 123.45 \\u30a1\\u30a2 ",
|
| + // 012345678901234567 8 9 0
|
| + // Katakana
|
| str, 30);
|
| UnicodeString testString1(str);
|
| - int32_t bounds1[] = {0, 5, 6, 10, 11, 17, 18, 19, 20, 21, 23, 24, 25, 26};
|
| + int32_t bounds1[] = {0, 5, 6, 10, 11, 17, 18, 20, 21};
|
| int32_t tag_lo[] = {UBRK_WORD_NONE, UBRK_WORD_LETTER, UBRK_WORD_NONE, UBRK_WORD_LETTER,
|
| UBRK_WORD_NONE, UBRK_WORD_NUMBER, UBRK_WORD_NONE,
|
| - UBRK_WORD_IDEO, UBRK_WORD_IDEO, UBRK_WORD_NONE,
|
| - UBRK_WORD_KANA, UBRK_WORD_NONE, UBRK_WORD_KANA, UBRK_WORD_KANA};
|
| + UBRK_WORD_IDEO, UBRK_WORD_NONE};
|
|
|
| int32_t tag_hi[] = {UBRK_WORD_NONE_LIMIT, UBRK_WORD_LETTER_LIMIT, UBRK_WORD_NONE_LIMIT, UBRK_WORD_LETTER_LIMIT,
|
| UBRK_WORD_NONE_LIMIT, UBRK_WORD_NUMBER_LIMIT, UBRK_WORD_NONE_LIMIT,
|
| - UBRK_WORD_IDEO_LIMIT, UBRK_WORD_IDEO_LIMIT, UBRK_WORD_NONE_LIMIT,
|
| - UBRK_WORD_KANA_LIMIT, UBRK_WORD_NONE_LIMIT, UBRK_WORD_KANA_LIMIT, UBRK_WORD_KANA_LIMIT};
|
| + UBRK_WORD_IDEO_LIMIT, UBRK_WORD_NONE_LIMIT};
|
|
|
| UErrorCode status=U_ZERO_ERROR;
|
|
|
| @@ -888,9 +893,11 @@
|
|
|
| URegistryKey key = BreakIterator::registerInstance(ja_word, "xx", UBRK_WORD, status);
|
| {
|
| +#if 0 // With a dictionary based word breaking, ja_word is identical to root.
|
| if (ja_word && *ja_word == *root_word) {
|
| errln("japan not different from root");
|
| }
|
| +#endif
|
| }
|
|
|
| {
|
|
|