aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2017-02-08 07:04:55 +0000
committerJaven O'Neal <onealj@apache.org>2017-02-08 07:04:55 +0000
commit235597025298db8927b368f48b6d474e371bd869 (patch)
tree89338285acfebbe7bb5787764be1d04ae5905892 /src
parenta002b7287e84ff8d90d49218c764fb75ce4aa118 (diff)
downloadpoi-235597025298db8927b368f48b6d474e371bd869.tar.gz
poi-235597025298db8927b368f48b6d474e371bd869.zip
+svn:eol-style native
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782109 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
index 84a2dfdbca..42773aa6fb 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
@@ -415,40 +415,40 @@ public final class TestXSSFSheetShiftRows extends BaseTestSheetShiftRows {
workbook.close();
- }
-
- private static String getCellFormula(Sheet sheet, String address) {
- CellAddress cellAddress = new CellAddress(address);
- Row row = sheet.getRow(cellAddress.getRow());
- assertNotNull(row);
- Cell cell = row.getCell(cellAddress.getColumn());
- assertNotNull(cell);
- assertEquals(CellType.FORMULA, cell.getCellTypeEnum());
- return cell.getCellFormula();
- }
+ }
+
+ private static String getCellFormula(Sheet sheet, String address) {
+ CellAddress cellAddress = new CellAddress(address);
+ Row row = sheet.getRow(cellAddress.getRow());
+ assertNotNull(row);
+ Cell cell = row.getCell(cellAddress.getColumn());
+ assertNotNull(cell);
+ assertEquals(CellType.FORMULA, cell.getCellTypeEnum());
+ return cell.getCellFormula();
+ }
// This test is written as expected-to-fail and should be rewritten
// as expected-to-pass when the bug is fixed.
- @Test
- public void testSharedFormulas() throws Exception {
- XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("TestShiftRowSharedFormula.xlsx");
- XSSFSheet sheet = wb.getSheetAt(0);
- assertEquals("SUM(C2:C4)", getCellFormula(sheet, "C5"));
- assertEquals("SUM(D2:D4)", getCellFormula(sheet, "D5"));
- assertEquals("SUM(E2:E4)", getCellFormula(sheet, "E5"));
-
+ @Test
+ public void testSharedFormulas() throws Exception {
+ XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("TestShiftRowSharedFormula.xlsx");
+ XSSFSheet sheet = wb.getSheetAt(0);
+ assertEquals("SUM(C2:C4)", getCellFormula(sheet, "C5"));
+ assertEquals("SUM(D2:D4)", getCellFormula(sheet, "D5"));
+ assertEquals("SUM(E2:E4)", getCellFormula(sheet, "E5"));
+
sheet.shiftRows(3, sheet.getLastRowNum(), 1);
- // FIXME: remove try, catch, and testPassesNow, skipTest when test passes
- try {
- assertEquals("SUM(C2:C5)", getCellFormula(sheet, "C6"));
- assertEquals("SUM(D2:D5)", getCellFormula(sheet, "D6"));
+ // FIXME: remove try, catch, and testPassesNow, skipTest when test passes
+ try {
+ assertEquals("SUM(C2:C5)", getCellFormula(sheet, "C6"));
+ assertEquals("SUM(D2:D5)", getCellFormula(sheet, "D6"));
assertEquals("SUM(E2:E5)", getCellFormula(sheet, "E6"));
testPassesNow(59983);
} catch (AssertionError e) {
skipTest(e);
}
- wb.close();
+ wb.close();
}
// bug 60260: shift rows or rename a sheet containing a named range