diff options
author | David North <dnorth@apache.org> | 2015-06-12 15:29:20 +0000 |
---|---|---|
committer | David North <dnorth@apache.org> | 2015-06-12 15:29:20 +0000 |
commit | 76998bc75c9965cad0af3e79b3082945bb5fbd14 (patch) | |
tree | 4455b10c19564fc340fc967ff5861f555f36d6ab /src/testcases | |
parent | 26dda73341d98dfec6026c72666640003832dcb1 (diff) | |
download | poi-76998bc75c9965cad0af3e79b3082945bb5fbd14.tar.gz poi-76998bc75c9965cad0af3e79b3082945bb5fbd14.zip |
Add explicit test for NPE only caught by other tests. Test '97 fallback behaviour generally.
https://bz.apache.org/bugzilla/show_bug.cgi?id=56328
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1685104 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r-- | src/testcases/org/apache/poi/ss/util/TestAreaReference.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/util/TestAreaReference.java b/src/testcases/org/apache/poi/ss/util/TestAreaReference.java index 43158038b1..525abc9891 100644 --- a/src/testcases/org/apache/poi/ss/util/TestAreaReference.java +++ b/src/testcases/org/apache/poi/ss/util/TestAreaReference.java @@ -47,4 +47,9 @@ public class TestAreaReference extends TestCase { assertEquals(1, newStyle.getLastCell().getRow()); } + @SuppressWarnings("deprecation") // deliberate test for behaviour if deprecated constructor used. + public void testFallbackToExcel97IfVersionNotSupplied() { + assertTrue(new AreaReference("A:B").isWholeColumnReference()); + assertTrue(AreaReference.isWholeColumnReference(null, new CellReference("A$1"), new CellReference("A$" + SpreadsheetVersion.EXCEL97.getMaxRows()))); + } } |