Package: matlab.unittest.constraints
Abstract interface class for tolerances
Tolerances define a notion of fuzzy equality for a set of data
types and can be plugged in to the IsEqualTo
constraint
through the 'Within'
name-value pair argument.
Classes that derive from the Tolerance
interface
class must provide a tolerance definition. Use the satisfiedBy
method
to implement the tolerance definition. Classes that derive from the Tolerance
class
also must provide a diagnostic for two compared values. The testing
framework uses the diagnostic when the compared values are outside
of the allowable tolerance. Use the getDiagnosticFor
method
to implement this condition. Finally, classes that derive from the Tolerance
class
must provide a means to determine which data types the tolerance supports.
Define the supported data types by implementing the supports
method.
getDiagnosticFor | Produce diagnostic for two values specified to be within tolerance |
satisfiedBy | Determine whether two values are within tolerance |
supports | Determine whether tolerance supports specified data type |
Value. To learn how value classes affect copy operations, see Copying Objects.