// How close the sizing should be, given that not all
// systems will have quite the same fonts on them
- int fontAccuracy = 25;
+ float fontAccuracy = 0.15f;
// x%
CellStyle iPercent = wb.createCellStyle();
}
for (int i=0; i<12; i++) {
s.autoSizeColumn(i);
- System.out.println(i + " => " + s.getColumnWidth(i));
}
// Check the 0(.00)% ones
_testDataProvider = testDataProvider;
}
- public static void assertAlmostEquals(double expected, double actual, double fuzz) {
+ public static void assertAlmostEquals(double expected, double actual, float factor) {
double diff = Math.abs(expected - actual);
+ double fuzz = expected * factor;
if (diff > fuzz)
fail(actual + " not within " + fuzz + " of " + expected);
}