unittesting generic functions
Idan Arye via Digitalmars-d
digitalmars-d at puremagic.com
Thu Aug 14 12:03:35 PDT 2014
On Thursday, 14 August 2014 at 18:26:06 UTC, bearophile wrote:
> 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
Nested functions are not really "units" - they are implementation
details.
More information about the Digitalmars-d
mailing list