What's up with the assert enhancements proposed years ago?

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 27 09:46:06 PDT 2016


On Saturday, 24 September 2016 at 14:08:30 UTC, Nick Sabalausky 
wrote:
> On 09/24/2016 04:03 AM, Martin Nowak wrote:
>> [...]
>
> Yea, incidentally, I just started using unit-threaded for the 
> first time this week, and so far, for the most part, I really 
> quite like it a lot. But those comparator functions give me bad 
> flashbacks of old-school Java.
>
> Hmm, I wonder if Atila would be amenable to a more 
> assertPred-like function in unit-threaded. Maybe a 
> `should!"=="(leftSide, rightSide)` would fit in well. Or better 
> yet, also adding in something like that that trick used in 
> Andre's really nice recently proposed "dump" function (or 
> whatever the name of it was), where it also prints out the 
> actual argument provided in addition to the argument's value.

See my answer to Martin. "!" next to "==" just looks wrong.

Atila


More information about the Digitalmars-d mailing list