2 ms·
I'm talking about C code. For every if-branch, a test must be written to exercise the extreme case - the if failing, for some reason (bit-rot, radiation or hea
by primitur 14y ago
I'm talking about C code. For every if-branch, a test must be written to exercise the extreme case - the if failing, for some reason (bit-rot, radiation or heat or hardware-failure derived).
In SIL4, its not enough to say:
if (SAFE == something) {}; //dosomething..
.. and then just test the SAFE condition. You also have to test the condition where the constant SAFE gets bitrot, where the var something gets bitrot, &etc. Adding a test case for every potential bit-rotted branch of the conditional.
- jacques_chester 14y agoSo you prefer gotos to reduce the number of tests you have to write by artificially pushing down the number of countable code paths? I guess I see the reason. It seems to be connected to your development economics -- SLOCS required to reach a certified state. I'm glad that works for you. It still scares me.