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
This commit is contained in:
David North 2015-06-12 15:29:20 +00:00
parent 16a9eca7c8
commit 369c593380

View 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())));
}
}