Question: Software testing: Consider the following loop statement in C: Int max_size = 10; for (n = 0; n < max_size && (c = getc(yyin)) !=
Software testing:
Consider the following loop statement in C:
Int max_size = 10;
for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != ; ++n)
buf[n] = (char) c;
|
|
| A | B | C |
|
| ID | input | n < max_size | c = getc(yyin) != EOF | c != | Result |
| 1 | n = 5; c = X | True | True | True | True |
- Derive a set of test cases that satisfy the compound condition adequacy criterion with respect to the loop. Document your test cases by extending the table above.
- Derive a subset of test cases from the table above that satisfy the modified condition (MC/DC) adequacy criterion with respect to the loop. Express these test cases using their IDs and the clause that they test
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
