Static unittests?

Walter Bright newshound2 at digitalmars.com
Sun Aug 18 13:35:04 PDT 2013


On 8/5/2013 11:27 AM, monarch_dodra wrote:
> What about, for example:
>
> assertCTFEable!({
>      int i = 5;
>      string s;
>      while (i--)
>          s ~= 'a';
>      assert(s == "aaaaa");
> });

I don't believe that is a valid use case because the code being tested is not 
accessible from anything other than the test.



More information about the Digitalmars-d mailing list