aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2009-12-27 16:46:38 +0000
committerNick Burch <nick@apache.org>2009-12-27 16:46:38 +0000
commitbc6f208d7919eb61dbf9933f40a3f6e01589f5b1 (patch)
treee3bf840c268186dd2a5769c12e652cca06b50f4f /src/testcases
parent0e9861932ae265f44c61d9a767d070941b5b6eb6 (diff)
downloadpoi-bc6f208d7919eb61dbf9933f40a3f6e01589f5b1.tar.gz
poi-bc6f208d7919eb61dbf9933f40a3f6e01589f5b1.zip
Looks like we already had Ref8U but with a different name... Switch to using CellRangeAddress instead!
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@894078 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r--src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java (renamed from src/testcases/org/apache/poi/hssf/record/common/TestRef8U.java)19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/testcases/org/apache/poi/hssf/record/common/TestRef8U.java b/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java
index 41e90a8354..a2dff595c5 100644
--- a/src/testcases/org/apache/poi/hssf/record/common/TestRef8U.java
+++ b/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java
@@ -15,16 +15,17 @@ See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-package org.apache.poi.hssf.record.common;
+package org.apache.poi.ss.util;
import java.io.ByteArrayOutputStream;
import org.apache.poi.hssf.record.TestcaseRecordInputStream;
+import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.util.LittleEndianOutputStream;
import junit.framework.TestCase;
-public final class TestRef8U extends TestCase {
+public final class TestCellRangeAddress extends TestCase {
byte[] data = new byte[] {
(byte)0x02,(byte)0x00,
(byte)0x04,(byte)0x00,
@@ -33,20 +34,20 @@ public final class TestRef8U extends TestCase {
};
public void testLoad() {
- Ref8U ref = new Ref8U(
+ CellRangeAddress ref = new CellRangeAddress(
TestcaseRecordInputStream.create(0x000, data)
);
assertEquals(2, ref.getFirstRow());
assertEquals(4, ref.getLastRow());
- assertEquals(0, ref.getFirstCol());
- assertEquals(3, ref.getLastCol());
+ assertEquals(0, ref.getFirstColumn());
+ assertEquals(3, ref.getLastColumn());
- assertEquals( 8, Ref8U.getDataSize() );
+ assertEquals( 8, CellRangeAddress.ENCODED_SIZE );
}
public void testStore()
{
- Ref8U ref = new Ref8U();
+ CellRangeAddress ref = new CellRangeAddress(0,0,0,0);
byte[] recordBytes;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -63,8 +64,8 @@ public final class TestRef8U extends TestCase {
// Now set the flags
ref.setFirstRow((short)2);
ref.setLastRow((short)4);
- ref.setFirstCol((short)0);
- ref.setLastCol((short)3);
+ ref.setFirstColumn((short)0);
+ ref.setLastColumn((short)3);
// Re-test
baos.reset();