Exam-style question
Try this first
A solution uses two Boolean inputs, A and B. What is the best way to check that its output is correct for every possible input combination?.
- A.Test only when A and B are both true
- B.Test only when A and B are both false
- C.Test one randomly selected input combination
- D.Test all four combinations of A and B
Model answer
What a good answer should say
- Test all four combinations of A and B
Explanation
Why this works
Two Boolean inputs have 2 × 2 = 4 possible combinations. Testing every combination checks the complete input space for this simple problem.
Common mistake
No common mistake is linked to this question yet.
