We did. I'll fix it. Would you volunteer providing a patch that replaces assertTrue with assertEquals in the remaining test methods?
Thanks, Mikhail 2006/4/25, Mark Hindess <[EMAIL PROTECTED]>: > > On 25 April 2006 at 7:34, [EMAIL PROTECTED] wrote: > > Author: mloenko > > Date: Tue Apr 25 00:34:21 2006 > > New Revision: 396803 > > > > URL: http://svn.apache.org/viewcvs?rev=396803&view=rev > > Log: > > applied changes for the tests from HARMONY-319: > > BigDecimal and Biginteger test failures should be fixed > > > > Modified: > > > > incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/test > > s/api/java/math/BigDecimalTest.java > > > > incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/test > > s/api/java/math/BigIntegerTest.java > > > > Modified: > > incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/jav > > a/tests/api/java/math/BigDecimalTest.java > > URL: > > http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/ > > modules/math/src/test/java/tests/api/java/math/BigDecimalTest.java?rev=396803 > > &r1=396802&r2=396803&view=diff > > ============================================================================= > > = > > --- > > incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/test > > s/api/java/math/BigDecimalTest.java (original) > > +++ > > incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/test > > s/api/java/math/BigDecimalTest.java Tue Apr 25 00:34:21 2006 > > [ SNIP ] > > @@ -128,22 +127,48 @@ > > /** > > * @tests java.math.BigDecimal#BigDecimal(java.lang.String) > > */ > > + public void test_constructor_String_empty() { > > + boolean gotNFE = false; > > + try { > > + new BigDecimal(""); > > + } catch (NumberFormatException e) { > > + gotNFE = true; > > + } catch (Throwable e) { > > + fail("Unexpected exception for new BigDecimal(\"\") " > > + > > e); > > + } > > + if (!gotNFE) { > > + fail("Expected NumberFormatException for new > > BigDecimal > > (\"\")"); > > + } > > + } > > I thought we'd agreed to write tests like this as: > > public void test_constructor_String_empty() { > try { > new BigDecimal(""); > fail("Expected NumberFormatException for new BigDecimal(\"\")"); > } catch (NumberFormatException e) { > // expected > } > } > > and let junit handle the "unexpected exception" cases? > > Regards, > Mark. > > > > > > --------------------------------------------------------------------- > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [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]
