Statement Unittest [DRAFT]
Sharif yt
sharifyt112233 at gmail.com
Wed Nov 20 06:04:28 UTC 2024
On Thursday, 17 October 2024 at 23:48:35 UTC, Guillaume Piolat
wrote:
> On Tuesday, 15 October 2024 at 14:37:24 UTC, monkyyy wrote:
>> A module-level unittest statement( uses `()` instead of `{}`)
>> for single asserts
>> , with an optional string message
>>
>> ```d
>> unittest(1==1);
>> unittest(1==1,"math broke");
>> ```
>>
>>
>> https://gist.github.com/crazymonkyyy/2afa7ae1402cd246fb98bdb86dd19605
>
> This is a pretty cool idea.
> unittest being one of the big win of D, why not have more of it.
Agreed! Module-level unittest with optional messages adds
flexibility and simplicity to D’s testing framework—definitely a
cool way to enhance one of its standout features.
More information about the dip.development
mailing list