|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.icu.math.DiagBigDecimal
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 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.
BigDecimal
,
MathContext
Inner Class Summary | |
static class |
DiagBigDecimal.DiagException
The DiagException class is used to signal the failure
of a test group. |
class |
DiagBigDecimal.Test
The Test class is used to record a specific test. |
Constructor Summary | |
DiagBigDecimal()
Constructs a DiagBigDecimal test suite. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DiagBigDecimal()
DiagBigDecimal
test suite.
Invoke its diagrun(boolean)
method to run the tests.
Method Detail |
public int diagrun(boolean isContinue)
isContinue
- The boolean
which determines whether
to stop running after a group fails. If 1 (true)
then the tests should be run to completion if
possible; if 0 (false) then the run will end if a
group fails.int
which is 0 if all tests were
successful, >0 (the count of failures) if some failures were
detected, or <0 if an unexpected Exception was signalled.public void diagconstructors()
Object.toString()
for equalities).public void diagmutation()
public void diagabs()
BigDecimal.abs()
method.public void diagadd()
BigDecimal.add(com.ibm.icu.math.BigDecimal)
method.public void diagcompareto()
BigDecimal.compareTo(BigDecimal)
method.public void diagdivide()
BigDecimal.divide(com.ibm.icu.math.BigDecimal)
method.public void diagdivideInteger()
BigDecimal.divideInteger(com.ibm.icu.math.BigDecimal)
method.public void diagmax()
BigDecimal.max(com.ibm.icu.math.BigDecimal)
method.public void diagmin()
BigDecimal.min(com.ibm.icu.math.BigDecimal)
method.public void diagmultiply()
BigDecimal.multiply(com.ibm.icu.math.BigDecimal)
method.public void diagnegate()
BigDecimal.negate()
method.public void diagplus()
BigDecimal.plus()
method.public void diagpow()
BigDecimal.pow(com.ibm.icu.math.BigDecimal)
method.public void diagremainder()
BigDecimal.remainder(com.ibm.icu.math.BigDecimal)
method.public void diagsubtract()
BigDecimal.subtract(com.ibm.icu.math.BigDecimal)
method.public void diagbyteValue()
BigDecimal.byteValue()
method.public void diagcomparetoObj()
BigDecimal.compareTo(java.lang.Object)
method.public void diagdoublevalue()
BigDecimal.doubleValue()
method.public void diagequals()
BigDecimal.equals(java.lang.Object)
method.public void diagfloatvalue()
BigDecimal.floatValue()
method.public void diagformat()
BigDecimal.format(int, int)
method.public void diaghashcode()
BigDecimal.hashCode()
method.public void diagintvalue()
BigDecimal.intValue()
method.public void diaglongvalue()
BigDecimal.longValue()
method.public void diagmovepointleft()
BigDecimal.movePointLeft(int)
method.public void diagmovepointright()
BigDecimal.movePointRight(int)
method.public void diagscale()
BigDecimal.scale()
method.public void diagsetscale()
BigDecimal.setScale(int)
method.public void diagshortvalue()
BigDecimal.shortValue()
method.public void diagsignum()
BigDecimal.signum()
method.public void diagtobigdecimal()
BigDecimal.toBigDecimal()
method.public void diagtobiginteger()
BigDecimal.toBigInteger()
method.public void diagtochararray()
BigDecimal.toCharArray()
method.public void diagtostring()
BigDecimal.toString()
method.public void diagunscaledvalue()
BigDecimal.unscaledValue()
method.public void diagvalueof()
BigDecimal.valueOf(double)
method [long and double].public void diagmathcontext()
MathContext
class.public void diagmath()
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:
public static void main(java.lang.String[] args)
DiagBigDecimal
object and then invokes its
diagrun(boolean)
method to run the test
suite.args
- The command line argument string array.
if the first word is 'continue
' then try and run
all tests, otherwise stop after the first failing test group.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |