Low level unit test library in druntime
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 30 08:45:26 PDT 2016
On 08/30/2016 10:44 AM, Atila Neves wrote:
> I'd much rather have `assert` be magical or have AST macros to make the
> syntax for writing tests better than what it is now.
Same here. BTW I'd like unittests that "must not compile" and unittests
that "must fail dynamically".
For the former case, the compiler should cooperate:
@incompilable unittest { ... }
fails if it passes compilation. So the compiler must know about that
attribute.
For the latter case, no change in language is necessary, only in druntime:
@mustfail unittest { ... }
Would love these two.
Andrei
More information about the Digitalmars-d
mailing list