| com.ibm.icu.tests.ICUTestCase
All known Subclasses: com.ibm.icu.tests.DecimalFormatSymbolsTest, com.ibm.icu.tests.NumberFormatTest, com.ibm.icu.tests.SimpleDateFormatTest, com.ibm.icu.tests.CollationKeyTest, com.ibm.icu.tests.DecimalFormatTest, com.ibm.icu.tests.MessageFormatTest, com.ibm.icu.tests.CalendarTest, com.ibm.icu.tests.CollatorTest, com.ibm.icu.tests.BreakIteratorTest, com.ibm.icu.tests.DateFormatTest, com.ibm.icu.tests.TimeZoneTest, com.ibm.icu.tests.DateFormatSymbolsTest, com.ibm.icu.tests.ULocaleTest,
ICUTestCase | abstract public class ICUTestCase extends TestCase (Code) | | Implement boilerplate tests.
Currently there is only one method, testEHCS, which tests equals, hashCode,
clone, and serialization.
|
testingWrapper | final public static boolean testingWrapper(Code) | | |
assertArraysEqual | public static void assertArraysEqual(Object lhs, Object rhs)(Code) | | Fail if the arrays are not equal. To be equal, the arrays must
be the same length, and each element in the left array must compare
equal to the corresponding element of the right array.
Also fails if one of the objects is not an array.
Parameters: lhs - the left array Parameters: rhs - the right array |
assertArraysNotEqual | public static void assertArraysNotEqual(Object lhs, Object rhs)(Code) | | Fail if the arrays are equal. Also fails if one or the other
argument is not an array.
Parameters: lhs - the left array Parameters: rhs - the right array |
assertNotEqual | public static void assertNotEqual(Object lhs, Object rhs)(Code) | | Assert that two objects are _not_ equal. Curiously missing from Assert.
Parameters: lhs - an object to test, may be null Parameters: rhs - an object to test, may be null |
assertNotEqual | public static void assertNotEqual(long lhs, long rhs)(Code) | | |
testEHCS | public static void testEHCS(Object obj, Object eq, Object neq)(Code) | | Test whether equality, hashCode, clone, and serialization work as expected.
Equals(Object) is assumed to return false (not throw an exception) if passed
null or an object of an incompatible class.
Hashcodes must be equal iff the two objects compare equal. No attempt is made to
evaluate the quality of the hashcode distribution, so (in particular) degenerate
hashcode implementations will pass this test.
Clone will be tested if the method "clone" is public on the class of obj.
It is assumed to return an object that compares equal to obj.
Serialization will be tested if object implements Serializable or Externalizable.
It is assumed the serialized/deserialized object compares equal to obj.
Parameters: obj - the object to test Parameters: eq - an object that should compare equal to, but is not the same as, obj. it should be assignable to the class of obj. Parameters: neq - a non-null object that should not compare equal to obj. it should be assignable to the class of obj. |
|
|