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 2025/12/17 16:07:02 UTC
(commons-lang) branch master updated: Add NumberUtils.isParsable(String) assertions
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 0917cde22 Add NumberUtils.isParsable(String) assertions
0917cde22 is described below
commit 0917cde2275fc557a5c912c75ffeec2c50f7c1d2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Dec 17 11:00:15 2025 -0500
Add NumberUtils.isParsable(String) assertions
---
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java | 4 ++++
1 file changed, 4 insertions(+)
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 3b8aae4e9..9eed7d59b 100644
--- a/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
@@ -1077,6 +1077,8 @@ void testLang1729IsParsableByte() {
@Test
void testLang1729IsParsableDouble() {
assertTrue(isParsableDouble("1"));
+ assertTrue(isParsableDouble("1.0"));
+ assertFalse(isParsableDouble("1.0."));
assertFalse(isParsableDouble("1 2 3"));
assertFalse(isParsableDouble("1 2 3"));
}
@@ -1084,6 +1086,8 @@ void testLang1729IsParsableDouble() {
@Test
void testLang1729IsParsableFloat() {
assertTrue(isParsableFloat("1"));
+ assertTrue(isParsableFloat("1.0"));
+ assertFalse(isParsableFloat("1.0."));
assertFalse(isParsableFloat("1 2 3"));
assertFalse(isParsableFloat("1 2 3"));
}