Author: onealj
Date: Wed Feb  8 07:04:55 2017
New Revision: 1782109

URL: http://svn.apache.org/viewvc?rev=1782109&view=rev
Log:
+svn:eol-style native

Modified:
    
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
   (contents, props changed)

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java?rev=1782109&r1=1782108&r2=1782109&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
 (original)
+++ 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
 Wed Feb  8 07:04:55 2017
@@ -415,40 +415,40 @@ public final class TestXSSFSheetShiftRow
         
 
         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

Propchange: 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to