poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1588595 - in /poi/trunk/src/testcases/org/apache/poi: hssf/usermodel/TestBugs.java ss/usermodel/BaseTestBugzillaIssues.java
Date Fri, 18 Apr 2014 23:44:09 GMT
Author: nick
Date: Fri Apr 18 23:44:08 2014
New Revision: 1588595

URL: http://svn.apache.org/r1588595
Log:
Tweak 'assertAlmostEquals' bast on Jenkins results

Modified:
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=1588595&r1=1588594&r2=1588595&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Fri Apr 18 23:44:08
2014
@@ -2493,7 +2493,7 @@ public final class TestBugs extends Base
         
         // 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 Base
         }
         for (int i=0; i<12; i++) {
             s.autoSizeColumn(i);
-            System.out.println(i + " => " + s.getColumnWidth(i));
         }
         
         // Check the 0(.00)% ones

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java?rev=1588595&r1=1588594&r2=1588595&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java Fri Apr
18 23:44:08 2014
@@ -40,8 +40,9 @@ public abstract class BaseTestBugzillaIs
         _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);
     }



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


Mime
View raw message