poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r690721 - /poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java
Date Sun, 31 Aug 2008 16:27:37 GMT
Author: josh
Date: Sun Aug 31 09:27:35 2008
New Revision: 690721

URL: http://svn.apache.org/viewvc?rev=690721&view=rev
Log:
Added junit to show bug 45717 is fixed. (Previously fixed by either of r683758, r683871)

Modified:
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java?rev=690721&r1=690720&r2=690721&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java Sun Aug 31 09:27:35 2008
@@ -557,5 +557,23 @@
         }
         assertEquals("Informations", cell.getRichStringCellValue().getString());
     }
+    /**
+     * In 3.1, setting margins between creating first row and first cell caused an exception.
+     */
+    public void testSetMargins_bug45717() {
+        HSSFWorkbook workbook = new HSSFWorkbook();
+        HSSFSheet sheet = workbook.createSheet("Vorschauliste");
+        HSSFRow row = sheet.createRow(0);
+
+        sheet.setMargin(HSSFSheet.LeftMargin, 0.3);
+        try {
+            row.createCell((short) 0);
+        } catch (IllegalStateException e) {
+            if (e.getMessage().equals("Cannot create value records before row records exist"))
{
+                throw new AssertionFailedError("Identified bug 45717");
+            }
+            throw e;
+        }
+    }
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message