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-cli.git
The following commit(s) were added to refs/heads/master by this push:
new e4e5a05 Add missing test
e4e5a05 is described below
commit e4e5a05eb4c16e85732e149556a3faccb3069fa7
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Apr 7 13:21:22 2024 -0400
Add missing test
---
src/test/java/org/apache/commons/cli/TypeHandlerTest.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
b/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
index 5a3abe0..9017fdb 100644
--- a/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
+++ b/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
@@ -210,6 +210,12 @@ public class TypeHandlerTest {
assertEquals(file, TypeHandler.createFile(file.toString()));
}
+ @Test
+ public void testCreateNumber() throws ParseException {
+ assertEquals(0L, TypeHandler.createNumber("0"));
+ assertEquals(0d, TypeHandler.createNumber("0.0"));
+ }
+
@Test
public void testCreateFiles() {
assertThrows(UnsupportedOperationException.class, () ->
TypeHandler.createFiles(null));