Two different Decision Coverage results for the same line of code inside of a Stateflow State

1 view (last 30 days)
I am analyzing coverage for a model containing a Stateflow chart. The Decision Coverage analysis shows two coverage results for each IF-statement inside of a Stateflow State.
If it is a single decision, why would there be two separate results?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Aug 2022
The separate results for a single line of code indicate that the code is being run both for the "Entry" and "During" actions of the Stateflow State. When contents of a State are not explicitly defined to be "Entry" or "During" actions, Stateflow treats the contents as both an "Entry" and a "During" action. As a line of code containing a decision point is reused in both the "Entry" and "During" actions, there are separate decision objectives for each action. The first two lines will indicate the coverage for "Entry" actions and the other two for "During" actions.

More Answers (0)

Categories

Find more on Stateflow in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!