Complex conditionals

    The other day we dealt with code coverage and gnarly conditionals. I promised to offer a way to be able to test them properly. THERE IS NONE. Ha, what a bad joke. But the real answer might not be better, depending on your point of view. What you have to do is create a table. (A || B) && C This is our conditional. | m | A | B | C | RESULT | ---------------------- | 0 | T | T | T | T | | 1 | T | F | T | T | x | 2 | F | F | T | F | x | 3 | F | T | T | T | x | 4 | T | T | F | F | | 5 | T | F | F | F | x | 6 | F | T | F | F | | 7 | F | F | F | F | # m is the test case # A, B, C are the atomic parts of the conditional # RESULT is the result of the evaluation of the conditional For three terms in a conditional, you can have 8 different cases (2^3).

    Read More