[Mono-bugs] [Bug 351638] [PATCH] Array.Sort: proper argument checking and performance enhancements

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Apr 2 17:05:12 EDT 2008


User juraj at hotfeet.ch added comment

--- Comment #8 from Juraj Skripsky <juraj at hotfeet.ch>  2008-04-02 15:05:11 MST ---
Created an attachment (id=205817)
 --> (https://bugzilla.novell.com/attachment.cgi?id=205817)
SortTest.cs - reflection-based test program

Gert, you're the unit test expert. Do you think the attached program would be
accepted into the System.Array unit test suite when I turned it into a proper
unit test class (using Assert instead of Console.WriteLine etc.)?

It uses reflection to find all suitable method overloads of Array.Sort and
checks that the correct exceptions are thrown in all interesting cases. I think
it's nicer to do it this way than writing 3*8 + 6*4 = 48 separate tests*. But
then the code's a lot more complicated than copy-and-pasting the same code
multiple times...
What do you think?

*) 3 tests for all 8 overloads, 6 for those 4 with idx/len.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list