From e299b2d677890756353568a299a068c6203af0c2 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 7 Aug 2021 15:02:49 +0000 Subject: [PATCH] [bug-49202] add PERCENTRANK.INC function git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892082 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/ss/formula/atp/TestPercentRankIncFunction.java | 2 ++ .../org/apache/poi/ss/formula/functions/TestPercentRank.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestPercentRankIncFunction.java b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestPercentRankIncFunction.java index 5846ccb8c8..b73352d53c 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestPercentRankIncFunction.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestPercentRankIncFunction.java @@ -48,6 +48,8 @@ public class TestPercentRankIncFunction { assertDouble(fe, cell, "PERCENTRANK.INC(A2:A11,8,2)", 0.66); assertDouble(fe, cell, "PERCENTRANK.INC(A2:A11,8,4)", 0.6666); assertDouble(fe, cell, "PERCENTRANK.INC(A2:A11,5)", 0.583); + assertDouble(fe, cell, "PERCENTRANK(A2:A11,1)", 0); + assertDouble(fe, cell, "PERCENTRANK(A2:A11,13)", 1); } } diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestPercentRank.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestPercentRank.java index 96f489431d..4d68cc0fe5 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestPercentRank.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestPercentRank.java @@ -47,6 +47,8 @@ public class TestPercentRank { assertDouble(fe, cell, "PERCENTRANK(A2:A11,8,2)", 0.66); assertDouble(fe, cell, "PERCENTRANK(A2:A11,8,4)", 0.6666); assertDouble(fe, cell, "PERCENTRANK(A2:A11,5)", 0.583); + assertDouble(fe, cell, "PERCENTRANK(A2:A11,1)", 0); + assertDouble(fe, cell, "PERCENTRANK(A2:A11,13)", 1); } } -- 2.39.5