[phobos] Silent failure of std.container unittests

Andrei Alexandrescu andrei at erdani.com
Thu Jul 15 16:55:58 PDT 2010


On 07/15/2010 06:00 PM, Sean Kelly wrote:
> On Jul 15, 2010, at 3:43 PM, Andrei Alexandrescu wrote:
>>
>> I think there's a disadvantage there. FWIW changing the semantics
>> of assert that way will translate into a disincentive to use it
>> inside unittests ("Hmm, I better use enforce() here because
>> assert() is just weird.")
>
> Is there a disadvantage in providing a separate routine that reports
> and doesn't throw?  I know it's another global symbol (assuming it's
> in object.di), but...

Good question. expect() comes to mind.

Andrei


More information about the phobos mailing list