unittest questions

bearophile bearophileHUGS at lycos.com
Thu Aug 19 12:57:55 PDT 2010


Johannes Pfau:

> 1) I have some code that accepts both delegates and functions. How can a
> unittest explicitly check the function part? Whenever I add a function
> in an unittest block it becomes a delegate.

You may define it outside the unittest{} block (that is a function) and wrap everything inside a version(unittest){} block.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list