I've found an issue similar to rmi tests[1]
There is a method BigDecimal.subtract(BigDecimal,MathContext), its
implementation in math2 consists of 30 lines
Implementation does not perform any heavy math: I've counted 5
possible execution paths, different branches are calling
BigInteger.multiply,
BigInteger.subtract, new BigDecimal, and couple more methods.
The test against that method has 2198 generated test cases looking like the
following:
public void testSubtractMathContextXXXX() {
bigDec= new BigDecimal("...");
BigDecimal bigDec2= new BigDecimal("...");
assertEquals(msgNotSame, new BigDecimal("..."),
bigDec.subtract(bigDec2,new MathContext(...)));
}
Do we need that many tests for this method?
Thanks,
Mikhail
[1]
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200605.mbox/[EMAIL
PROTECTED]
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]