From 573429d804384fb5eb8df9805e2cd3f298b7cd3c Mon Sep 17 00:00:00 2001 From: Josh Micich Date: Mon, 5 May 2008 18:30:49 +0000 Subject: [PATCH] Added test case method javadoc for old bug 44675 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@653551 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/model/TestFormulaParser.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java b/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java index 9ce862b9b..2f476c892 100644 --- a/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java +++ b/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java @@ -887,6 +887,14 @@ public final class TestFormulaParser extends TestCase { assertTrue(e.getMessage().startsWith("Too few arguments suppled to operation token")); } } + /** + * Make sure that POI uses the right Func Ptg when encoding formulas. Functions with variable + * number of args should get FuncVarPtg, functions with fixed args should get FuncPtg.

+ * + * Prior to the fix for bug 44675 POI would encode FuncVarPtg for all functions. In many cases + * Excel tolerates the wrong Ptg and evaluates the formula OK (e.g. SIN), but in some cases + * (e.g. COUNTIF) Excel fails to evaluate the formula, giving '#VALUE!' instead. + */ public void testFuncPtgSelection() { HSSFWorkbook book = new HSSFWorkbook(); Ptg[] ptgs;