Input domain example

Considering an integer type of 16 bits (2 bytes). The lowest possible input value is -32,768 and the highest is 32,767. Thus there are 65,536 possible inputs into this small software. Which test cases can detect the defect?

<source lang="c"> int blech(int j) { j = j - 1; // should be j = j + 1; j = j / 30000; return j; } </source>

Only four out of the possible 65,536 input values will find this fault:

Test Cases
Input(j) Expected Output Actual Result
-30000 0 -1
-29999 0 -1
30000 1 0
29999 1 0