static unittest

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 30 12:04:33 PDT 2014


On 2014-04-30 18:55, Andrei Alexandrescu wrote:
> Walter and I also discussed "static unittest" a while ago - yes, another
> use of static :o).
>
> A static unittest would be evaluated only during compilation, and would
> prove things that fall in the realm of static checking but are not
> verifiable with traditional typesystem approach.
>
> That won't enable things we can't do today (there's always
> assert(__traits(compiles, ...)) but it's instantly recognizable, very
> easy to use, and pushes semantic checking to a whole new level.
>
> Thoughts?

It's already possible to do CTFE unit testing [1], if that was what 
you're thinking about.

[1] http://forum.dlang.org/thread/ks1brj$1l6c$1@digitalmars.com

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list