isCompatible
Class: matlab.unittest.fixtures.Fixture
Namespace: matlab.unittest.fixtures
Determine if two fixtures are compatible
Description
tf = isCompatible(
reports the compatibility of two fixtures to the testing framework. If the fixtures are
compatible, the method returns logical fixture
1,fixture
2)1
(true
).
Otherwise, it returns logical 0
(false
). Two fixtures
are compatible if they are of the same class and if they make the same changes to the
environment.
Implement the isCompatible
method in your Fixture
subclass if the fixture is configurable (for example, if its class constructor accepts input
arguments). The framework calls isCompatible
to determine whether instances
of the same Fixture
subclass correspond to the same shared test fixture
state. The information about fixture compatibility helps the framework decide when to
perform teardown and setup actions. The framework calls the isCompatible
method only with two instances of the same class, so you are not required to implement code
to handle the case where the fixtures are of different classes.
Input Arguments
Examples
Version History
Introduced in R2014a