matlab.unittest.constraints.IsSubsetOf Class
Namespace: matlab.unittest.constraints
Superclasses: matlab.unittest.constraints.BooleanConstraint
Test if set is subset of specified set
Description
The matlab.unittest.constraints.IsSubsetOf
class provides a constraint to
test if a set is a subset of another set.
The constraint uses the ismember
function to compare sets. So, the
actual and expected values you use with the constraint must be supported by the
ismember
function.
Creation
Description
c = matlab.unittest.constraints.IsSubsetOf(superset)
creates a constraint to test if a set is a subset of the specified superset and sets the
Superset
property. For an actual set actual
,
the constraint is satisfied if ismember(actual,superset)
returns an
array that contains all true
values and at least one of these
conditions is met:
actual
andsuperset
are of the same class.isobject(actual)
returnstrue
.isobject(superset)
returnstrue
.
Properties
Examples
Version History
Introduced in R2016a