| java.lang.Object com.ibm.icu.dev.test.AbstractTestLog com.ibm.icu.dev.test.TestFmwk com.ibm.icu.dev.test.rbbi.RBBITestMonkey
RBBITestMonkey | public class RBBITestMonkey extends TestFmwk (Code) | | Monkey tests for RBBI. These tests have independent implementations of
the Unicode TR boundary rules, and compare results between these and ICU's
implementation, using random data.
Tests cover Grapheme Cluster (char), Word and Line breaks
Ported from ICU4C, original code in file source/test/intltest/rbbitst.cpp
|
Inner Class :abstract static class RBBIMonkeyKind | |
Inner Class :static class RBBICharMonkey extends RBBIMonkeyKind | |
Inner Class :static class RBBIWordMonkey extends RBBIMonkeyKind | |
Inner Class :static class RBBILineMonkey extends RBBIMonkeyKind | |
Inner Class :static class RBBISentenceMonkey extends RBBIMonkeyKind | |
Method Summary | |
void | RunMonkey(BreakIterator bi, RBBIMonkeyKind mk, String name, int seed, int numIterations) Run a RBBI monkey test. | public void | TestCharMonkey() | public void | TestLineMonkey() | public void | TestRTCharMonkey() | public void | TestRTLineMonkey() | public void | TestRTSentMonkey() | public void | TestRTWordMonkey() | public void | TestSentMonkey() | public void | TestWordMonkey() | protected void | init() | public static void | main(String[] args) | static int | moveIndex32(StringBuffer s, int pos, int amt) Move an index into a string by n code points.
Similar to UTF16.moveCodePointOffset, but without the exceptions, which were
complicating usage.
Parameters: s - a Text string Parameters: pos - The starting code unit index into the text string Parameters: amt - The amount to adjust the string by. | static int | nextCP(StringBuffer s, int i) return the index of the next code point in the input text. | static boolean | setContains(UnicodeSet s, int c) No-exceptions form of UnicodeSet.contains(c). |
RunMonkey | void RunMonkey(BreakIterator bi, RBBIMonkeyKind mk, String name, int seed, int numIterations)(Code) | | Run a RBBI monkey test. Common routine, for all break iterator types.
Parameters:
bi - the break iterator to use
mk - MonkeyKind, abstraction for obtaining expected results
name - Name of test (char, word, etc.) for use in error messages
seed - Seed for starting random number generator (parameter from user)
numIterations
|
TestCharMonkey | public void TestCharMonkey()(Code) | | |
TestLineMonkey | public void TestLineMonkey()(Code) | | |
TestRTCharMonkey | public void TestRTCharMonkey()(Code) | | |
TestRTLineMonkey | public void TestRTLineMonkey()(Code) | | |
TestRTSentMonkey | public void TestRTSentMonkey()(Code) | | |
TestRTWordMonkey | public void TestRTWordMonkey()(Code) | | |
TestSentMonkey | public void TestSentMonkey()(Code) | | |
TestWordMonkey | public void TestWordMonkey()(Code) | | |
moveIndex32 | static int moveIndex32(StringBuffer s, int pos, int amt)(Code) | | Move an index into a string by n code points.
Similar to UTF16.moveCodePointOffset, but without the exceptions, which were
complicating usage.
Parameters: s - a Text string Parameters: pos - The starting code unit index into the text string Parameters: amt - The amount to adjust the string by. The adjusted code unit index, pinned to the string's length, orunchanged if input index was outside of the string. |
nextCP | static int nextCP(StringBuffer s, int i)(Code) | | return the index of the next code point in the input text.
Parameters: i - the preceding index |
setContains | static boolean setContains(UnicodeSet s, int c)(Code) | | No-exceptions form of UnicodeSet.contains(c).
Simplifies loops that terminate with an end-of-input character value.
Parameters: s - A unicode set Parameters: c - A code point value true if the set contains c. |
Fields inherited from com.ibm.icu.dev.test.TestFmwk | protected TestParams params(Code)(Java Doc)
|
Methods inherited from com.ibm.icu.dev.test.TestFmwk | protected boolean assertEquals(String message, boolean expected, boolean actual)(Code)(Java Doc) protected boolean assertEquals(String message, long expected, long actual)(Code)(Java Doc) protected boolean assertEquals(String message, float expected, float actual, double error)(Code)(Java Doc) protected boolean assertEquals(String message, double expected, double actual, double error)(Code)(Java Doc) protected boolean assertEquals(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertFalse(String message, boolean condition)(Code)(Java Doc) protected boolean assertNotEquals(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertNotNull(String message, Object actual)(Code)(Java Doc) protected boolean assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertNull(String message, Object actual)(Code)(Java Doc) protected boolean assertSame(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertTrue(String message, boolean condition)(Code)(Java Doc) protected int checkArray(String msg, String array, String expected)(Code)(Java Doc) protected int checkArray(String msg, Locale array, String expected)(Code)(Java Doc) protected int checkArray(String msg, ULocale array, String expected)(Code)(Java Doc) protected Random createRandom()(Code)(Java Doc) protected void fail(String message)(Code)(Java Doc) protected static synchronized java.util.Date getDate(int year, int month, int dom)(Code)(Java Doc) protected String getDescription()(Code)(Java Doc) protected int getErrorCount()(Code)(Java Doc) public PrintWriter getErrorLogPrintWriter()(Code)(Java Doc) public int getInclusion()(Code)(Java Doc) public PrintWriter getLogPrintWriter()(Code)(Java Doc) protected String getMethodDescription(String name)(Code)(Java Doc) protected TestFmwk getSubtest(String prefix) throws TestFmwkException(Code)(Java Doc) protected Target getTargets(String targetName)(Code)(Java Doc) public String getTranslitTestFilter()(Code)(Java Doc) protected void handleException(Throwable e)(Code)(Java Doc) public static String hex(char[] s)(Code)(Java Doc) public static String hex(byte[] s)(Code)(Java Doc) public static String hex(char ch)(Code)(Java Doc) public static String hex(int ch)(Code)(Java Doc) public static String hex(String s)(Code)(Java Doc) public static String hex(StringBuffer s)(Code)(Java Doc) protected void init() throws Exception(Code)(Java Doc) public boolean isDateAtLeast(int year, int month, int day)(Code)(Java Doc) public boolean isMemTracking()(Code)(Java Doc) public boolean isModularBuild()(Code)(Java Doc) public boolean isQuick()(Code)(Java Doc) public boolean isTiming()(Code)(Java Doc) public boolean isVerbose()(Code)(Java Doc) public void msg(String message, int level, boolean incCount, boolean newln)(Code)(Java Doc) public boolean noData()(Code)(Java Doc) public static String prettify(String s)(Code)(Java Doc) public static String prettify(StringBuffer s)(Code)(Java Doc) public Target resolveTarget(TestParams params)(Code)(Java Doc) public Target resolveTarget(TestParams params, String targetPath)(Code)(Java Doc) public void run(String[] args)(Code)(Java Doc) public int run(String[] args, PrintWriter log)(Code)(Java Doc) public int runTests(TestParams params, String[] tests)(Code)(Java Doc) protected TimeZone safeGetTimeZone(String id)(Code)(Java Doc) public void usage()(Code)(Java Doc) public static void usage(PrintWriter pw, String className)(Code)(Java Doc) protected boolean validate()(Code)(Java Doc) protected boolean validateMethod(String name)(Code)(Java Doc)
|
Fields inherited from com.ibm.icu.dev.test.AbstractTestLog | public static boolean dontSkipForVersion(Code)(Java Doc)
|
|
|