mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-6951 Hand merged change set 26075, 26077 and 26106 which were blew up by svn merge.
X-SVN-Rev: 26114
This commit is contained in:
parent
4ec5afc95f
commit
a96f4fd0e3
4 changed files with 23 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2007, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@ import com.ibm.icu.util.CompactByteArray;
|
|||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public class BreakDictionary {
|
||||
/* public */ class BreakDictionary {
|
||||
//=================================================================================
|
||||
// testing and debugging
|
||||
//=================================================================================
|
||||
|
@ -62,7 +62,7 @@ public class BreakDictionary {
|
|||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public void printWordList(String partialWord, int state, PrintWriter out)
|
||||
/* public */ void printWordList(String partialWord, int state, PrintWriter out)
|
||||
throws IOException {
|
||||
if (state == 0xFFFF) {
|
||||
System.out.println(partialWord);
|
||||
|
@ -166,7 +166,7 @@ public class BreakDictionary {
|
|||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public BreakDictionary(InputStream dictionaryStream) throws IOException {
|
||||
/* public */ BreakDictionary(InputStream dictionaryStream) throws IOException {
|
||||
readDictionaryFile(new DataInputStream(dictionaryStream));
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ public class BreakDictionary {
|
|||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public void readDictionaryFile(DataInputStream in) throws IOException {
|
||||
/* public */ void readDictionaryFile(DataInputStream in) throws IOException {
|
||||
int l;
|
||||
|
||||
// read in the version number (right now we just ignore it)
|
||||
|
@ -250,7 +250,7 @@ public class BreakDictionary {
|
|||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public final short at(int row, char ch) {
|
||||
/* public */ final short at(int row, char ch) {
|
||||
int col = columnMap.elementAt(ch);
|
||||
return at(row, col);
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ public class BreakDictionary {
|
|||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public final short at(int row, int col) {
|
||||
/* public */ final short at(int row, int col) {
|
||||
if (cellIsPopulated(row, col)) {
|
||||
// we map from logical to physical row number by looking up the
|
||||
// mapping in rowIndex; we map from logical column number to
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dd751b158829ed6eeb388f5c52590f6f79d83d8fb50a29f0fcfe47af393abb8a
|
||||
size 774992
|
||||
oid sha256:96abd036f2721efd98951b4065d3ac8041867dd1e127fc20f4547d1c5fcfe0db
|
||||
size 772172
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -46,6 +46,7 @@ public class TestAll extends TestGroup {
|
|||
"UCAConformanceTest",
|
||||
// don't test Search API twice!
|
||||
//"com.ibm.icu.dev.test.search.SearchTest"
|
||||
"IndexCharactersTest"
|
||||
},
|
||||
"All Collation Tests"
|
||||
);
|
||||
|
|
|
@ -15,6 +15,7 @@ package com.ibm.icu.dev.test.rbbi;
|
|||
// which is common between ICU4C and ICU4J. The remaining test data should also be moved,
|
||||
// or simply retired if it is no longer interesting.
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.text.DictionaryBasedBreakIterator;
|
||||
import com.ibm.icu.text.RuleBasedBreakIterator;
|
||||
import com.ibm.icu.text.BreakIterator;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
@ -566,6 +567,17 @@ public class RBBITest extends TestFmwk
|
|||
errln("Incorrect break given by thai line break iterator. Expected: " + expectedLineResult[index-1] + " Got: " + position);
|
||||
}
|
||||
}
|
||||
// Improve code coverage
|
||||
if (brk.preceding(expectedLineResult[1]) != expectedLineResult[0]) {
|
||||
errln("Incorrect preceding position.");
|
||||
}
|
||||
if (brk.following(expectedLineResult[1]) != expectedLineResult[2]) {
|
||||
errln("Incorrect following position.");
|
||||
}
|
||||
int []fillInArray = new int[2];
|
||||
if (((DictionaryBasedBreakIterator)brk).getRuleStatusVec(fillInArray) != 1 || fillInArray[0] != 0) {
|
||||
errln("Error: Since getRuleStatusVec is not supported in DictionaryBasedBreakIterator, it should return 1 and fillInArray[0] == 0.");
|
||||
}
|
||||
}
|
||||
|
||||
public void TestTailoredBreaks() {
|
||||
|
|
Loading…
Add table
Reference in a new issue