Show input as well as output for failures
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461682 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f1d2999aa2
commit
0b58bbef33
|
@ -285,7 +285,7 @@ public class NumberUtilsTest {
|
||||||
protected void testCreateFloatFailure(final String str) {
|
protected void testCreateFloatFailure(final String str) {
|
||||||
try {
|
try {
|
||||||
final Float value = NumberUtils.createFloat(str);
|
final Float value = NumberUtils.createFloat(str);
|
||||||
fail("createFloat() should have failed: " + value);
|
fail("createFloat(\"" + str + "\") should have failed: " + value);
|
||||||
} catch (final NumberFormatException ex) {
|
} catch (final NumberFormatException ex) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,7 @@ public class NumberUtilsTest {
|
||||||
protected void testCreateDoubleFailure(final String str) {
|
protected void testCreateDoubleFailure(final String str) {
|
||||||
try {
|
try {
|
||||||
final Double value = NumberUtils.createDouble(str);
|
final Double value = NumberUtils.createDouble(str);
|
||||||
fail("createDouble() should have failed: " + value);
|
fail("createDouble(\"" + str + "\") should have failed: " + value);
|
||||||
} catch (final NumberFormatException ex) {
|
} catch (final NumberFormatException ex) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ public class NumberUtilsTest {
|
||||||
protected void testCreateIntegerFailure(final String str) {
|
protected void testCreateIntegerFailure(final String str) {
|
||||||
try {
|
try {
|
||||||
final Integer value = NumberUtils.createInteger(str);
|
final Integer value = NumberUtils.createInteger(str);
|
||||||
fail("createInteger() should have failed: " + value);
|
fail("createInteger(\"" + str + "\") should have failed: " + value);
|
||||||
} catch (final NumberFormatException ex) {
|
} catch (final NumberFormatException ex) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
@ -345,7 +345,7 @@ public class NumberUtilsTest {
|
||||||
protected void testCreateLongFailure(final String str) {
|
protected void testCreateLongFailure(final String str) {
|
||||||
try {
|
try {
|
||||||
final Long value = NumberUtils.createLong(str);
|
final Long value = NumberUtils.createLong(str);
|
||||||
fail("createLong() should have failed: " + value);
|
fail("createLong(\"" + str + "\") should have failed: " + value);
|
||||||
} catch (final NumberFormatException ex) {
|
} catch (final NumberFormatException ex) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ public class NumberUtilsTest {
|
||||||
protected void testCreateBigIntegerFailure(final String str) {
|
protected void testCreateBigIntegerFailure(final String str) {
|
||||||
try {
|
try {
|
||||||
final BigInteger value = NumberUtils.createBigInteger(str);
|
final BigInteger value = NumberUtils.createBigInteger(str);
|
||||||
fail("createBigInteger() should have failed: " + value);
|
fail("createBigInteger(\"" + str + "\") should have failed: " + value);
|
||||||
} catch (final NumberFormatException ex) {
|
} catch (final NumberFormatException ex) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
@ -403,7 +403,7 @@ public class NumberUtilsTest {
|
||||||
protected void testCreateBigDecimalFailure(final String str) {
|
protected void testCreateBigDecimalFailure(final String str) {
|
||||||
try {
|
try {
|
||||||
final BigDecimal value = NumberUtils.createBigDecimal(str);
|
final BigDecimal value = NumberUtils.createBigDecimal(str);
|
||||||
fail("createBigDecimal() should have failed: " + value);
|
fail("createBigDecimal(\"" + str + "\") should have failed: " + value);
|
||||||
} catch (final NumberFormatException ex) {
|
} catch (final NumberFormatException ex) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue