Do we need test cases?

Rod Adams <[email protected]>
Newsgroups gmane.comp.lang.perl.qotw.discuss
Message-ID <[email protected]>
Daniel Martin wrote:

>José Alves de Castro <[email protected]> writes:
>
>  
>
>>You're right.
>>
>>It is now my opinion that these quizzes should all have tests included :-)
>>    
>>
>
>But this quiz /did/ have a test script for the output posted:
>
> http://perl.plover.com/~alias/list.cgi?1:mss:2064
>
>I'll grant you, MJD didn't include the test himself, but it was the
>second message posted to the -discuss list after the quiz was posted.
>
>
>  
>

This does bring up the question of _should_ there be standard test cases 
posted with the QotW's?

Reasons For:

- With the apparent growing popularity of the list, published test cases 
would help ensure standardized inputs and outputs, thus lightening the 
load of the summarizer.

- It can help resolve many different ambiguities in the problem definition.

- Test Cases always help in the debugging process.


Reasons Against:

- For some problems (notably the expert levels), writing a suitable test 
case is on par with writing the problem. Witness the "center letters" of 
a couple weeks ago.

- Have such a strictly defined requirement could restrain creativity.

- The test case itself may itself be a spoiler, especially if it is a 
flexible one.


Personally, I could go either way. But I would be more inclined to 
volunteer as a summarizer if the test cases were in use.

What do others think?

-- Rod
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.