| java.lang.Object com.ibm.icu.dev.test.AbstractTestLog com.ibm.icu.dev.test.TestFmwk
All known Subclasses: com.ibm.icu.dev.test.util.ICUServiceTest, com.ibm.icu.dev.test.normalizer.UnicodeNormalizerConformanceTest, com.ibm.icu.dev.test.util.StringTokenizerTest, com.ibm.icu.dev.test.util.ICUBinaryTest, com.ibm.icu.dev.test.collator.G7CollationTest, com.ibm.icu.dev.test.collator.CollationIteratorTest, com.ibm.icu.dev.test.lang.TestUScriptRun, com.ibm.richtext.test.unit.TestMText, com.ibm.icu.dev.test.serializable.SerializableTest, com.ibm.richtext.test.unit.TestParagraphStyles, com.ibm.icu.dev.test.rbbi.RBBITestExtended, com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPI, com.ibm.icu.dev.test.rbbi.SimpleBITest, com.ibm.icu.dev.test.collator.CollationThaiTest, com.ibm.icu.dev.test.collator.CollationChineseTest, com.ibm.richtext.test.unit.FmwkTestTextPanel, com.ibm.icu.dev.test.format.IntlTestDateFormat, com.ibm.icu.dev.test.collator.CollationServiceTest, com.ibm.icu.dev.test.format.IntlTestDateFormatSymbols, com.ibm.icu.dev.test.lang.TestUScript, com.ibm.icu.dev.test.timescale.TimeScaleDataTest, com.ibm.icu.dev.test.format.IntlTestDecimalFormatSymbolsC, com.ibm.icu.dev.test.calendar.CalendarTest, com.ibm.icu.dev.test.collator.CollationKanaTest, com.ibm.icu.dev.test.lang.UCharacterTest, com.ibm.icu.dev.test.collator.RandomCollator, com.ibm.icu.dev.test.collator.CollationCurrencyTest, com.ibm.icu.dev.test.rbbi.BreakIteratorRegTest, com.ibm.icu.dev.test.format.DateTimeGeneratorTest, com.ibm.icu.dev.test.util.ICUResourceBundleTest, com.ibm.icu.dev.test.timezone.TimeZoneRegression, com.ibm.icu.dev.test.format.GlobalizationPreferencesTest, com.ibm.icu.dev.test.serializable.CompatibilityTest, com.ibm.icu.dev.test.collator.CollationDummyTest, com.ibm.icu.dev.test.util.UtilityTest, com.ibm.icu.dev.test.collator.CollationEnglishTest, com.ibm.icu.dev.test.translit.ErrorTest, com.ibm.icu.dev.test.format.IntlTestNumberFormat, com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPIC, com.ibm.icu.dev.test.collator.CollationAPITest, com.ibm.icu.dev.test.util.LocaleAliasTest, com.ibm.icu.dev.test.format.DateFormatRoundTripTest, com.ibm.icu.dev.test.charset.TestCharset, com.ibm.icu.dev.test.util.CurrencyTest, com.ibm.icu.dev.test.format.IntlTestNumberFormatAPI, com.ibm.icu.dev.test.normalizer.NormalizerRegressionTests, com.ibm.icu.dev.test.cldr.TestCLDRVsICU, com.ibm.icu.dev.test.format.TestMessageFormat, com.ibm.icu.dev.test.timescale.TimeScaleAPITest, com.ibm.icu.dev.test.stringprep.TestStringPrep, com.ibm.icu.dev.test.translit.TransliteratorTest, com.ibm.icu.dev.test.collator.CollationTurkishTest, com.ibm.icu.dev.test.format.RBNFParseTest, com.ibm.icu.dev.test.stringprep.TestIDNA, com.ibm.richtext.test.unit.TestMTextStreaming, com.ibm.icu.dev.test.translit.CompoundTransliteratorTest, com.ibm.icu.dev.test.collator.CollationRegressionTest, com.ibm.icu.dev.test.normalizer.NormalizationMonkeyTest, com.ibm.icu.dev.test.util.VersionInfoTest, com.ibm.icu.dev.test.format.DateFormatMiscTests, com.ibm.icu.dev.test.format.NumberRegression, com.ibm.icu.dev.test.collator.UCAConformanceTest, com.ibm.icu.dev.test.collator.CollationSpanishTest, com.ibm.icu.dev.test.stringprep.IDNAConformanceTest, com.ibm.richtext.test.unit.TestAttributeSet, com.ibm.icu.dev.test.timezone.TimeZoneBoundaryTest, com.ibm.icu.dev.test.bigdec.DiagBigDecimal, com.ibm.icu.dev.test.util.ULocaleTest, com.ibm.icu.dev.test.format.DateFormatRegressionTestJ, com.ibm.icu.dev.test.rbbi.RBBITestMonkey, com.ibm.icu.dev.test.calendar.AstroTest, com.ibm.icu.dev.test.calendar.HolidayTest, com.ibm.icu.dev.test.charsetdet.TestCharsetDetector, com.ibm.icu.dev.test.lang.UTF16Test, com.ibm.richtext.test.unit.TestAttributeMap, com.ibm.icu.dev.test.compression.DecompressionTest, com.ibm.icu.dev.test.collator.LotusCollationKoreanTest, com.ibm.icu.dev.test.calendar.CompatibilityTest, com.ibm.icu.dev.test.util.DisplayNameTest, com.ibm.icu.dev.test.ModuleTest, com.ibm.icu.dev.test.rbbi.RBBIAPITest, com.ibm.icu.dev.test.format.NumberFormatRegistrationTest, com.ibm.icu.dev.test.format.RbnfTest, com.ibm.icu.dev.test.lang.UCharacterCaseTest, com.ibm.icu.dev.test.normalizer.TestCanonicalIterator, com.ibm.icu.dev.test.lang.UCharacterIteratorTest, com.ibm.icu.dev.test.search.SearchTest, com.ibm.icu.dev.test.format.NumberFormatRoundTripTest, com.ibm.icu.dev.test.timezone.TimeZoneAliasTest, com.ibm.icu.dev.test.compression.ExhaustiveTest, com.ibm.icu.dev.test.normalizer.BasicTest, com.ibm.icu.dev.test.util.TextTrieMapTest, com.ibm.icu.dev.test.translit.ReplaceableTest, com.ibm.icu.dev.test.format.NumberFormatRegressionTest, com.ibm.icu.dev.test.TestBoilerplate, com.ibm.icu.dev.test.lang.UCharacterCategoryTest, com.ibm.icu.dev.test.util.TestUtilities, com.ibm.icu.dev.test.util.LRUMapTest, com.ibm.icu.dev.test.util.CompactArrayTest, com.ibm.icu.dev.test.iterator.TestUCharacterIterator, com.ibm.icu.dev.test.lang.UCharacterDirectionTest, com.ibm.richtext.test.unit.TestFormatter, com.ibm.icu.dev.test.format.DateFormatRegressionTest, com.ibm.icu.dev.test.rbbi.RBBITest, com.ibm.icu.dev.test.collator.CollationFinnishTest, com.ibm.icu.dev.test.format.IntlTestSimpleDateFormatAPI, com.ibm.icu.dev.test.stringprep.TestIDNARef, com.ibm.icu.dev.test.format.IntlTestDateFormatAPI, com.ibm.icu.dev.test.calendar.CalendarRegression, com.ibm.icu.dev.test.shaping.ArabicShapingRegTest, com.ibm.icu.dev.test.collator.CollationFrenchTest, com.ibm.icu.dev.test.normalizer.TestDeprecatedNormalizerAPI, com.ibm.icu.dev.test.translit.RoundTripTest, com.ibm.icu.dev.test.util.ICUListResourceBundleTest, com.ibm.icu.dev.test.format.IntlTestDecimalFormatSymbols, com.ibm.icu.dev.test.util.LocaleDataTest, com.ibm.icu.dev.test.util.ICUServiceThreadTest, com.ibm.icu.dev.test.translit.UnicodeSetTest, com.ibm.icu.dev.test.timezone.TimeZoneTest, com.ibm.icu.dev.test.collator.CollationGermanTest, com.ibm.icu.dev.test.lang.UPropertyAliasesTest, com.ibm.icu.dev.test.lang.UCharacterSurrogateTest, com.ibm.icu.dev.test.format.MessageRegression, com.ibm.icu.dev.test.format.RbnfRoundTripTest, com.ibm.icu.dev.test.format.IntlTestDateFormatAPIC, com.ibm.icu.dev.test.format.DateFormatTest, com.ibm.icu.dev.test.format.BigNumberFormatTest, com.ibm.icu.dev.test.normalizer.ConformanceTest, com.ibm.icu.dev.test.rbbi.BreakIteratorTest, com.ibm.icu.dev.test.util.TrieTest, com.ibm.icu.dev.test.collator.CollationMonkeyTest, com.ibm.icu.dev.test.format.NumberFormatTest, com.ibm.icu.dev.test.collator.CollationMiscTest, com.ibm.icu.dev.test.timescale.TimeScaleMonkeyTest,
TestFmwk | public class TestFmwk extends AbstractTestLog (Code) | | TestFmwk is a base class for tests that can be run conveniently from the
command line as well as under the Java test harness.
Sub-classes implement a set of methods named Test . Each of these
methods performs some test. Test methods should indicate errors by calling
either err or errln. This will increment the errorCount field and may
optionally print a message to the log. Debugging information may also be
added to the log via the log and logln methods. These methods will add their
arguments to the log only if the test is being run in verbose mode.
|
Inner Class :final public static class TestFmwkException extends Exception | |
Inner Class :abstract public static class TestGroup extends TestFmwk | |
Inner Class :public class Target | |
Inner Class :public class EmptyTarget extends Target | |
Inner Class :public class MethodTarget extends Target | |
Inner Class :public class ClassTarget extends Target | |
Inner Class :public static class NullWriter extends PrintWriter | |
Inner Class :public static class ASCIIWriter extends PrintWriter | |
Inner Class :public static class TestParams | |
Field Summary | |
protected TestParams | params |
Constructor Summary | |
protected | TestFmwk() |
Method Summary | |
protected boolean | assertEquals(String message, boolean expected, boolean actual) | protected boolean | assertEquals(String message, long expected, long actual) | protected boolean | assertEquals(String message, float expected, float actual, double error) | protected boolean | assertEquals(String message, double expected, double actual, double error) | protected boolean | assertEquals(String message, Object expected, Object actual) | protected boolean | assertFalse(String message, boolean condition) | protected boolean | assertNotEquals(String message, Object expected, Object actual) | protected boolean | assertNotNull(String message, Object actual) | protected boolean | assertNotSame(String message, Object expected, Object actual) | protected boolean | assertNull(String message, Object actual) | protected boolean | assertSame(String message, Object expected, Object actual) | protected boolean | assertTrue(String message, boolean condition) | protected int | checkArray(String msg, String array, String expected) Check the given array to see that all the strings in the expected array
are present. | protected int | checkArray(String msg, Locale array, String expected) Check the given array to see that all the locales in the expected array
are present. | protected int | checkArray(String msg, ULocale array, String expected) Check the given array to see that all the locales in the expected array
are present. | protected Random | createRandom() | protected void | fail(String message) | protected static synchronized java.util.Date | getDate(int year, int month, int dom) Return a Date given a year, month, and day of month. | protected String | getDescription() | protected int | getErrorCount() | public PrintWriter | getErrorLogPrintWriter() | public int | getInclusion() | public PrintWriter | getLogPrintWriter() | protected String | getMethodDescription(String name) | protected TestFmwk | getSubtest(String prefix) | protected Target | getTargets(String targetName) Return the targets for this test. | public String | getTranslitTestFilter() | protected void | handleException(Throwable e) | public static String | hex(char[] s) | public static String | hex(byte[] s) | public static String | hex(char ch) | public static String | hex(int ch) | public static String | hex(String s) | public static String | hex(StringBuffer s) | protected void | init() | public boolean | isDateAtLeast(int year, int month, int day) | public boolean | isMemTracking() | public boolean | isModularBuild() | public boolean | isQuick() | public boolean | isTiming() | public boolean | isVerbose() | public void | msg(String message, int level, boolean incCount, boolean newln) | public boolean | noData() | public static String | prettify(String s) | public static String | prettify(StringBuffer s) | public Target | resolveTarget(TestParams params) Return a ClassTarget for this test. | public Target | resolveTarget(TestParams params, String targetPath) Resolve a path from this test to a target. | public void | run(String[] args) Parse arguments into a TestParams object and a collection of target
paths. | public int | run(String[] args, PrintWriter log) Like run(String[]) except this allows you to specify the error log. | public int | runTests(TestParams params, String[] tests) | protected TimeZone | safeGetTimeZone(String id) | public void | usage() Print a usage message for this test class. | public static void | usage(PrintWriter pw, String className) | protected boolean | validate() | protected boolean | validateMethod(String name) |
params | protected TestParams params(Code) | | |
TestFmwk | protected TestFmwk()(Code) | | |
assertEquals | protected boolean assertEquals(String message, boolean expected, boolean actual)(Code) | | |
assertEquals | protected boolean assertEquals(String message, long expected, long actual)(Code) | | |
assertEquals | protected boolean assertEquals(String message, float expected, float actual, double error)(Code) | | |
assertEquals | protected boolean assertEquals(String message, double expected, double actual, double error)(Code) | | |
assertFalse | protected boolean assertFalse(String message, boolean condition)(Code) | | |
assertTrue | protected boolean assertTrue(String message, boolean condition)(Code) | | |
checkArray | protected int checkArray(String msg, String array, String expected)(Code) | | Check the given array to see that all the strings in the expected array
are present.
Parameters: msg - string message, for log output Parameters: array - array of strings to check Parameters: expected - array of strings we expect to see, or null the length of 'array', or -1 on error |
checkArray | protected int checkArray(String msg, Locale array, String expected)(Code) | | Check the given array to see that all the locales in the expected array
are present.
Parameters: msg - string message, for log output Parameters: array - array of locales to check Parameters: expected - array of locales names we expect to see, or null the length of 'array' |
checkArray | protected int checkArray(String msg, ULocale array, String expected)(Code) | | Check the given array to see that all the locales in the expected array
are present.
Parameters: msg - string message, for log output Parameters: array - array of locales to check Parameters: expected - array of locales names we expect to see, or null the length of 'array' |
getDate | protected static synchronized java.util.Date getDate(int year, int month, int dom)(Code) | | Return a Date given a year, month, and day of month. This is similar to
new Date(y-1900, m, d). It uses the default time zone at the time this
method is first called.
Parameters: year - use 2000 for 2000, unlike new Date() Parameters: month - use Calendar.JANUARY etc. Parameters: dom - day of month, 1-based a Date object for the given y/m/d |
getErrorCount | protected int getErrorCount()(Code) | | |
getInclusion | public int getInclusion()(Code) | | 0 = fewest tests, 5 is normal build, 10 is most tests
|
getTargets | protected Target getTargets(String targetName)(Code) | | Return the targets for this test. If targetName is null, return all
targets, otherwise return a target for just that name. The returned
target can be null.
The default implementation returns a MethodTarget for each public method
of the object's class whose name starts with "Test" or "test".
|
getTranslitTestFilter | public String getTranslitTestFilter()(Code) | | |
isDateAtLeast | public boolean isDateAtLeast(int year, int month, int day)(Code) | | |
isMemTracking | public boolean isMemTracking()(Code) | | |
isModularBuild | public boolean isModularBuild()(Code) | | |
isQuick | public boolean isQuick()(Code) | | |
isTiming | public boolean isTiming()(Code) | | |
isVerbose | public boolean isVerbose()(Code) | | |
msg | public void msg(String message, int level, boolean incCount, boolean newln)(Code) | | |
noData | public boolean noData()(Code) | | |
resolveTarget | public Target resolveTarget(TestParams params)(Code) | | Return a ClassTarget for this test. Params is set on this test.
|
resolveTarget | public Target resolveTarget(TestParams params, String targetPath)(Code) | | Resolve a path from this test to a target. If this test has subtests, and
the path contains '/', the portion before the '/' is resolved to a
subtest, until the path is consumed or the test has no subtests. Returns
a ClassTarget created using the resolved test and remaining path (which
ought to be null or a method name). Params is set on the target's test.
|
run | public void run(String[] args)(Code) | | Parse arguments into a TestParams object and a collection of target
paths. If there was an error parsing the TestParams, print usage and exit
with -1. Otherwise, call resolveTarget(TestParams, String) for each path,
and run the returned target. After the last test returns, if prompt is
set, prompt and wait for input from stdin. Finally, exit with number of
errors.
This method never returns, since it always exits with System.exit();
|
run | public int run(String[] args, PrintWriter log)(Code) | | Like run(String[]) except this allows you to specify the error log.
Unlike run(String[]) this returns the error code as a result instead of
calling System.exit().
|
runTests | public int runTests(TestParams params, String[] tests)(Code) | | |
usage | public void usage()(Code) | | Print a usage message for this test class.
|
validate | protected boolean validate()(Code) | | Return true if we can run this test (allows test to inspect jvm,
environment, params before running)
|
validateMethod | protected boolean validateMethod(String name)(Code) | | |
Fields inherited from com.ibm.icu.dev.test.AbstractTestLog | public static boolean dontSkipForVersion(Code)(Java Doc)
|
|
|