By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,273 Members | 1,032 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,273 IT Pros & Developers. It's quick & easy.

Testing IComparer Implementation

P: n/a
I am testing a comparer class that implements IComparer. The comparer
constructor takes as arguments a property field which can take on lets
say roughly fifteen values. It also takes two other boolean arguments.

Testing all permutations of the comparer doesn't seem practical. Are
there any suggestions for testing the comparer? Do I need to test all
permutations?

Thanks in advance for any advice.

Dec 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Depends on what your code does. If you have different execution paths based
on the values passed as an argument I would say yes.

Gabriel Lozano-Morán

<ck******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
>I am testing a comparer class that implements IComparer. The comparer
constructor takes as arguments a property field which can take on lets
say roughly fifteen values. It also takes two other boolean arguments.

Testing all permutations of the comparer doesn't seem practical. Are
there any suggestions for testing the comparer? Do I need to test all
permutations?

Thanks in advance for any advice.

Dec 4 '06 #2

P: n/a
<ck******@gmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
>I am testing a comparer class that implements IComparer. The comparer
constructor takes as arguments a property field which can take on lets
say roughly fifteen values. It also takes two other boolean arguments.

Testing all permutations of the comparer doesn't seem practical.
Is the number of permutations 4 x 15? That doesn't sound too bad, especially
if you can make it table-driven.
Are there any suggestions for testing the comparer? Do I need to test all
permutations?
Are you a professional tester or a programmer? If the former, then yes, you
have to test all the permutations. Otherwise, my advice is to test
everything that could break.

///ark
Dec 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.