%% Compare Component Under Test Between Model and Harness
% This example shows how to compare a component under test between the main model and the test harness. Comparing the component under test can help you determine if the CUT contains unsynchronized changes.
% Check the Controller subsystem in the f14 model against the Controller subsystem in a test harness.
% 1. Load the model.

load_system('f14');

%
% 2. Create a test harness for Controller.

sltest.harness.create('f14/Controller','Name','ControllerHarness');

%
% 3. Run the comparison.

[CheckResult,CheckDetails] = sltest.harness.check('f14/Controller',...
    'ControllerHarness');

%
% 4. View the overall result.

CheckResult

%
% 5. View the details of the comparison.

CheckDetails

%

clear('CheckResult','CheckDetails');
close_system('f14',0);

% Copyright 2012 The MathWorks, Inc.