User`s guide
18 Coverage Collection During Simulation
18-28
• Lines 27 and 30 receive decision, condition, and MCDC coverage for their if
statements and conditions.
Each of these lines is the subject of a report that follows the listing.
The condition right1 < left2 in line 30 is highlighted in red. This means that this
condition was not tested for all of its possible outcomes during simulation. Exactly
which of the outcomes was not tested is in the report for the decision in line 30.
The following sections display the coverage for each run_intersect_test decision line.
The coverage for each line is titled with the line itself, which if clicked, opens the editor
to the designated line.
Coverage for Line 1
The coverage metrics for line 1 are part of the coverage data for the function
run_intersect_test.
The first line of every MATLAB function configured for code generation receives coverage
analysis indicative of the decision to run the function in response to a call. Coverage for
run_intersect_test indicates that it executed at least once during simulation.
Coverage for Line 6
The Decisions analyzed table indicates that the decision in line 6, if isempty(x1),
executed a total of eight times. The first time it executed, the decision evaluated to
true, enabling run_intersect_test to initialize the values of its persistent data.
The remaining seven times the decision executed, it evaluated to false. Because both
possible outcomes occurred, decision coverage is 100%.