]> source.dussan.org Git - poi.git/commitdiff
add test
authorPJ Fanning <fanningpj@apache.org>
Sat, 9 Apr 2022 21:17:49 +0000 (21:17 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 9 Apr 2022 21:17:49 +0000 (21:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899690 13f79535-47bb-0310-9956-ffa450edef68

poi/src/test/java/org/apache/poi/ss/formula/functions/TestRoundFuncs.java

index e32a5a333bd8c31b81f84fb4b716eb2f9a23d78c..a0c4b7d7cae2b2ac1ac8b4de1d88088b266f0b7f 100644 (file)
@@ -53,6 +53,14 @@ final class TestRoundFuncs {
         assertEquals(ErrorEval.VALUE_INVALID, result);
     }
 
+    @Test
+    void testGithub321() {
+        ValueEval strArg = new NumberEval(2.05);
+        ValueEval[] args = { strArg, new NumberEval(1), };
+        NumberEval result = (NumberEval)NumericFunction.ROUND.evaluate(args, -1, (short)-1);
+        assertEquals(2.1, result.getNumberValue());
+    }
+
     @Test
     void testRoundUpWithStringArg() {
         ValueEval strArg = new StringEval("abc");