Raising the bar on Phobos unittest coverage

Jonathan M Davis jmdavisProg at gmx.com
Mon Mar 18 16:08:40 PDT 2013


On Monday, March 18, 2013 23:58:59 Jonas Drewsen wrote:
> On Monday, 18 March 2013 at 22:06:55 UTC, Walter Bright wrote:
> > On 3/18/2013 2:09 PM, Jonas Drewsen wrote:
> >> Please note that std.net.curl needs to have
> >> PHOBOS_TEST_ALLOW_NET env variable
> >> defined or else it will early out on most unittests. I guess
> >> that will increase
> >> the coverage from 2 to something more sane.
> > 
> > Perhaps that should be a -version=TEST_ALLOW_NET setting rather
> > than an environment variable.
> 
> Maybe.. I did it like that so I wouldn't have to recompile
> everytime I needed to change that flag.

The normal thing to do with unit tests when you want to have them enabled on 
part of the time is to use a version block. And you have to recompile whenever 
you make changes anyway, so I wouldn't expect it to be a big deal in general.

- Jonathan M Davis


More information about the Digitalmars-d mailing list