diff options
author | Nick Burch <nick@apache.org> | 2014-04-18 23:44:08 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2014-04-18 23:44:08 +0000 |
commit | 740c46ef8451accdbbe035c968414d2d1ae71377 (patch) | |
tree | 34e443aa67c9347a7fbe232ebbfc5182e829b01a /src | |
parent | a0c17162601a956d5efb683ca3375ab52b22b55c (diff) | |
download | poi-740c46ef8451accdbbe035c968414d2d1ae71377.tar.gz poi-740c46ef8451accdbbe035c968414d2d1ae71377.zip |
Tweak 'assertAlmostEquals' bast on Jenkins results
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1588595 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java | 3 | ||||
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index a4bd4a5cf3..6df39bbe29 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -2493,7 +2493,7 @@ public final class TestBugs extends BaseTestBugzillaIssues { // 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(); @@ -2527,7 +2527,6 @@ public final class TestBugs extends BaseTestBugzillaIssues { } for (int i=0; i<12; i++) { s.autoSizeColumn(i); - System.out.println(i + " => " + s.getColumnWidth(i)); } // Check the 0(.00)% ones diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java index 9083b7048f..bc80b64fa9 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java @@ -40,8 +40,9 @@ public abstract class BaseTestBugzillaIssues { _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); } |