matlab.unittest.FunctionTestCase - Test case for function-based tests - MATLAB (original) (raw)
Main Content
Namespace: matlab.unittest
Superclasses: matlab.unittest.TestCase
Test case for function-based tests
Description
The matlab.unittest.FunctionTestCase
class lets you write function-based tests using the unit testing framework. Because thematlab.unittest.FunctionTestCase
class derives from thematlab.unittest.TestCase
class, you can write your tests using qualification functions in the matlab.unittest.qualifications namespace.
The matlab.unittest.FunctionTestCase
class is a handle class.
Creation
To create FunctionTestCase
objects, call the functiontests function in the main function of your test file. For each test function, the testing framework creates a FunctionTestCase
object and passes it to the test function.
Properties
Test data to pass from setup functions to test or teardown functions in function-based tests, specified as a value of any data type. By default, the value is a scalar structure with no fields. You can add fields to this structure. For an example that uses the TestData
property, see Write Test Using Setup and Teardown Functions.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Version History
Introduced in R2013b