Class FloatingPointAssertionWithinEpsilon

java.lang.Object
com.google.errorprone.bugpatterns.BugChecker
com.google.errorprone.bugpatterns.FloatingPointAssertionWithinEpsilon
All Implemented Interfaces:
BugChecker.MethodInvocationTreeMatcher, Suppressible, Serializable

public final class FloatingPointAssertionWithinEpsilon extends BugChecker implements BugChecker.MethodInvocationTreeMatcher
Detects usages of Float,DoubleSubject.isWithin(TOLERANCE).of(EXPECTED) where there are no other floating point values other than EXPECTED with satisfy the assertion, but TOLERANCE is not zero. Likewise for older-style JUnit assertions (assertEquals(double, double, double)).
Author:
ghm@google.com (Graeme Morgan)
See Also: