aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2015-07-17 08:42:10 +0000
committerDominik Stadler <centic@apache.org>2015-07-17 08:42:10 +0000
commit6e05e13ca7be29ab8630d96950f5f54c2e9749bc (patch)
tree498b36bd40a774ea6636d3be49ed05a9fefa95a3 /src/testcases/org/apache/poi/ss
parent5590c5bcad97e393cc6bad0e5987f2f5dd80dcb2 (diff)
downloadpoi-6e05e13ca7be29ab8630d96950f5f54c2e9749bc.tar.gz
poi-6e05e13ca7be29ab8630d96950f5f54c2e9749bc.zip
One more try to find out why autosize fails on the freebsd CI machine
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691495 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss')
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
index e1b1a0b68c..69cf0523ef 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
@@ -354,15 +354,25 @@ public abstract class BaseTestBugzillaIssues {
cell0.setCellValue(longValue);
- sheet.autoSizeColumn(0);
-
// autoSize will fail if required fonts are not installed, skip this test then
Font font = wb.getFontAt(cell0.getCellStyle().getFontIndex());
Assume.assumeTrue("Cannot verify auoSizeColumn() because the necessary Fonts are not installed on this machine: " + font,
SheetUtil.canComputeColumnWidht(font));
- double width = SheetUtil.getCellWidth(cell0, 8, null, false);
- assertTrue("Expected to have cell width > 0 after auto-size, but had " + width, width > 0);
+ assertEquals("Expecting no indentation in this test",
+ 0, cell0.getCellStyle().getIndention());
+
+ double width = SheetUtil.getColumnWidth(sheet, 0, false);
+ assertTrue("Expected to have column width > 0 BEFORE auto-size, but had " + width, width > 0);
+ width = SheetUtil.getCellWidth(cell0, 8, null, false);
+ assertTrue("Expected to have cell width > 0 BEFORE auto-size, but had " + width, width > 0);
+
+ sheet.autoSizeColumn(0);
+
+ width = SheetUtil.getColumnWidth(sheet, 0, false);
+ assertTrue("Expected to have column width > 0 AFTER auto-size, but had " + width, width > 0);
+ width = SheetUtil.getCellWidth(cell0, 8, null, false);
+ assertTrue("Expected to have cell width > 0 AFTER auto-size, but had " + width, width > 0);
assertEquals(255*256, sheet.getColumnWidth(0)); // maximum column width is 255 characters
sheet.setColumnWidth(0, sheet.getColumnWidth(0)); // Bug 506819 reports exception at this point