How can one reliably run unittests

wjoe invalid at example.com
Wed Aug 25 13:49:05 UTC 2021


On Wednesday, 25 August 2021 at 13:39:32 UTC, Paul Backus wrote:
> On Wednesday, 25 August 2021 at 13:36:27 UTC, wjoe wrote:
>> On Wednesday, 25 August 2021 at 13:25:22 UTC, Paul Backus 
>> wrote:
>>> On Wednesday, 25 August 2021 at 13:23:22 UTC, wjoe wrote:
>>>> [...]
>>>
>>> Errors thrown by assertions in unit tests are a special case:
>>>
>>>> [...]
>>>
>>> Source: https://dlang.org/spec/unittest.html
>>
>> Also, does that hold for something like assertThrown!SomeError 
>> ?
>
> Officially, according to what's written in the spec? No. In 
> practice? Yes. And enough people rely on custom assertions like 
> assertThrown and the ones in unit-threaded [1] that this is 
> unlikely to change.
>
> [1] 
> https://unit-threaded.dpldocs.info/unit_threaded.assertions.html

Thanks. I wondered about that for some time.


More information about the Digitalmars-d mailing list