User`s guide

12 Verifying Generated Code for a Component
12-6
6
Save the name of the harness model for use later in this example:
[~,harnessModel] = fileparts(harnessModelFilePath);
7
Leave all models open for the next part of this example.
Next, create a test case that tests values for input signals to the component.
Create and Log Test Cases
Add a test case for your component to help you get closer to achieving 100% coverage.
For this example, use the signalbuilder function to add a new test case to the Signal
Builder block in the harness model. The new test case specifies new values for the input
signals to the component:
1
Load the file that contains the data for the new test case into the MATLAB
workspace:
load('slvnvdemo_powerwindow_controller_newtestcase.mat');
The workspace variables newTestData and newTestTime contain the test-case
data.