From: Josh Micich
* Primarily used by test cases when testing for specific parsing exceptions.
* The name matching is case insensitive.
- * @return true
if the name specifies a standard worksheet function,
+ * @return true
if the name specifies a standard worksheet function,
* false
if the name should be assumed to be an external function.
*/
public static final boolean isInternalFunctionName(String name) {
short ix = FunctionMetadataRegistry.lookupIndexByName(name.toUpperCase());
return ix >= 0;
}
-
+
protected String lookupName(short index) {
if(index == FunctionMetadataRegistry.FUNCTION_INDEX_EXTERNAL) {
return "#external#";
@@ -127,7 +127,7 @@ public abstract class AbstractFunctionPtg extends OperationPtg {
}
return fm.getName();
}
-
+
/**
* Resolves internal function names into function indexes.
*
@@ -145,7 +145,7 @@ public abstract class AbstractFunctionPtg extends OperationPtg {
public byte getDefaultOperandClass() {
return returnClass;
}
-
+
public byte getParameterClass(int index) {
try {
return paramClass[index];
diff --git a/src/java/org/apache/poi/hssf/record/formula/FuncPtg.java b/src/java/org/apache/poi/hssf/record/formula/FuncPtg.java
index a94355a0f0..69edf88aae 100644
--- a/src/java/org/apache/poi/hssf/record/formula/FuncPtg.java
+++ b/src/java/org/apache/poi/hssf/record/formula/FuncPtg.java
@@ -27,11 +27,11 @@ import org.apache.poi.hssf.record.formula.function.FunctionMetadataRegistry;
* @author Danny Mui (dmui at apache dot org) (Leftover handling)
*/
public final class FuncPtg extends AbstractFunctionPtg {
-
+
public final static byte sid = 0x21;
public final static int SIZE = 3;
private int numParams=0;
-
+
/**
* FuncPtgs are defined to be 4 bytes but the actual FuncPtg uses only 2 bytes.
* If we have leftOvers that are read from the file we should serialize them back out.
@@ -39,18 +39,18 @@ public final class FuncPtg extends AbstractFunctionPtg {
* If the leftovers are removed, a prompt "Warning: Data may have been lost occurs in Excel"
*/
//protected byte[] leftOvers = null;
-
+
private FuncPtg() {
- //Required for clone methods
+ //Required for clone methods
}
- /**Creates new function pointer from a byte array
- * usually called while reading an excel file.
+ /**Creates new function pointer from a byte array
+ * usually called while reading an excel file.
*/
public FuncPtg(RecordInputStream in) {
//field_1_num_args = data[ offset + 0 ];
field_2_fnc_index = in.readShort();
-
+
FunctionMetadata fm = FunctionMetadataRegistry.getFunctionByIndex(field_2_fnc_index);
if(fm == null) {
throw new RuntimeException("Invalid built-in function index (" + field_2_fnc_index + ")");
@@ -62,12 +62,12 @@ public final class FuncPtg extends AbstractFunctionPtg {
numParams = numberOfParameters;
paramClass = new byte[] { Ptg.CLASS_VALUE, }; // TODO
}
-
+
public void writeBytes(byte[] array, int offset) {
array[offset+0]= (byte) (sid + ptgClass);
LittleEndian.putShort(array,offset+1,field_2_fnc_index);
}
-
+
public int getNumberOfOperands() {
return numParams;
}
@@ -79,11 +79,11 @@ public final class FuncPtg extends AbstractFunctionPtg {
ptg.setClass(ptgClass);
return ptg;
}
-
+
public int getSize() {
return SIZE;
}
-
+
public String toString() {
StringBuffer sb = new StringBuffer(64);
sb.append(getClass().getName()).append(" [");
diff --git a/src/java/org/apache/poi/hssf/record/formula/FuncVarPtg.java b/src/java/org/apache/poi/hssf/record/formula/FuncVarPtg.java
index b4732c7287..fb65271393 100644
--- a/src/java/org/apache/poi/hssf/record/formula/FuncVarPtg.java
+++ b/src/java/org/apache/poi/hssf/record/formula/FuncVarPtg.java
@@ -15,7 +15,6 @@
limitations under the License.
==================================================================== */
-
package org.apache.poi.hssf.record.formula;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.hssf.record.RecordInputStream;
@@ -27,22 +26,22 @@ import org.apache.poi.hssf.record.formula.function.FunctionMetadataRegistry;
* @author Jason Height (jheight at chariot dot net dot au)
*/
public final class FuncVarPtg extends AbstractFunctionPtg{
-
+
public final static byte sid = 0x22;
- private final static int SIZE = 4;
-
+ private final static int SIZE = 4;
+
private FuncVarPtg() {
//Required for clone methods
}
- /**Creates new function pointer from a byte array
- * usually called while reading an excel file.
+ /**Creates new function pointer from a byte array
+ * usually called while reading an excel file.
*/
public FuncVarPtg(RecordInputStream in) {
field_1_num_args = in.readByte();
field_2_fnc_index = in.readShort();
}
-
+
/**
* Create a function ptg from a string tokenised by the parser
*/
@@ -59,17 +58,17 @@ public final class FuncVarPtg extends AbstractFunctionPtg{
paramClass = new byte[] {Ptg.CLASS_VALUE};
}
}
-
+
public void writeBytes(byte[] array, int offset) {
array[offset+0]=(byte) (sid + ptgClass);
array[offset+1]=field_1_num_args;
LittleEndian.putShort(array,offset+2,field_2_fnc_index);
}
-
+
public int getNumberOfOperands() {
return field_1_num_args;
}
-
+
public Object clone() {
FuncVarPtg ptg = new FuncVarPtg();
ptg.field_1_num_args = field_1_num_args;
@@ -77,11 +76,11 @@ public final class FuncVarPtg extends AbstractFunctionPtg{
ptg.setClass(ptgClass);
return ptg;
}
-
+
public int getSize() {
return SIZE;
}
-
+
public String toString() {
StringBuffer sb = new StringBuffer(64);
sb.append(getClass().getName()).append(" [");
diff --git a/src/java/org/apache/poi/hssf/record/formula/function/FunctionDataBuilder.java b/src/java/org/apache/poi/hssf/record/formula/function/FunctionDataBuilder.java
index b304ec3d42..2009ebae1f 100644
--- a/src/java/org/apache/poi/hssf/record/formula/function/FunctionDataBuilder.java
+++ b/src/java/org/apache/poi/hssf/record/formula/function/FunctionDataBuilder.java
@@ -23,7 +23,7 @@ import java.util.Map;
import java.util.Set;
/**
- * Temporarily collects FunctionMetadata instances for creation of a
+ * Temporarily collects FunctionMetadata instances for creation of a
* FunctionMetadataRegistry.
*
* @author Josh Micich
diff --git a/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadata.java b/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadata.java
index 9df2db93ca..94f1659b51 100644
--- a/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadata.java
+++ b/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadata.java
@@ -17,6 +17,7 @@
package org.apache.poi.hssf.record.formula.function;
/**
+ * Holds information about Excel built-in functions.
*
* @author Josh Micich
*/
@@ -46,7 +47,7 @@ public final class FunctionMetadata {
return _maxParams;
}
public boolean hasFixedArgsLength() {
- return _minParams == _maxParams;
+ return _minParams == _maxParams;
}
public String toString() {
StringBuffer sb = new StringBuffer(64);
diff --git a/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java b/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java
index bd50bf04d5..bd72a92233 100644
--- a/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java
+++ b/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java
@@ -46,7 +46,7 @@ final class FunctionMetadataReader {
public static FunctionMetadataRegistry createRegistry() {
InputStream is = FunctionMetadataReader.class.getResourceAsStream(METADATA_FILE_NAME);
- if(is == null) {
+ if (is == null) {
throw new RuntimeException("resource '" + METADATA_FILE_NAME + "' not found");
}
diff --git a/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadataRegistry.java b/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadataRegistry.java
index 0cc8de37d6..fe243bf011 100644
--- a/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadataRegistry.java
+++ b/src/java/org/apache/poi/hssf/record/formula/function/FunctionMetadataRegistry.java
@@ -19,7 +19,11 @@ package org.apache.poi.hssf.record.formula.function;
import java.util.Map;
import java.util.Set;
-
+/**
+ * Allows clients to get FunctionMetadata instances for any built-in function of Excel.
+ *
+ * @author Josh Micich
+ */
public final class FunctionMetadataRegistry {
/**
* The name of the IF function (i.e. "IF"). Extracted as a constant for clarity.
@@ -35,7 +39,6 @@ public final class FunctionMetadataRegistry {
private static FunctionMetadataRegistry getInstance() {
if (_instance == null) {
_instance = FunctionMetadataReader.createRegistry();
-// _instance = POIFunctionMetadataCreator.createInstance();
}
return _instance;
}
diff --git a/src/java/org/apache/poi/hssf/record/formula/functions/Pmt.java b/src/java/org/apache/poi/hssf/record/formula/functions/Pmt.java
index 58628053c0..68a8d43dce 100644
--- a/src/java/org/apache/poi/hssf/record/formula/functions/Pmt.java
+++ b/src/java/org/apache/poi/hssf/record/formula/functions/Pmt.java
@@ -46,15 +46,15 @@ public final class Pmt extends FinanceFunction {
if(args.length < 3 || args.length > 5) {
return ErrorEval.VALUE_INVALID;
}
-
- try {
- // evaluate first three (always present) args
+
+ try {
+ // evaluate first three (always present) args
double rate = evalArg(args[0], srcRow, srcCol);
double nper = evalArg(args[1], srcRow, srcCol);
- double pv = evalArg(args[2], srcRow, srcCol);
+ double pv = evalArg(args[2], srcRow, srcCol);
double fv = 0;
boolean arePaymentsAtPeriodBeginning = false;
-
+
switch (args.length) {
case 5:
ValueEval ve = singleOperandNumericAsBoolean(args[4], srcRow, srcCol);
@@ -67,10 +67,10 @@ public final class Pmt extends FinanceFunction {
}
double d = FinanceLib.pmt(rate, nper, pv, fv, arePaymentsAtPeriodBeginning);
if (Double.isNaN(d)) {
- return (ValueEval) ErrorEval.VALUE_INVALID;
+ return ErrorEval.VALUE_INVALID;
}
if (Double.isInfinite(d)) {
- return (ValueEval) ErrorEval.NUM_ERROR;
+ return ErrorEval.NUM_ERROR;
}
return new NumberEval(d);
} catch (EvaluationException e) {
diff --git a/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java b/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
index 3b98aed0ae..2589aa90dd 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
+
package org.apache.poi.hssf.model;
import junit.framework.AssertionFailedError;
@@ -54,7 +54,7 @@ import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
/**
- * Test the low level formula parser functionality. High level tests are to
+ * Test the low level formula parser functionality. High level tests are to
* be done via usermodel/HSSFCell.setFormulaValue() .
* Some tests are also done in scratchpad, if they need
* HSSFFormulaEvaluator, which is there
@@ -71,7 +71,7 @@ public final class TestFormulaParser extends TestCase {
assertNotNull("Ptg array should not be null", result);
return result;
}
-
+
public void testSimpleFormula() {
FormulaParser fp = new FormulaParser("2+2",null);
fp.parse();
@@ -86,9 +86,9 @@ public final class TestFormulaParser extends TestCase {
assertTrue("",(ptgs[0] instanceof IntPtg));
assertTrue("",(ptgs[1] instanceof IntPtg));
assertTrue("",(ptgs[2] instanceof AddPtg));
-
+
}
-
+
public void testFormulaWithSpace2() {
Ptg[] ptgs;
FormulaParser fp;
@@ -97,7 +97,7 @@ public final class TestFormulaParser extends TestCase {
ptgs = fp.getRPNPtg();
assertTrue("five tokens expected, got "+ptgs.length,ptgs.length == 5);
}
-
+
public void testFormulaWithSpaceNRef() {
Ptg[] ptgs;
FormulaParser fp;
@@ -106,7 +106,7 @@ public final class TestFormulaParser extends TestCase {
ptgs = fp.getRPNPtg();
assertTrue("two tokens expected, got "+ptgs.length,ptgs.length == 2);
}
-
+
public void testFormulaWithString() {
Ptg[] ptgs;
FormulaParser fp;
@@ -172,7 +172,7 @@ public final class TestFormulaParser extends TestCase {
}
-
+
/**
* Make sure the ptgs are generated properly with two functions embedded
*
@@ -225,7 +225,7 @@ public final class TestFormulaParser extends TestCase {
assertEquals("4 Ptgs expected", 4, asts.length);
}
-
+
/**
* Bug Reported by xt-jens.riis@nokia.com (Jens Riis)
* Refers to Bug #17582
@@ -247,7 +247,7 @@ public final class TestFormulaParser extends TestCase {
}
-
+
public void testSimpleLogical() {
FormulaParser fp=new FormulaParser("IF(A1true
only when parsing the target tables */
private boolean _isInsideTable;
-
+
private final List _rowData;
private final StringBuffer _textNodeBuffer;
private final List _rowNoteFlags;
private boolean _cellHasNote;
-
+
private final FunctionDataCollector _fdc;
private String _lastHeadingText;
-
+
public EFFDocHandler(FunctionDataCollector fdc) {
_fdc = fdc;
_elemNameStack = new Stack();
@@ -216,7 +216,7 @@ public class ExcelFileFormatDocFunctionExtractor {
_textNodeBuffer = new StringBuffer();
_rowNoteFlags = new ArrayList();
}
-
+
private boolean matchesTargetPath() {
return matchesPath(0, TABLE_BASE_PATH_NAMES);
}
@@ -365,7 +365,7 @@ public class ExcelFileFormatDocFunctionExtractor {
xr.setContentHandler(new EFFDocHandler(fdc));
InputSource inSrc = new InputSource(is);
-
+
try {
xr.parse(inSrc);
is.close();
@@ -407,30 +407,30 @@ public class ExcelFileFormatDocFunctionExtractor {
}
private static void outputLicenseHeader(PrintStream ps) {
- String[] lines= {
- "Licensed to the Apache Software Foundation (ASF) under one or more",
- "contributor license agreements. See the NOTICE file distributed with",
- "this work for additional information regarding copyright ownership.",
- "The ASF licenses this file to You under the Apache License, Version 2.0",
- "(the \"License\"); you may not use this file except in compliance with",
- "the License. You may obtain a copy of the License at",
- "",
- " http://www.apache.org/licenses/LICENSE-2.0",
- "",
- "Unless required by applicable law or agreed to in writing, software",
- "distributed under the License is distributed on an \"AS IS\" BASIS,",
- "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
- "See the License for the specific language governing permissions and",
- "limitations under the License.",
- };
- for (int i = 0; i < lines.length; i++) {
- ps.print("# ");
- ps.println(lines[i]);
- }
- ps.println();
- }
-
- /**
+ String[] lines= {
+ "Licensed to the Apache Software Foundation (ASF) under one or more",
+ "contributor license agreements. See the NOTICE file distributed with",
+ "this work for additional information regarding copyright ownership.",
+ "The ASF licenses this file to You under the Apache License, Version 2.0",
+ "(the \"License\"); you may not use this file except in compliance with",
+ "the License. You may obtain a copy of the License at",
+ "",
+ " http://www.apache.org/licenses/LICENSE-2.0",
+ "",
+ "Unless required by applicable law or agreed to in writing, software",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,",
+ "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
+ "See the License for the specific language governing permissions and",
+ "limitations under the License.",
+ };
+ for (int i = 0; i < lines.length; i++) {
+ ps.print("# ");
+ ps.println(lines[i]);
+ }
+ ps.println();
+ }
+
+ /**
* Helps identify the source file
*/
private static String getFileCRC(File f) {
@@ -451,10 +451,10 @@ public class ExcelFileFormatDocFunctionExtractor {
}
return "0x" + Long.toHexString(crc.getValue()).toUpperCase();
}
-
+
private static File getSourceFile() {
- if (true) {
- File dir = new File("c:/josh/ref-docs");
+ if (false) {
+ File dir = new File("c:/temp");
File effDocFile = new File(dir, SOURCE_DOC_FILE_NAME);
return effDocFile;
}
@@ -464,7 +464,7 @@ public class ExcelFileFormatDocFunctionExtractor {
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
-
+
File result;
byte[]buf = new byte[2048];
try {
@@ -488,16 +488,15 @@ public class ExcelFileFormatDocFunctionExtractor {
System.out.println("file downloaded ok");
return result;
}
-
+
public static void main(String[] args) {
-
+
File effDocFile = getSourceFile();
if(!effDocFile.exists()) {
throw new RuntimeException("file '" + effDocFile.getAbsolutePath() + "' does not exist");
}
-
+
File outFile = new File("functionMetadata-asGenerated.txt");
processFile(effDocFile, outFile);
}
-
}
diff --git a/src/testcases/org/apache/poi/hssf/record/formula/function/TestFunctionMetadataRegistry.java b/src/testcases/org/apache/poi/hssf/record/formula/function/TestFunctionMetadataRegistry.java
index edb215ec50..c175c473bf 100644
--- a/src/testcases/org/apache/poi/hssf/record/formula/function/TestFunctionMetadataRegistry.java
+++ b/src/testcases/org/apache/poi/hssf/record/formula/function/TestFunctionMetadataRegistry.java
@@ -18,26 +18,27 @@
package org.apache.poi.hssf.record.formula.function;
import junit.framework.TestCase;
+
/**
*
* @author Josh Micich
*/
public final class TestFunctionMetadataRegistry extends TestCase {
- public void testWellKnownFunctions() {
- confirmFunction(0, "COUNT");
- confirmFunction(1, "IF");
-
- }
-
- private static void confirmFunction(int index, String funcName) {
- FunctionMetadata fm;
- fm = FunctionMetadataRegistry.getFunctionByIndex(index);
- assertNotNull(fm);
- assertEquals(funcName, fm.getName());
-
- fm = FunctionMetadataRegistry.getFunctionByName(funcName);
- assertNotNull(fm);
- assertEquals(index, fm.getIndex());
- }
+ public void testWellKnownFunctions() {
+ confirmFunction(0, "COUNT");
+ confirmFunction(1, "IF");
+
+ }
+
+ private static void confirmFunction(int index, String funcName) {
+ FunctionMetadata fm;
+ fm = FunctionMetadataRegistry.getFunctionByIndex(index);
+ assertNotNull(fm);
+ assertEquals(funcName, fm.getName());
+
+ fm = FunctionMetadataRegistry.getFunctionByName(funcName);
+ assertNotNull(fm);
+ assertEquals(index, fm.getIndex());
+ }
}
diff --git a/src/testcases/org/apache/poi/hssf/record/formula/function/TestParseMissingBuiltInFuncs.java b/src/testcases/org/apache/poi/hssf/record/formula/function/TestParseMissingBuiltInFuncs.java
index fe1b8fccc8..3671d37c1a 100644
--- a/src/testcases/org/apache/poi/hssf/record/formula/function/TestParseMissingBuiltInFuncs.java
+++ b/src/testcases/org/apache/poi/hssf/record/formula/function/TestParseMissingBuiltInFuncs.java
@@ -44,8 +44,8 @@ public final class TestParseMissingBuiltInFuncs extends TestCase {
}
AbstractFunctionPtg func = (AbstractFunctionPtg) ptgF;
if(func.getFunctionIndex() == 255) {
- throw new AssertionFailedError("Failed to recognise built-in function in formula '"
- + formula + "'");
+ throw new AssertionFailedError("Failed to recognise built-in function in formula '"
+ + formula + "'");
}
assertEquals(expPtgArraySize, ptgs.length);
diff --git a/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java b/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java
index 7e1d0317ec..f1e6bcfacf 100644
--- a/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java
+++ b/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java
@@ -48,7 +48,7 @@ public final class TestReadMissingBuiltInFuncs extends TestCase {
}
sht = wb.getSheetAt(0);
}
-
+
public void testDatedif() {
String formula;
@@ -56,9 +56,9 @@ public final class TestReadMissingBuiltInFuncs extends TestCase {
formula = getCellFormula(0);
} catch (IllegalStateException e) {
if(e.getMessage().startsWith("Too few arguments")) {
- if(e.getMessage().indexOf("AttrPtg") > 0) {
- throw afe("tAttrVolatile not supported in FormulaParser.toFormulaString");
- }
+ if(e.getMessage().indexOf("AttrPtg") > 0) {
+ throw afe("tAttrVolatile not supported in FormulaParser.toFormulaString");
+ }
throw afe("NOW() registered with 1 arg instead of 0");
}
if(e.getMessage().startsWith("too much stuff")) {
@@ -70,7 +70,7 @@ public final class TestReadMissingBuiltInFuncs extends TestCase {
assertEquals("DATEDIF(NOW(),NOW(),\"d\")", formula);
}
public void testDdb() {
-
+
String formula = getCellFormula(1);
if("externalflag(1,1,1,1,1)".equals(formula)) {
throw afe("DDB() not registered");
@@ -78,14 +78,14 @@ public final class TestReadMissingBuiltInFuncs extends TestCase {
assertEquals("DDB(1,1,1,1,1)", formula);
}
public void testAtan() {
-
+
String formula = getCellFormula(2);
if(formula.equals("ARCTAN(1)")) {
throw afe("func ix 18 registered as ARCTAN() instead of ATAN()");
}
assertEquals("ATAN(1)", formula);
}
-
+
public void testUsdollar() {
String formula = getCellFormula(3);
@@ -128,7 +128,7 @@ public final class TestReadMissingBuiltInFuncs extends TestCase {
}
assertEquals("ISNONTEXT(\"abc\")", formula);
}
-
+
private String getCellFormula(int rowIx) {
String result = sht.getRow(rowIx).getCell((short)0).getCellFormula();
if (false) {
diff --git a/src/testcases/org/apache/poi/hssf/record/formula/functions/AllIndividualFunctionEvaluationTests.java b/src/testcases/org/apache/poi/hssf/record/formula/functions/AllIndividualFunctionEvaluationTests.java
index 66d2a1d270..5973d7cb2d 100755
--- a/src/testcases/org/apache/poi/hssf/record/formula/functions/AllIndividualFunctionEvaluationTests.java
+++ b/src/testcases/org/apache/poi/hssf/record/formula/functions/AllIndividualFunctionEvaluationTests.java
@@ -27,9 +27,8 @@ import junit.framework.TestSuite;
*/
public final class AllIndividualFunctionEvaluationTests {
- // TODO - have this suite incorporated into a higher level one
public static Test suite() {
- TestSuite result = new TestSuite("Tests for org.apache.poi.hssf.record.formula.functions");
+ TestSuite result = new TestSuite(AllIndividualFunctionEvaluationTests.class.getName());
result.addTestSuite(TestAverage.class);
result.addTestSuite(TestCountFuncs.class);
result.addTestSuite(TestDate.class);
diff --git a/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java b/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java
index 935615acae..2fecef7046 100644
--- a/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java
+++ b/src/testcases/org/apache/poi/hssf/record/formula/functions/TestPmt.java
@@ -30,7 +30,7 @@ import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
* @author Josh Micich
*/
public final class TestPmt extends TestCase {
-
+
private static void confirm(double expected, NumberEval ne) {
// only asserting accuracy to 4 fractional digits
assertEquals(expected, ne.getNumberValue(), 0.00005);
@@ -61,12 +61,12 @@ public final class TestPmt extends TestCase {
confirm(expected, invokeNormal(args));
}
-
+
public void testBasic() {
confirm(-1037.0321, (0.08/12), 10, 10000, 0, false);
confirm(-1030.1643, (0.08/12), 10, 10000, 0, true);
}
-
+
public void test3args() {
Eval[] args = {