]> source.dussan.org Git - poi.git/commitdiff
Add explicit test for NPE only caught by other tests. Test '97 fallback behaviour...
authorDavid North <dnorth@apache.org>
Fri, 12 Jun 2015 15:29:20 +0000 (15:29 +0000)
committerDavid North <dnorth@apache.org>
Fri, 12 Jun 2015 15:29:20 +0000 (15:29 +0000)
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

src/testcases/org/apache/poi/ss/util/TestAreaReference.java

index 43158038b17303852670ff8812214749d38a23f1..525abc9891c9e2e6cc08b5224eb7d427eb5e883f 100644 (file)
@@ -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())));
+    }
 }