aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss/formula
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcases/org/apache/poi/ss/formula')
-rw-r--r--src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java9
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java16
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestEDate.java19
3 files changed, 26 insertions, 18 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java b/src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java
index fe28f1cd23..67cbcb2f7a 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java
@@ -20,8 +20,6 @@ package org.apache.poi.ss.formula.eval;
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
-import org.apache.poi.ss.formula.ptg.AreaI;
-import org.apache.poi.ss.formula.ptg.AreaI.OffsetArea;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
import org.apache.poi.hssf.usermodel.HSSFRow;
@@ -29,6 +27,8 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.AreaReference;
import org.apache.poi.hssf.util.CellReference;
import org.apache.poi.ss.formula.TwoDEval;
+import org.apache.poi.ss.formula.ptg.AreaI;
+import org.apache.poi.ss.formula.ptg.AreaI.OffsetArea;
import org.apache.poi.ss.usermodel.CellValue;
/**
@@ -71,11 +71,10 @@ public final class TestRangeEval extends TestCase {
}
private static final class MockRefEval extends RefEvalBase {
-
public MockRefEval(int rowIndex, int columnIndex) {
- super(rowIndex, columnIndex);
+ super(-1, -1, rowIndex, columnIndex);
}
- public ValueEval getInnerValueEval() {
+ public ValueEval getInnerValueEval(int sheetIndex) {
throw new RuntimeException("not expected to be called during this test");
}
public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx,
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java b/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java
index 31d5250704..e294be59f3 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java
@@ -17,17 +17,17 @@
package org.apache.poi.ss.formula.functions;
-import org.apache.poi.ss.formula.ptg.AreaI;
-import org.apache.poi.ss.formula.ptg.AreaPtg;
-import org.apache.poi.ss.formula.ptg.Ref3DPtg;
-import org.apache.poi.ss.formula.ptg.RefPtg;
+import org.apache.poi.ss.formula.TwoDEval;
import org.apache.poi.ss.formula.eval.AreaEval;
import org.apache.poi.ss.formula.eval.AreaEvalBase;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.RefEval;
import org.apache.poi.ss.formula.eval.RefEvalBase;
import org.apache.poi.ss.formula.eval.ValueEval;
-import org.apache.poi.ss.formula.TwoDEval;
+import org.apache.poi.ss.formula.ptg.AreaI;
+import org.apache.poi.ss.formula.ptg.AreaPtg;
+import org.apache.poi.ss.formula.ptg.Ref3DPtg;
+import org.apache.poi.ss.formula.ptg.RefPtg;
/**
* Test helper class for creating mock <code>Eval</code> objects
@@ -157,14 +157,14 @@ public final class EvalFactory {
private static final class MockRefEval extends RefEvalBase {
private final ValueEval _value;
public MockRefEval(RefPtg ptg, ValueEval value) {
- super(ptg.getRow(), ptg.getColumn());
+ super(-1, -1, ptg.getRow(), ptg.getColumn());
_value = value;
}
public MockRefEval(Ref3DPtg ptg, ValueEval value) {
- super(ptg.getRow(), ptg.getColumn());
+ super(-1, -1, ptg.getRow(), ptg.getColumn());
_value = value;
}
- public ValueEval getInnerValueEval() {
+ public ValueEval getInnerValueEval(int sheetIndex) {
return _value;
}
public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx) {
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestEDate.java b/src/testcases/org/apache/poi/ss/formula/functions/TestEDate.java
index 6e337003b3..3a5d527b77 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/TestEDate.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestEDate.java
@@ -46,14 +46,23 @@ public class TestEDate extends TestCase{
throw new UnsupportedOperationException();
}
+ public ValueEval getInnerValueEval(int sheetIndex) {
+ return value;
+ }
+
+ public int getNumberOfSheets() {
+ return 1;
+ }
+ public int getFirstSheetIndex() {
+ return 0;
+ }
+ public int getLastSheetIndex() {
+ return 0;
+ }
+
public int getRow() {
throw new UnsupportedOperationException();
}
-
- public ValueEval getInnerValueEval() {
- return value;
- }
-
public int getColumn() {
throw new UnsupportedOperationException();
}