Class: matlab.unittest.fixtures.Fixture
Package: matlab.unittest.fixtures
Determine if two fixtures of the same class are interchangeable
TF = isCompatible(f1, f2)
TF = isCompatible(
determines
if two fixtures of the same class are interchangeable. The f
1, f
2)isCompatible
method
returns either logical 1
(true
)
or logical 0
(false
).
A class that derives from Fixture
must implement the
isCompatible
method if its constructor accepts
any input arguments or is otherwise configurable. Fixture
subclasses use this method to define a notion of interchangeability of
fixtures. Two matlab.unittest.fixtures
instances of the
same class are considered to be interchangeable if the
isCompatible
method returns
true
. The test framework uses the result of
isCompatible
to determine whether two fixture
instances of the same class correspond to the same shared test fixture
state. The test framework always calls the isCompatible
method with two fixture instances of the same class, so the fixture author
does not need to implement code to handle the case where the second fixture
is a different fixtures
class.
|
|