diff options
author | PJ Fanning <fanningpj@apache.org> | 2024-07-06 20:17:22 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2024-07-06 20:17:22 +0000 |
commit | d090c6b77ab8162b6cd2fcd7f57b67e694a53c68 (patch) | |
tree | 79a275361ce26246ee1de6d32aa0ff55b908a947 /poi-ooxml | |
parent | 750657064a894d863d5167084ed642920aab91b0 (diff) | |
download | poi-d090c6b77ab8162b6cd2fcd7f57b67e694a53c68.tar.gz poi-d090c6b77ab8162b6cd2fcd7f57b67e694a53c68.zip |
update TestXSSFSheetShiftRows
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918978 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r-- | poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java index dd87c6577d..37ea899237 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java @@ -539,12 +539,17 @@ public final class TestXSSFSheetShiftRows extends BaseTestSheetShiftRows { } final int firstCol = 1; final int secondCol = firstCol + 1; + final int thirdCol = secondCol + 1; sheet.addMergedRegion(new CellRangeAddress(0, 0, firstCol, secondCol)); sheet.addMergedRegion(new CellRangeAddress(1, 2, firstCol, firstCol)); - sheet.addMergedRegion(new CellRangeAddress(3, 3, firstCol, secondCol)); + sheet.addMergedRegion(new CellRangeAddress(3, 3, secondCol, thirdCol)); assertEquals(3, sheet.getNumMergedRegions()); sheet.shiftColumns(2, 5, -1); - // assertEquals(2, sheet.getNumMergedRegions()); + // only the 3rd merged region should remain + assertEquals(1, sheet.getNumMergedRegions()); + CellRangeAddress mr = sheet.getMergedRegion(0); + CellRangeAddress expectedMR = new CellRangeAddress(3, 3, secondCol - 1, thirdCol - 1); + assertEquals(expectedMR, mr); } } } |