The following is the comment written for a C function.
/* This function computes the roots of a quadratic equation a.x∧2 + b.x + c = 0. The function stores two real roots in *root1 and *root2 and returns the status of validity of roots. It handles four different kinds of cases.
(i) When coefficient a is zero irrespective of discriminant
(ii) When discriminant is positive
(iii) When discriminant is zero
(iv) When discriminant is negative.
Only in case (ii) and (iii), the stored roots are valid. Otherwise 0 is stored in the roots. The function returns 0 when the roots are valid and 1 otherwise.
The function also ensures rootl >= root2.
int get_QuadRoots(float a, float b, float c,
float *root1, float *root2);
*/
A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant.
Test cast 
Input Set 
Expected Output Set 

a 
b 
c 
root1 
roo2 
Return Value 

T1 
0.0 
0.0 
7.0 
0.0 
0.0 
1 
T2 
0.0 
1.0 
3.0 
0.0 
0.0 
1 
T3 
1.0 
2.0 
1.0 
1.0 
1.0 
0 
T4 
4.0 
12.0 
9.0 
1.5 
1.5 
0 
T5 
1.0 
2.0 
3.0 
3.0 
1.0 
0 
T6 
1.0 
1.0 
4.0 
0.0 
0.0 
1 
The correct answer is option 3.
Key Points
T1  T2  T3  T4  T5  T6 
a=0 Hence any one of T1 or T2 is redundant 
Discriminant b2 – 4ac =44 =0 = (– 12)2 – 4 × 9 × 4 = 144 – 144 = 0 Hence any one of T3 or T4 is redundant. 
Discriminant b2 – 4ac = (– 2)2 – (– 3) × 4 × 1 = 4 + 12 = 16 > 0 discriminant > 0 
Discriminant > 0 discriminant b2 – 4ac = (1)2 – 4 × 1 × 4 = 1 – 16 = – 13 discriminant < 0. 
Hence the correct answer is T2, T4, T5, T6.