I would add that you should test all combinations of positive and
negative operands.
You are not clear about the type being divided.
If it is a floating point type, you can verify that (a*b) / b = a to
an acceptable tolerance for a wide variety of values of a and b.
If you are working with integers, the case 4 below is good, given r <
b.
Don

On May 10, 11:12 am, Praveen Kumar <praveen97...@gmail.com> wrote:
> cases would be:
> 1. division by 0 raises an appropriate Exception
> 2. dividing 0 by any number should result in 0
> 3. dividing any number by 1 should give the same number
> 4. a = b*q + r i.e a/b should give q
>
> On Tue, May 10, 2011 at 7:52 PM, Carl Barton 
> <odysseus.ulys...@gmail.com>wrote:
>
> > Don't really get the question
>
> > On 10 May 2011 09:08, Akshata Sharma <akshatasharm...@gmail.com> wrote:
>
> >> write test cases for the division '/' operator..
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Algorithm Geeks" group.
> >> To post to this group, send email to algogeeks@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> algogeeks+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/algogeeks?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to