You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by jh...@apache.org on 2006/08/28 02:31:37 UTC
svn commit: r437486 - in
/jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula:
eval/GenericFormulaTestCase.java eval/TestEverything.java
functions/TestEverything.java
Author: jheight
Date: Sun Aug 27 17:31:36 2006
New Revision: 437486
URL: http://svn.apache.org/viewvc?rev=437486&view=rev
Log:
Hopefully fixed scratchpad test org.apache.poi.hssf/record/formula/functions/TestEverything.java from running out of memory and killing gump
Modified:
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/GenericFormulaTestCase.java
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/TestEverything.java
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/functions/TestEverything.java
Modified: jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/GenericFormulaTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/GenericFormulaTestCase.java?rev=437486&r1=437485&r2=437486&view=diff
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/GenericFormulaTestCase.java (original)
+++ jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/GenericFormulaTestCase.java Sun Aug 27 17:31:36 2006
@@ -23,9 +23,9 @@
*/
public class GenericFormulaTestCase extends TestCase {
- protected final String FILENAME = System.getProperty("HSSF.testdata.path")+ "/FormulaEvalTestData.xls";
+ protected final static String FILENAME = System.getProperty("HSSF.testdata.path")+ "/FormulaEvalTestData.xls";
- protected HSSFWorkbook workbook = null;
+ protected static HSSFWorkbook workbook = null;
protected CellReference beginCell;
protected int getBeginRow() {
@@ -36,7 +36,7 @@
return beginCell.getCol();
}
- protected static final HSSFCell getExpectedValueCell(HSSFSheet sheet, HSSFRow row, HSSFCell cell) {
+ protected final HSSFCell getExpectedValueCell(HSSFSheet sheet, HSSFRow row, HSSFCell cell) {
HSSFCell retval = null;
if (sheet != null) {
row = sheet.getRow(row.getRowNum()+1);
@@ -89,15 +89,17 @@
}
}
- public GenericFormulaTestCase(String beginCell) {
- super("genericTest");
+ public GenericFormulaTestCase(String beginCell) throws Exception {
+ super("genericTest");
+ if (workbook == null) {
+ FileInputStream fin = new FileInputStream( FILENAME );
+ workbook = new HSSFWorkbook( fin );
+ fin.close();
+ }
this.beginCell = new CellReference(beginCell);
}
- public void setUp() throws Exception {
- FileInputStream fin = new FileInputStream( FILENAME );
- workbook = new HSSFWorkbook( fin );
- fin.close();
+ public void setUp() {
}
public void genericTest() throws Exception {
Modified: jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/TestEverything.java
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/TestEverything.java?rev=437486&r1=437485&r2=437486&view=diff
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/TestEverything.java (original)
+++ jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/TestEverything.java Sun Aug 27 17:31:36 2006
@@ -12,7 +12,7 @@
*/
public class TestEverything extends TestSuite {
- public static TestSuite suite() {
+ public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite("Tests for OperationEval concrete implementation classes.");
suite.addTest(new GenericFormulaTestCase("D23"));
suite.addTest(new GenericFormulaTestCase("D27"));
Modified: jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/functions/TestEverything.java
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/functions/TestEverything.java?rev=437486&r1=437485&r2=437486&view=diff
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/functions/TestEverything.java (original)
+++ jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/record/formula/functions/TestEverything.java Sun Aug 27 17:31:36 2006
@@ -14,7 +14,7 @@
*/
public class TestEverything extends TestSuite {
- public static TestSuite suite() {
+ public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite("Tests for individual function classes");
String s;
for(int i=80; i<1481;i=i+4) {
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/