This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

satisfiedBy

Class: matlab.unittest.constraints.Constraint
Package: matlab.unittest.constraints

Determine whether value satisfies constraint

Syntax

TF = satisfiedBy(constObj,actVal)

Description

TF = satisfiedBy(constObj,actVal) determines whether a value, actVal, satisfies a constraint, constObj. The satisfiedBy method is used to determine qualification success or failure. It returns true or false (logical 0 or 1). When creating a custom constraint, a class author must place comparison logic in this method.

Since the most common usage is for the passing case, the constraint author should optimize for speed in that case. It is only in the failing case that more expensive detailed analysis is helpful.

Input Arguments

actVal

Value to evaluate against the constraint

constObj

Constraint instance