mirror of https://github.com/apache/poi.git
javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716811 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
effe60c6af
commit
109e8b4fb3
|
@ -56,6 +56,11 @@ public abstract class BaseTestBugzillaIssues {
|
|||
_testDataProvider = testDataProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlike org.junit.Assert.assertEquals(double expected, double actual, double delta),
|
||||
* where delta is an absolute error value, this function's factor is a relative error,
|
||||
* so it's easier to express "actual is within 5% of expected".
|
||||
*/
|
||||
public static void assertAlmostEquals(double expected, double actual, float factor) {
|
||||
double diff = Math.abs(expected - actual);
|
||||
double fuzz = expected * factor;
|
||||
|
|
Loading…
Reference in New Issue