English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

sample software test cases for division function for mathematical calculation

2006-11-01 16:28:55 · 4 answers · asked by krishna k 1 in Computers & Internet Programming & Design

4 answers

if divisor = 0
-> say divisor isn't valid

if divisor = 1 (optional)
-> just return the dividend (there's no real need to do the division)

if divisor = -1 (optional)
-> return the negative of the dividend

else
-> perform division and return answer


I hope that's what you were asking for...
You question is somewhat unclear =)

2006-11-01 16:54:54 · answer #1 · answered by LeAd DiAg 2 · 0 0

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...

2006-11-02 01:56:51 · answer #2 · answered by utsav v 2 · 0 0

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

2006-11-02 02:02:34 · answer #3 · answered by manoj Ransing 3 · 0 0

Ur test case should include division by zero case.
it should be between 2 numbers and not just at begining.... like that

2006-11-02 01:15:00 · answer #4 · answered by eBuddy 2 · 0 0

fedest.com, questions and answers