Test Adequacy Using Control Flow Flashcards
T is considered adequate with respect to the
statement coverage criterion if the statement
coverage of T with respect to (P,R) is ____
1
Sub i is the number of what?
Unreachable code
Sub c is the number of what?
Covered code
Sub e is the number of what?
Code in the program
Logical statements on the same line should be:
Separately counted
T/F Counting syntactical markers, or not, is an operational definition choice
T
T/F If syntactical markers are counted, they should be
treated as statements and all counted
T
T/F If syntactical markers are not counted, none should
be counted… including else
T
What is a condition also known as?
Predicate
Any expression that evaluates to true or false constitutes a ____
Condition
T/F x and x + y are invalid conditions
False, depends on the language
T/F The constants 1 and 0 may correspond to, respectively, true and false
T
T/F The constant 0 may correspond to false and any
non-zero constant corresponds to true
T
T/F Odd constants may correspond to true and even
constants may correspond to false
T
T/F A simple condition uses any boolean operator
F, only NOT operator
Simple conditions are also referred to as ____
or ____ conditions because they cannot be
parsed any further into two or more conditions
Atomic, elementary
T/F A compound condition is made up of two or
more simple conditions joined by one or more
Boolean operators
T
Any condition can serve as a decision in the appropriate context within a program
Conditions as decisions
What do most high-level languages provide to serve as contexts for decisions?
If, while, and switch statements