Phantom conditions
This post is based on an interesting case NASA brought me; a small
test program with a phantom condition. In the example, timed_out()
is always true, which means checkout()
cannot satisfy MC/DC, but
let’s pretend it does something interesting. The function has one
decision with two conditions, and four outcomes. Let’s measure MC/DC
and confirm: