Data sensitive error

De Software testing
Ir para: navegação, pesquisa

Example 0

The statement "y = x * 2", which correct version is "y = x ** 2", will pass for test cases (x = 0, y = 0) and (x = 2, y = 4).


Example 1

The code below fails if b has the value 0 but executes correctly if b is not 0.

int blech(int a, int b) {
	return a / b;
}