BTCEmbedded Platform
BTCEmbedded Platform
Decisions
are build on conditions:decisions consist of one or more conditions
=> x < 7 && a == b
=> x ^ y || !(x == 7 && a+7 == 25)
Condition / Decision Coverage
"Every point of entry and exit in the program has been invoked at least
once, every condition in a decision in the program has taken all possible
outcomes at least once, and every decision in the program has taken all
possible outcomes at least once."
Condition / Decision Coverage [from BTC Embedded Platform Concepts and
Use Cases]
• For Switch-Case Statements, all cases need to be visited at least once, including
the Default-case
• Each function entry shall be seen at least once. Note that all function callers are
not needed to be explicitly mentioned, as these are implicitly covered by the
other demands above. The same applies for function exits.
C/DC Coverage [from BTC Embedded Platform Concepts and Use Cases]
x>y&&z==c
=> terminates after traversing x > y if x is less or equal y, as the outcome of
the entire conjunction is obviously false. In this example, condition z == c is not
evaluated at all.
=> condition "z == c" can only be covered in states where x is greater than y
=> a condition is traversed only if the outcome of its decision is not yet
determined, the condition’s evaluation can independently affect the decision’s
outcome
Condition / Decision Coverage [from BTC Embedded Platform Concepts and
Use Cases]