%% Connecting Blocks for verify Statements
% This example model shows how to connect blocks when using verify statements or assert statements in Test Assessment or Test Sequence blocks. Block connection is important to ensure that the verify statement results correspond with the model simulation and are not affected by delays in signal data.
%
% Open the model.

model = 'prohibitSimultaneousPress';
harness1 = 'Harness1_TestSeqAndTestAssessment';
harness2 = 'Harness2_AssessWithSignalInputs';

open_system(model)

%
% The first test harness shows a Test Assessment block that activates verify statements using the active step data of a Test Sequence block.

sltest.harness.open([model '/' 'RejectPressingBothButtons'],harness1)

%

sltest.harness.close([model '/' 'RejectPressingBothButtons'],harness1)

%
% The second test harness uses Signal Builder block inputs. The Test Assessment block uses signal conditions to activate verify statements.

sltest.harness.open([model '/' 'RejectPressingBothButtons'],harness2)

%

sltest.harness.close([model '/' 'RejectPressingBothButtons'],harness2)

%

close_system(model,0)

% Copyright 2012 The MathWorks, Inc.