unittesting generic functions

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 14 11:26:05 PDT 2014


Andrei Alexandrescu:
> Destroy https://issues.dlang.org/show_bug.cgi?id=13291?

I'd like a way to test nested functions:


void foo() {
     int bar() { return 0; }

     unittest {
         assert(bar() == 1);
     }
}

void main() {}


Bye,
bearophile


More information about the Digitalmars-d mailing list