Class: matlab.unittest.constraints.BooleanConstraint
Package: matlab.unittest.constraints
Produce negated diagnostic for value
diag = getNegativeDiagnosticFor(constObj, actVal)
diag = getNegativeDiagnosticFor(
produces
a negated diagnostic for a value. The constObj
, actVal
)getNegativeDiagnosticFor
method
analyzes the provided value, actVal
, against the
constraint, constObj
, and produces a matlab.unittest.diagnostics.Diagnostic
object, diag
,
which corresponds to the negation of the constraint, constObj
.
This method is a protected method.
The diagnostics that this method produces are expressed in the
negative sense of the constraint. For example, a hypothetical IsTasty
constraint,
when negated, should express that the actual value was "tasty", when
it should not have been, and it should describe the details on why
it was found to be tasty.
Like the getDiagnosticFor
method of Constraint
,
the getNegativeDiagnosticFor
is only called upon
failures, and thus can afford a more detailed analysis than the satisfiedBy
method.
|
|
|
Value for comparison |