matlab.unittest.constraints.IsSameSetAs class
Package: matlab.unittest.constraints
Superclasses: matlab.unittest.constraints.BooleanConstraint
Test if set contains same elements as another set
Construction
IsSameSetAs(
creates a constraint specifying that a set contains same elements as another set. The constraint produces a qualification failure for any actual-value set that is not the same set as the expected-value set.expSet
)
Sets can have the same elements in different orders, different numbers, or different shapes. An actual value is considered the same set as the expected set if ismember(actual,expected)
and ismember(expected,actual)
both return arrays that contain all true
values and at least one of the following conditions is met:
The actual set and the expected set are of the same class.
The actual set is an object.
The expected set is an object.
Input Arguments
Properties
Copy Semantics
Value. To learn how value classes affect copy operations, see Copying Objects.
Examples
Version History
Introduced in R2018a