diff options
author | Josh Micich <josh@apache.org> | 2009-11-14 02:41:24 +0000 |
---|---|---|
committer | Josh Micich <josh@apache.org> | 2009-11-14 02:41:24 +0000 |
commit | b31ca01a5c53aa129984d0982a6b85a8bea3b0ae (patch) | |
tree | 6c9fda22fb877e5db52bd8445901781d474d0ddb /src/testcases/org | |
parent | 89223f9500dea29c2b6ecad70401c844c11206ca (diff) | |
download | poi-b31ca01a5c53aa129984d0982a6b85a8bea3b0ae.tar.gz poi-b31ca01a5c53aa129984d0982a6b85a8bea3b0ae.zip |
Made AbstractFunctionPtg immutable, other minor improvements
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@836101 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org')
3 files changed, 5 insertions, 7 deletions
diff --git a/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java b/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java index 30c6df530d..6af5ba4ba1 100644 --- a/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java +++ b/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java @@ -419,7 +419,7 @@ public final class TestFormulaParser extends TestCase { HSSFWorkbook book = new HSSFWorkbook(); Ptg[] ptgs = { - new FuncPtg(10), + FuncPtg.create(10), }; assertEquals("NA()", HSSFFormulaParser.toFormulaString(book, ptgs)); } diff --git a/src/testcases/org/apache/poi/hssf/record/formula/TestFuncPtg.java b/src/testcases/org/apache/poi/hssf/record/formula/TestFuncPtg.java index bbf8c4cfb2..399e80c240 100644 --- a/src/testcases/org/apache/poi/hssf/record/formula/TestFuncPtg.java +++ b/src/testcases/org/apache/poi/hssf/record/formula/TestFuncPtg.java @@ -34,15 +34,15 @@ public final class TestFuncPtg extends TestCase { 0, }; - FuncPtg ptg = new FuncPtg(TestcaseRecordInputStream.createLittleEndian(fakeData) ); + FuncPtg ptg = FuncPtg.create(TestcaseRecordInputStream.createLittleEndian(fakeData) ); assertEquals( "Len formula index is not 32(20H)", 0x20, ptg.getFunctionIndex() ); assertEquals( "Number of operands in the len formula", 1, ptg.getNumberOfOperands() ); assertEquals( "Function Name", "LEN", ptg.getName() ); assertEquals( "Ptg Size", 3, ptg.getSize() ); } - + public void testClone() { - FuncPtg funcPtg = new FuncPtg(27); // ROUND() - takes 2 args + FuncPtg funcPtg = FuncPtg.create(27); // ROUND() - takes 2 args FuncPtg clone = (FuncPtg) funcPtg.clone(); if (clone.getNumberOfOperands() == 0) { @@ -52,5 +52,3 @@ public final class TestFuncPtg extends TestCase { assertEquals("ROUND", clone.getName()); } } - - diff --git a/src/testcases/org/apache/poi/hssf/record/formula/eval/TestRangeEval.java b/src/testcases/org/apache/poi/hssf/record/formula/eval/TestRangeEval.java index dcf53132ec..07e40898c5 100644 --- a/src/testcases/org/apache/poi/hssf/record/formula/eval/TestRangeEval.java +++ b/src/testcases/org/apache/poi/hssf/record/formula/eval/TestRangeEval.java @@ -186,7 +186,7 @@ public final class TestRangeEval extends TestCase { new RefPtg("C1"), new IntPtg(0), new RefPtg("B1"), - new FuncVarPtg("OFFSET", (byte)3), + FuncVarPtg.create("OFFSET", (byte)3), RangePtg.instance, AttrPtg.SUM, }; |