Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Code coverage
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Modified condition/decision coverage === {{Main|Modified condition/decision coverage}} A combination of function coverage and branch coverage is sometimes also called '''decision coverage'''. This criterion requires that every [[Entry and exit points|point of entry and exit]] in the program has been invoked at least once, and every decision in the program has taken on all possible outcomes at least once. In this context, the decision is a [[Boolean expression]] comprising conditions and zero or more Boolean operators. This definition is not the same as branch coverage,<ref name ="Position Paper CAST10">Position Paper CAST-10 (June 2002). ''[http://www.faa.gov/aircraft/air_cert/design_approvals/air_software/cast/cast_papers/media/cast-10.pdf What is a "Decision" in Application of Modified Condition/Decision Coverage (MC/DC) and Decision Coverage (DC)?]''</ref> however, the term ''decision coverage'' is sometimes used as a synonym for it.<ref name="mathworks">MathWorks. ''[http://www.mathworks.com/help/slvnv/ug/types-of-model-coverage.html Types of Model Coverage.]''</ref> '''Condition/decision coverage''' requires that both decision and condition coverage be satisfied. However, for [[safety-critical]] applications (such as [[avionics software]]) it is often required that '''modified condition/decision coverage (MC/DC)''' be satisfied. This criterion extends condition/decision criteria with requirements that each condition should affect the decision outcome independently. For example, consider the following code: <syntaxhighlight lang="pascal"> if (a or b) and c then </syntaxhighlight> The condition/decision criteria will be satisfied by the following set of tests: {| class="wikitable" |- ! a || b || c |- | true || true || true |- | false || false || false |} However, the above tests set will not satisfy modified condition/decision coverage, since in the first test, the value of 'b' and in the second test the value of 'c' would not influence the output. So, the following test set is needed to satisfy MC/DC: {| class="wikitable" |- ! a || b || c |- | false || true || '''false''' |- | false || '''true''' || '''true''' |- | '''false''' || '''false''' || true |- | '''true''' || false || '''true''' |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)