| java.lang.Object com.ibm.icu.dev.test.AbstractTestLog com.ibm.icu.dev.test.TestFmwk com.ibm.icu.dev.test.TestBoilerplate
TestBoilerplate | abstract public class TestBoilerplate extends TestFmwk (Code) | | To use, override the abstract and the protected methods as necessary.
Tests boilerplate invariants:
a.equals(a)
!a.equals(null)
if a.equals(b) then
(1) a.hashCode() == b.hashCode // note: the reverse is not necessarily true.
(2) a functions in all aspects as equivalent to b
(3) b.equals(a)
if b = clone(a)
(1) b.equals(a), and the above checks
(2) if mutable(a), then a.clone() != a // note: the reverse is not necessarily true.
author: Davis |
_addTestObject | abstract protected boolean _addTestObject(List c)(Code) | | This method will be called multiple times until false is returned.
The results should be a mixture of different objects of the same
type: some equal and most not equal.
The subclasser controls how many are produced (recommend about
100, based on the size of the objects and how costly they are
to run this test on. The running time grows with the square of the
count.
NOTE: this method will only be called if the objects test as equal.
|
_canClone | protected boolean _canClone(Object a)(Code) | | Override if the tested objects can be cloned.
|
_clone | protected Object _clone(Object a) throws Exception(Code) | | Produce a clone of the object. Tries two methods
(a) clone
(b) constructor
Must be overridden if _canClone returns true and
the above methods don't work.
Parameters: a - clone |
_hasSameBehavior | abstract protected boolean _hasSameBehavior(Object a, Object b)(Code) | | Must be overridden to check whether a and be behave the same
|
_isMutable | protected boolean _isMutable(Object a)(Code) | | Override if the tested objects are mutable.
Since Java doesn't tell us, we need a function to tell if so.
The default is true, so must be overridden if not.
|
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)
|
|
|