Main Content

matlab.unittest.FunctionTestCase Class

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 the matlab.unittest.FunctionTestCase class derives from the matlab.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.

Class Attributes

Sealed
true

For information on class attributes, see Class Attributes.

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

expand all

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