]> source.dussan.org Git - poi.git/commitdiff
+svn:eol-style native
authorJaven O'Neal <onealj@apache.org>
Wed, 8 Feb 2017 07:04:55 +0000 (07:04 +0000)
committerJaven O'Neal <onealj@apache.org>
Wed, 8 Feb 2017 07:04:55 +0000 (07:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782109 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java

index 84a2dfdbcaa0c749090aab96993270bd53008522..42773aa6fb8938328cf413dfaed517ebf93e09ab 100644 (file)
@@ -415,40 +415,40 @@ public final class TestXSSFSheetShiftRows extends BaseTestSheetShiftRows {
         
 
         workbook.close();
-    }\r
-\r
-    private static String getCellFormula(Sheet sheet, String address) {\r
-        CellAddress cellAddress = new CellAddress(address);\r
-        Row row = sheet.getRow(cellAddress.getRow());\r
-        assertNotNull(row);\r
-        Cell cell = row.getCell(cellAddress.getColumn());\r
-        assertNotNull(cell);\r
-        assertEquals(CellType.FORMULA, cell.getCellTypeEnum());\r
-        return cell.getCellFormula();\r
-    }\r
+    }
+
+    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\r
-    public void testSharedFormulas() throws Exception {\r
-        XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("TestShiftRowSharedFormula.xlsx");\r
-        XSSFSheet sheet = wb.getSheetAt(0);\r
-        assertEquals("SUM(C2:C4)", getCellFormula(sheet, "C5"));\r
-        assertEquals("SUM(D2:D4)", getCellFormula(sheet, "D5"));\r
-        assertEquals("SUM(E2:E4)", getCellFormula(sheet, "E5"));\r
-\r
+    @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\r
-        try {\r
-            assertEquals("SUM(C2:C5)", getCellFormula(sheet, "C6"));\r
-            assertEquals("SUM(D2:D5)", getCellFormula(sheet, "D6"));\r
+        // 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();\r
+        wb.close();
     }
     
     // bug 60260: shift rows or rename a sheet containing a named range