Author: sebb
Date: Wed Sep 12 21:03:18 2012
New Revision: 1384124
URL: http://svn.apache.org/viewvc?rev=1384124&view=rev
Log:
Add some more BigDecimal tests
Modified:
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
Modified:
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java?rev=1384124&r1=1384123&r2=1384124&view=diff
==============================================================================
---
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
(original)
+++
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
Wed Sep 12 21:03:18 2012
@@ -340,6 +340,12 @@ public class NumberUtilsTest {
this.testCreateBigDecimalFailure("\b\t\n\f\r");
// Funky whitespaces
this.testCreateBigDecimalFailure("\u00A0\uFEFF\u000B\u000C\u001C\u001D\u001E\u001F");
+ this.testCreateBigDecimalFailure("-"); // sign alone not valid
+ this.testCreateBigDecimalFailure("--"); // comment in NumberUtils
suggests some implementations may incorrectly allow this
+ this.testCreateBigDecimalFailure("--0");
+ this.testCreateBigDecimalFailure("+"); // sign alone not valid
+ this.testCreateBigDecimalFailure("++"); // in case this was also
allowed by some JVMs
+ this.testCreateBigDecimalFailure("++0");
}
protected void testCreateBigDecimalFailure(String str) {