diff options
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/util')
3 files changed, 3 insertions, 48 deletions
diff --git a/src/testcases/org/apache/poi/hssf/util/AllHSSFUtilTests.java b/src/testcases/org/apache/poi/hssf/util/AllHSSFUtilTests.java index 45c96e6c42..d38b7306f8 100755 --- a/src/testcases/org/apache/poi/hssf/util/AllHSSFUtilTests.java +++ b/src/testcases/org/apache/poi/hssf/util/AllHSSFUtilTests.java @@ -32,7 +32,6 @@ public class AllHSSFUtilTests { result.addTestSuite(TestAreaReference.class); result.addTestSuite(TestCellReference.class); result.addTestSuite(TestHSSFColor.class); - result.addTestSuite(TestRangeAddress.class); result.addTestSuite(TestRKUtil.class); return result; } diff --git a/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java b/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java index f19aa0ca4d..2de4c9c1ca 100644 --- a/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java +++ b/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java @@ -23,6 +23,7 @@ import java.io.InputStream; import junit.framework.TestCase; import org.apache.poi.hssf.HSSFTestDataSamples; +import org.apache.poi.hssf.model.HSSFFormulaParser; import org.apache.poi.hssf.model.Workbook; import org.apache.poi.hssf.record.NameRecord; import org.apache.poi.hssf.record.formula.Area3DPtg; @@ -107,6 +108,7 @@ public final class TestAreaReference extends TestCase { TestCellReference.confirmCell(allCells[2], "Tabelle1", 6, 1, true, true, "Tabelle1!$B$7"); } + // TODO - remove this sub-class private static final class HSSFWB extends HSSFWorkbook { public HSSFWB(InputStream in) throws IOException { super(in); @@ -220,7 +222,7 @@ public final class TestAreaReference extends TestCase { assertEquals(refB, ptgC.toFormulaString(eb)); assertEquals(",", ptgD.toFormulaString()); - assertEquals(ref, nr.getAreaReference(wb)); + assertEquals(ref, HSSFFormulaParser.toFormulaString(wb, nr.getNameDefinition())); // Check the high level definition int idx = wb.getNameIndex("test"); diff --git a/src/testcases/org/apache/poi/hssf/util/TestRangeAddress.java b/src/testcases/org/apache/poi/hssf/util/TestRangeAddress.java deleted file mode 100755 index 6154173e71..0000000000 --- a/src/testcases/org/apache/poi/hssf/util/TestRangeAddress.java +++ /dev/null @@ -1,46 +0,0 @@ - -/* ==================================================================== - 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. -==================================================================== */ - - -package org.apache.poi.hssf.util; - -import junit.framework.TestCase; - -/** - * Tests the Range Address Utility Functionality - * @author Danny Mui (danny at muibros.com) - */ -public class TestRangeAddress extends TestCase { - public TestRangeAddress(String s) { - super(s); - } - - public static void main(java.lang.String[] args) { - junit.textui.TestRunner.run(TestRangeAddress.class); - } - - - - public void testReferenceParse() { - String reference = "Sheet2!$A$1:$C$3"; - RangeAddress ra = new RangeAddress(reference); - - assertEquals("Sheet2!A1:C3", ra.getAddress()); - - } -} |