You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/01/23 10:34:56 UTC
svn commit: r1885842 -
/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java
Author: kiwiwings
Date: Sat Jan 23 10:34:56 2021
New Revision: 1885842
URL: http://svn.apache.org/viewvc?rev=1885842&view=rev
Log:
try to fix font-based issues
Modified:
poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java?rev=1885842&r1=1885841&r2=1885842&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java Sat Jan 23 10:34:56 2021
@@ -305,19 +305,23 @@ public abstract class BaseTestSheetAutos
// This should work fine
sheet.autoSizeColumn(0);
- assertEquals(isHssf ? 3645 : 3545, sheet.getColumnWidth(0));
+ int colWidth1 = sheet.getColumnWidth(0);
// Get close to 32767
Row r32765 = sheet.createRow(32765);
r32765.createCell(0).setCellValue("Nearly there...");
sheet.autoSizeColumn(0);
- assertEquals(isHssf ? 3645 : 3554, sheet.getColumnWidth(0), 2);
+ int colWidth2 = sheet.getColumnWidth(0);
+ assertTrue(colWidth1 <= colWidth2);
+ colWidth1 = colWidth2;
// To it
Row r32767 = sheet.createRow(32767);
r32767.createCell(0).setCellValue("At the boundary");
sheet.autoSizeColumn(0);
- assertEquals(isHssf ? 3875 : 4001, sheet.getColumnWidth(0));
+ colWidth2 = sheet.getColumnWidth(0);
+ assertTrue(colWidth1 <= colWidth2);
+ colWidth1 = colWidth2;
// And passed it
Row r32768 = sheet.createRow(32768);
@@ -325,14 +329,16 @@ public abstract class BaseTestSheetAutos
Row r32769 = sheet.createRow(32769);
r32769.createCell(0).setCellValue("More Passed");
sheet.autoSizeColumn(0);
- assertEquals(isHssf ? 3875 : 4001, sheet.getColumnWidth(0));
+ colWidth2 = sheet.getColumnWidth(0);
+ assertTrue(colWidth1 <= colWidth2);
+ colWidth1 = colWidth2;
// Long way passed
Row r60708 = sheet.createRow(60708);
r60708.createCell(0).setCellValue("Near the end");
sheet.autoSizeColumn(0);
- assertEquals(isHssf ? 3875 : 4001, sheet.getColumnWidth(0));
-
+ colWidth2 = sheet.getColumnWidth(0);
+ assertTrue(colWidth1 <= colWidth2);
}
}
@@ -368,7 +374,7 @@ public abstract class BaseTestSheetAutos
cell.setCellStyle(csDateTime);
sheet.autoSizeColumn(0);
- assertEquals(isHssf ? 3249 : 3262, sheet.getColumnWidth(0));
+ assertTrue(sheet.getColumnWidth(0) > 2500);
}
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org