Add some more BigDecimal tests

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1384124 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-09-12 21:03:18 +00:00
parent 4070a08100
commit 2c6fa89aa4
1 changed files with 6 additions and 0 deletions

View File

@ -340,6 +340,12 @@ public void testCreateBigDecimal() {
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) {