Let's bikeshed std.experimental.testing assertions/checks/whatchamacallits

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 30 12:48:45 PDT 2015


On 30/06/15 10:06, Atila Neves wrote:

> Well, the dream would be that `assert(foo ==
> bar)` did what part of this PR does, but that's another story and
> something that can't be done by a library unless we had AST macros,
> which we won't. Or Lisp's reader macros, but we won't get those either.

I was thinking the same. Both the test!"==" and shouldEqual are 
workarounds to get a nice message on an assertion failure. I'm wondering 
how hard it would be to have the compiler generate a string representing 
the failing expression.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list