matlabtest.baselines.MATFileBaseline - Representation of baseline data stored in MAT file - MATLAB (original) (raw)
Main Content
Namespace: matlabtest.baselines
Representation of baseline data stored in MAT file
Since R2024b
Description
The matlabtest.baselines.MATFileBaseline
class represents the baseline data stored in a MAT file for baseline testing. For more information about baseline tests, see Create Baseline Tests for MATLAB Code.
You cannot create an object of the matlabtest.baselines.MATFileBaseline
class directly. The testing frameworks automatically instantiates the MATFileBaseline
class for baseline parameters created using the matlabtest.parameters.matfileBaseline function. For example, in theExampleTest
class, the framework passes a MATFileBaseline
object to the verifyEqualsBaseline qualification method.
classdef ExampleTest < matlab.unittest.TestCase
properties (TestParameter)
baseline = matlabtest.parameters.matfileBaseline("testdata.mat")
end
methods (Test)
function baselineTest(testCase,baseline)
actual = magic(5);
testCase.verifyEqualsBaseline(actual,baseline)
end
end
end
The matlabtest.baselines.MATFileBaseline
class is a handle class.
Properties
Absolute path to the MAT file for baseline data, returned as a string scalar.
Example: "C:\work\myFile.mat"
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
Name of the variable that stores the baseline data in a MAT file, returned as a string scalar.
Example: "myVar"
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
Version History
Introduced in R2024b