D Unittest shortcomings with DLLs
Benjamin Thaut via Digitalmars-d
digitalmars-d at puremagic.com
Wed Mar 4 23:40:22 PST 2015
On Thursday, 5 March 2015 at 03:24:05 UTC, TheFlyingFiddle wrote:
>
> Finding out if a unittest only accesses public symbols could be
> done by analyzing the ast of the method. Either inside the
> compiler of via one of the third party D parsers currently in
> use.
>
I thought about writing a tool which extracts all "unittest"
blocks and puts each one into a template. Then I could use
__pragma(compiles, ) on the template to check if it uses any
private symbol and if not instanciate that template. That way
unittests that use private functions would automatically be
filtered out.
Kind Regards
Benjamin Thaut
More information about the Digitalmars-d
mailing list