You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2022/05/27 11:44:46 UTC

svn commit: r1901321 - in /poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions: TestStdev.java TestVar.java

Author: fanningpj
Date: Fri May 27 11:44:46 2022
New Revision: 1901321

URL: http://svn.apache.org/viewvc?rev=1901321&view=rev
Log:
add VARPA and STDEVPA functions

Modified:
    poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestStdev.java
    poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestVar.java

Modified: poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestStdev.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestStdev.java?rev=1901321&r1=1901320&r2=1901321&view=diff
==============================================================================
--- poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestStdev.java (original)
+++ poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestStdev.java Fri May 27 11:44:46 2022
@@ -29,13 +29,15 @@ import static org.apache.poi.ss.util.Uti
 import static org.apache.poi.ss.util.Utils.assertDouble;
 
 /**
- * Testcase for functions: STDEV(), STDEVP(), STDEV.S(), STDEV.P()
+ * Testcase for functions: STDEV(), STDEVP(), STDEV.S(), STDEV.P(), STDEVA(), STDEVPA()
  */
 public class TestStdev {
 
     //https://support.microsoft.com/en-us/office/stdevp-function-1f7c1c88-1bec-4422-8242-e9f7dc8bb195
     //https://support.microsoft.com/en-us/office/stdev-p-function-6e917c05-31a0-496f-ade7-4f4e7462f285
     //https://support.microsoft.com/en-us/office/stdev-s-function-7d69cf97-0c1f-4acf-be27-f3e83904cc23
+    //https://support.microsoft.com/en-us/office/stdeva-function-5ff38888-7ea5-48de-9a6d-11ed73b29e9d
+    //https://support.microsoft.com/en-us/office/stdevpa-function-5578d4d6-455a-4308-9991-d405afe2c28c
     @Test
     void testMicrosoftExample1() throws IOException {
         try (HSSFWorkbook wb = initWorkbook1()) {
@@ -43,8 +45,10 @@ public class TestStdev {
             HSSFCell cell = wb.getSheetAt(0).getRow(0).createCell(12);
             assertDouble(fe, cell, "STDEVP(A3:A12)", 26.0545581424825, 0.00000000001);
             assertDouble(fe, cell, "STDEV.P(A3:A12)", 26.0545581424825, 0.00000000001);
+            assertDouble(fe, cell, "STDEVPA(A3:A12)", 26.0545581424825, 0.00000000001);
             assertDouble(fe, cell, "STDEV(A3:A12)", 27.4639157198435, 0.00000000001);
             assertDouble(fe, cell, "STDEV.S(A3:A12)", 27.4639157198435, 0.00000000001);
+            assertDouble(fe, cell, "STDEVA(A3:A12)", 27.4639157198435, 0.00000000001);
         }
     }
 

Modified: poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestVar.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestVar.java?rev=1901321&r1=1901320&r2=1901321&view=diff
==============================================================================
--- poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestVar.java (original)
+++ poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestVar.java Fri May 27 11:44:46 2022
@@ -29,12 +29,14 @@ import static org.apache.poi.ss.util.Uti
 import static org.apache.poi.ss.util.Utils.assertDouble;
 
 /**
- * Testcase for functions: VAR.S(), VAR.P()
+ * Testcase for functions: VAR.S(), VAR.P(), VARA(), VARPA()
  */
 public class TestVar {
 
     //https://support.microsoft.com/en-us/office/var-s-function-913633de-136b-449d-813e-65a00b2b990b
     //https://support.microsoft.com/en-us/office/var-p-function-73d1285c-108c-4843-ba5d-a51f90656f3a
+    //https://support.microsoft.com/en-us/office/vara-function-3de77469-fa3a-47b4-85fd-81758a1e1d07
+    //https://support.microsoft.com/en-us/office/varpa-function-59a62635-4e89-4fad-88ac-ce4dc0513b96
     @Test
     void testMicrosoftExample1() throws IOException {
         try (HSSFWorkbook wb = initWorkbook1()) {
@@ -42,8 +44,10 @@ public class TestVar {
             HSSFCell cell = wb.getSheetAt(0).getRow(0).createCell(12);
             assertDouble(fe, cell, "VARP(A3:A12)", 678.84, 0.00000000001);
             assertDouble(fe, cell, "VAR.P(A3:A12)", 678.84, 0.00000000001);
-            assertDouble(fe, cell, "VAR(A3:A12)", 754.27, 0.005);
-            assertDouble(fe, cell, "VAR.S(A3:A12)", 754.27, 0.005);
+            assertDouble(fe, cell, "VARPA(A3:A12)", 678.84, 0.00000000001);
+            assertDouble(fe, cell, "VAR(A3:A12)", 754.26667, 0.00005);
+            assertDouble(fe, cell, "VAR.S(A3:A12)", 754.26667, 0.00005);
+            assertDouble(fe, cell, "VARA(A3:A12)", 754.26667, 0.00005);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org