couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McDaniel <couc...@autosys.us>
Subject Re: [PATCH] Eunit Tests
Date Mon, 16 Feb 2009 02:53:16 GMT
On Mon, Feb 16, 2009 at 12:51:48AM +0100, Jan Lehnardt wrote:
>
> On 15 Feb 2009, at 23:32, Damien Katz wrote:
>
>>
>> On Feb 14, 2009, at 8:15 PM, Jan Lehnardt wrote:
>>> --
>>>
>>> What do you think?
>>
>>
>> This is awesome! My only question is do the tests have to live in  
>> their own file? I'd prefer they can be in the same file, but it's fine 
>> if not.
>
> Heh, I went the extra mile to put them in their own
> directory because people here voiced preference.
> They can live in the code files just fine. It's just a
> matter of putting them there.
>
> I don't want to call a formal vote on that, but this
> is your (dev@-community's) chance to bikeshed
> this decision :)
>
> Should we keep EUnit-tests for modules in the
> module's source files or in a separate tests/
> directory? And why?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 Separate test modules in separate /test directory.  

 * helps keep main source directory and main modules uncluttered

 * when someone finds a bug they can submit the bug report in the
   form of a test that reproduces said bug; test can be used for
   regression testing afterwards

 * as new bugs are found, the only change to main module is the "fix",
   not the testing code (hopefully submitted as a separate module
   by an industrious bug-finder)

 * more practical for many people to contribute tests because main
   modules do not have to be changed, simply contribute a new test
   module

 * separate modules lends itself better to using the included Erlang
   test_server at some point in the future (if that was decided to be
   a good thing to do).


~Michael

>
> We can still have a separate tests/ directory for
> functional erlang tests, if we ever get them
> (I hope we do).
>
> Cheers
> Jan
> --
>

-- 
Michael McDaniel
Portland, Oregon, USA
http://trip.autosys.us
http://autosys.us
http://mmcdaniel.com/erlview

Mime
View raw message