Java Doc for TestFmwk.java in  » Internationalization-Localization » icu4j » com » ibm » icu » dev » test » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Internationalization Localization » icu4j » com.ibm.icu.dev.test 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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  TestParamsparams
    

Constructor Summary
protected  TestFmwk()
    

Method Summary
protected  booleanassertEquals(String message, boolean expected, boolean actual)
    
protected  booleanassertEquals(String message, long expected, long actual)
    
protected  booleanassertEquals(String message, float expected, float actual, double error)
    
protected  booleanassertEquals(String message, double expected, double actual, double error)
    
protected  booleanassertEquals(String message, Object expected, Object actual)
    
protected  booleanassertFalse(String message, boolean condition)
    
protected  booleanassertNotEquals(String message, Object expected, Object actual)
    
protected  booleanassertNotNull(String message, Object actual)
    
protected  booleanassertNotSame(String message, Object expected, Object actual)
    
protected  booleanassertNull(String message, Object actual)
    
protected  booleanassertSame(String message, Object expected, Object actual)
    
protected  booleanassertTrue(String message, boolean condition)
    
protected  intcheckArray(String msg, String array, String expected)
     Check the given array to see that all the strings in the expected array are present.
protected  intcheckArray(String msg, Locale array, String expected)
     Check the given array to see that all the locales in the expected array are present.
protected  intcheckArray(String msg, ULocale array, String expected)
     Check the given array to see that all the locales in the expected array are present.
protected  RandomcreateRandom()
    
protected  voidfail(String message)
    
protected static synchronized  java.util.DategetDate(int year, int month, int dom)
     Return a Date given a year, month, and day of month.
protected  StringgetDescription()
    
protected  intgetErrorCount()
    
public  PrintWritergetErrorLogPrintWriter()
    
public  intgetInclusion()
    
public  PrintWritergetLogPrintWriter()
    
protected  StringgetMethodDescription(String name)
    
protected  TestFmwkgetSubtest(String prefix)
    
protected  TargetgetTargets(String targetName)
     Return the targets for this test.
public  StringgetTranslitTestFilter()
    
protected  voidhandleException(Throwable e)
    
public static  Stringhex(char[] s)
    
public static  Stringhex(byte[] s)
    
public static  Stringhex(char ch)
    
public static  Stringhex(int ch)
    
public static  Stringhex(String s)
    
public static  Stringhex(StringBuffer s)
    
protected  voidinit()
    
public  booleanisDateAtLeast(int year, int month, int day)
    
public  booleanisMemTracking()
    
public  booleanisModularBuild()
    
public  booleanisQuick()
    
public  booleanisTiming()
    
public  booleanisVerbose()
    
public  voidmsg(String message, int level, boolean incCount, boolean newln)
    
public  booleannoData()
    
public static  Stringprettify(String s)
    
public static  Stringprettify(StringBuffer s)
    
public  TargetresolveTarget(TestParams params)
     Return a ClassTarget for this test.
public  TargetresolveTarget(TestParams params, String targetPath)
     Resolve a path from this test to a target.
public  voidrun(String[] args)
     Parse arguments into a TestParams object and a collection of target paths.
public  intrun(String[] args, PrintWriter log)
     Like run(String[]) except this allows you to specify the error log.
public  intrunTests(TestParams params, String[] tests)
    
protected  TimeZonesafeGetTimeZone(String id)
    
public  voidusage()
     Print a usage message for this test class.
public static  voidusage(PrintWriter pw, String className)
    
protected  booleanvalidate()
    
protected  booleanvalidateMethod(String name)
    

Field Detail
params
protected TestParams params(Code)




Constructor Detail
TestFmwk
protected TestFmwk()(Code)




Method Detail
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)



assertEquals
protected boolean assertEquals(String message, Object expected, Object actual)(Code)



assertFalse
protected boolean assertFalse(String message, boolean condition)(Code)



assertNotEquals
protected boolean assertNotEquals(String message, Object expected, Object actual)(Code)



assertNotNull
protected boolean assertNotNull(String message, Object actual)(Code)



assertNotSame
protected boolean assertNotSame(String message, Object expected, Object actual)(Code)



assertNull
protected boolean assertNull(String message, Object actual)(Code)



assertSame
protected boolean assertSame(String message, Object expected, Object actual)(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'



createRandom
protected Random createRandom()(Code)



fail
protected void fail(String message)(Code)



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



getDescription
protected String getDescription()(Code)



getErrorCount
protected int getErrorCount()(Code)



getErrorLogPrintWriter
public PrintWriter getErrorLogPrintWriter()(Code)



getInclusion
public int getInclusion()(Code)
0 = fewest tests, 5 is normal build, 10 is most tests



getLogPrintWriter
public PrintWriter getLogPrintWriter()(Code)



getMethodDescription
protected String getMethodDescription(String name)(Code)



getSubtest
protected TestFmwk getSubtest(String prefix) throws TestFmwkException(Code)



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)



handleException
protected void handleException(Throwable e)(Code)



hex
public static String hex(char[] s)(Code)



hex
public static String hex(byte[] s)(Code)



hex
public static String hex(char ch)(Code)



hex
public static String hex(int ch)(Code)



hex
public static String hex(String s)(Code)



hex
public static String hex(StringBuffer s)(Code)



init
protected void init() throws Exception(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)



prettify
public static String prettify(String s)(Code)



prettify
public static String prettify(StringBuffer s)(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)



safeGetTimeZone
protected TimeZone safeGetTimeZone(String id)(Code)



usage
public void usage()(Code)
Print a usage message for this test class.



usage
public static void usage(PrintWriter pw, String className)(Code)



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)

Methods inherited from com.ibm.icu.dev.test.AbstractTestLog
final public void err(String message)(Code)(Java Doc)
final public void errln(String message)(Code)(Java Doc)
public boolean isICUVersionAtLeast(int major, int minor)(Code)(Java Doc)
final public void log(String message)(Code)(Java Doc)
final public void logln(String message)(Code)(Java Doc)
abstract public void msg(String message, int level, boolean incCount, boolean newln)(Code)(Java Doc)
public boolean skipIfBeforeICU(int major, int minor)(Code)(Java Doc)
final public void warn(String message)(Code)(Java Doc)
final public void warnln(String message)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.