| com.ibm.icu.dev.test.TestFmwk com.ibm.icu.dev.test.bigdec.DiagBigDecimal
DiagBigDecimal | public class DiagBigDecimal extends TestFmwk (Code) | | The DiagBigDecimal class forms a standalone test suite
for the com.ibm.icu.math.BigDecimal and
com.ibm.icu.math.MathContext classes (or, by changing the
package statement, other classes of the same names and
definition in other packages). It may also be used as a constructed
object to embed the tests in an external test harness.
The tests are collected into groups, each corresponding to a
tested method or a more general grouping. By default, when run from
the static
DiagBigDecimal.main(java.lang.String[]) method, the run will end
if any test fails in a group. The continue argument may
be specified to force the tests to run to completion.
Two minor (inner) classes are used;
DiagBigDecimal.DiagException is used to signal the failure of a test
group, and
DiagBigDecimal.Test , a dependent minor class, is
used to register tests so that a summary of failures (or success) can be
presented as each group is completed.
See Also: com.ibm.icu.math.BigDecimal See Also: com.ibm.icu.math.MathContext version: 1.00 2000.03.27 author: Mike Cowlishaw |
Inner Class :public class Test | |
Constructor Summary | |
public | DiagBigDecimal() Constructs a DiagBigDecimal test suite. |
isJDK15OrLater | final static boolean isJDK15OrLater(Code) | | |
DiagBigDecimal | public DiagBigDecimal()(Code) | | Constructs a DiagBigDecimal test suite.
Invoke its
DiagBigDecimal.diagrun method to run the tests.
|
TestBigDecimal | public void TestBigDecimal()(Code) | | |
diagbyteValue | public void diagbyteValue()(Code) | | Test the BigDecimal.byteValue() method.
|
diagmath | public void diagmath()(Code) | | Test general arithmetic (base operators).
Unlike the specific method tests, these tests were randomly
generated by an IBM Object Rexx procedure, then manually corrected
for known differences from ANSI X3-274. These differences are:
- the trigger point in exponential notation is fixed in ANSI
X3-274 but varies with DIGITS in Classic and Object Rexx
- some trailing zeros were missing (e.g., 1.3 + 1E-60 should show
seven trailing zeros)
- the power operator is less accurate in Object Rexx
- ANSI X3-274 [errata 1999] rounds input numbers to DIGITS (rather
than truncating to DIGITS+1).
|
diagmutation | public void diagmutation()(Code) | | Mutation tests (checks that contents of constant objects are unchanged).
|
diagrun | public int diagrun(boolean isContinue)(Code) | | Run the tests in the test suite.
Parameters: isContinue - The boolean which determines whetherto stop running after a group fails. If 1 (true)then the tests should be run to completion ifpossible; if 0 (false) then the run will end if agroup fails. an int which is 0 if all tests weresuccessful, >0 (the count of failures) if some failures weredetected, or <0 if an unexpected Exception was signalled. |
diagshortvalue | public void diagshortvalue()(Code) | | Test the BigDecimal.shortValue() method.
|
main | public static void main(String[] args) throws Exception(Code) | | Entry point for stand-alone run. It constructs a
DiagBigDecimal object and then invokes its
DiagBigDecimal.diagrun(boolean) method to run the test
suite.
Parameters: args - The command line argument string array.if the first word is 'continue ' then try and runall tests, otherwise stop after the first failing test group. |
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)
|
|
|