You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2026/06/13 12:07:02 UTC
(commons-lang) 04/07: Refactor NumberUtilsTest.testCreateFloatFailure() test using @ParameterizedTest
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit 85caf864f6b15c8505f12c3a342e91a0469a023f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jun 13 12:04:29 2026 +0000
Refactor NumberUtilsTest.testCreateFloatFailure() test using
@ParameterizedTest
---
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java b/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
index 8a1284230..903d1ca42 100644
--- a/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
@@ -550,6 +550,7 @@ void testCreateFloat() {
// @formatter:on
protected void testCreateFloatFailure(final String str) {
assertThrows(NumberFormatException.class, () -> NumberUtils.createFloat(str), "createFloat(\"" + str + "\") should have failed.");
+ assertThrows(NumberFormatException.class, () -> Float.valueOf(str));
}
@Test