getNegativeDiagnosticFor
Class: matlab.unittest.constraints.BooleanConstraint
Package: matlab.unittest.constraints
Produce negated diagnostic for value
Description
diag = getNegativeDiagnosticFor(
analyzes the provided value constObj
,actVal
)actVal
against the constraint
constObj
and produces a
matlab.automation.diagnostics.Diagnostic
object
diag
that corresponds to the negation of
constObj
. This method is a protected method.
The diagnostics that this method produces are expressed in the negative sense of
the constraint. For example, consider a hypothetical IsTasty
constraint. When the negation of IsTasty
is used in a
qualification, the test fails if the actual value is found to be "tasty". Therefore,
getNegativeDiagnosticFor
should return the details that
describe why the value incorrectly satisfied the constraint.
Like the getDiagnosticFor
method of Constraint
,
the getNegativeDiagnosticFor
method is typically called for
qualification failures. Therefore, providing more detailed analysis after a failure
can be more efficiently handled by getNegativeDiagnosticFor
than
the satisfiedBy
method.
Input Arguments
|
|
|
Value for comparison |