java.lang.Object
com.pervasive.datarush.test.FloatingPointMismatchFilter
- All Implemented Interfaces:
AssertionsUtil.MismatchFilter
A filter for handling mismatches in floating point values.
Errors within a specified tolerance are ignored.
-
Field Summary
Fields inherited from interface com.pervasive.datarush.commons.test.AssertionsUtil.MismatchFilter
IGNORE_SORT_ORDER, NO_FILTER -
Constructor Summary
ConstructorsConstructorDescriptionFloatingPointMismatchFilter(FloatingPointTolerance tolerance, String separator) Declares a filter using the specified tolerance range. -
Method Summary
Modifier and TypeMethodDescriptionbooleanignoreMismatch(String expected, String actual) Indicates whether the specified mismatch should be ignored for comparison purposed.booleanIndicates whether the filter should ignore sort order
-
Constructor Details
-
FloatingPointMismatchFilter
Declares a filter using the specified tolerance range. The line is assumed to consist of floating point values separated by the given separator.- Parameters:
tolerance- the permitted degree of error in valuesseparator- the character sequence separating field values
-
-
Method Details
-
ignoreMismatch
Description copied from interface:AssertionsUtil.MismatchFilterIndicates whether the specified mismatch should be ignored for comparison purposed.- Specified by:
ignoreMismatchin interfaceAssertionsUtil.MismatchFilter- Parameters:
expected- the expected lineactual- the actual line found- Returns:
trueif the mismatch is not significant,falseif it is.
-
ignoreSortOrder
public boolean ignoreSortOrder()Description copied from interface:AssertionsUtil.MismatchFilterIndicates whether the filter should ignore sort order- Specified by:
ignoreSortOrderin interfaceAssertionsUtil.MismatchFilter- Returns:
- whether the filter should ignore sort order
-