[phobos] Unittest errors on windows with latest phobos sources
Jason Spencer
spencer8 at sbcglobal.net
Tue Jul 6 09:20:53 PDT 2010
Would it be worth considering allowing the user to give a function like OnUnitTest0() that gets called in the case of a 0 return? If such a function is not specified, default behavior is to stop. Or perhaps setting a global to the AND of all ut results and letting them check the result?
----- Original Message ----
> From: Sean Kelly <sean at invisibleduck.org>
> To: Discuss the phobos library for D <phobos at puremagic.com>
> Sent: Tue, July 6, 2010 9:12:57 AM
> Subject: Re: [phobos] Unittest errors on windows with latest phobos sources
>
> On Jul 6, 2010, at 9:05 AM, Michel Fortin wrote:
> Le 2010-07-06 à
> 11:28, Sean Kelly a écrit :
>
>> On Jul 5, 2010, at 11:35 PM,
> Walter Bright wrote:
>>>
>>> Sean Kelly
> wrote:
>>>> That's probably my fault.
>>>
>
>>> Every team needs one of those people. Thanks for filling that
> role.
>>
>> I like to maintain a steady level of failure to
> keep things positive ;-)
>>
>> How about this... the unittest
> handler only returns an error code and if it's nonzero then the app won't
> run.
>
> This is what I was expecting the change would do
> originally. Running the program should be conditional to the unit tests being
> successful, otherwise it's too easy to ignore them.
>
> Another way
> to put it is: do you want your failed unit tests to behave as warnings or as
> errors? I choose errors.
Yeah, the only thing I've been wondering about
> is whether there's a case where the unittests would want to return 0 but have
> the app still not run. I thought maybe with a custom build meant to run
> unit tests, but in that case I'd have an empty main() that simply returned 0 and
> would specify that main should run. Still trying to decide whether there
> are any justifiable cases that the new behavior wouldn't
> cover.
_______________________________________________
phobos mailing
> list
> href="mailto:phobos at puremagic.com">phobos at puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list