sample software test cases for division function for mathematical calculationTest cases for arithametical division function?
if divisor = 0
-%26gt; say divisor isn't valid
if divisor = 1 (optional)
-%26gt; just return the dividend (there's no real need to do the division)
if divisor = -1 (optional)
-%26gt; return the negative of the dividend
else
-%26gt; perform division and return answer
I hope that's what you were asking for...
You question is somewhat unclear =)Test cases for arithametical division function?
I m not into testing but i guess u should check for -
1 - Only proper numeric value is inserted
2 - should not allow 0 as divisor
what else.. i can think of these 2 only. It can be increased if you are looking for some specified range of division operation...
Ur test case should include division by zero case.
it should be between 2 numbers and not just at begining.... like that
Most important test is division by zero.
Then you can different test cases,
1) numerator greater than denominator and vice versa
2) -ve and +ve values for both denominator and numerator.
3) int, float, double in numerator and denominator
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment