aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf/usermodel
diff options
context:
space:
mode:
authorDavid North <dnorth@apache.org>2015-09-23 12:53:13 +0000
committerDavid North <dnorth@apache.org>2015-09-23 12:53:13 +0000
commit11f188778460fa0d051134d667bed26da2eba8c1 (patch)
treeb4fd2af0cb0fa02c5a85272895585d46b004d5a3 /src/testcases/org/apache/poi/hssf/usermodel
parent303cf2a8ed40040e2668ca71416448a09358424b (diff)
downloadpoi-11f188778460fa0d051134d667bed26da2eba8c1.tar.gz
poi-11f188778460fa0d051134d667bed26da2eba8c1.zip
Make XSSF and HSSF consistent in getMergedRegions - return empty list if there are none, rather than an exception. Tests for this.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58350 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1704839 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
index 4b7d8491be..723bf0d3e9 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
@@ -657,6 +657,13 @@ public final class TestHSSFSheet extends BaseTestSheet {
assertTrue(sheet3.getColumnWidth(0) >= minWithRow1And2);
assertTrue(sheet3.getColumnWidth(0) <= maxWithRow1And2);
}
+
+ @Test
+ public void testNoMergedRegionsIsEmptyList() {
+ HSSFWorkbook wb = new HSSFWorkbook();
+ HSSFSheet s = wb.createSheet("Sheet1");
+ assertTrue(s.getMergedRegions().isEmpty());
+ }
@Test
public void autoSizeDate() throws Exception {