Parallel execution of unittests

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Thu May 1 00:26:59 PDT 2014


On Thursday, 1 May 2014 at 04:50:30 UTC, Jonathan M Davis via 
Digitalmars-d wrote:
> std.file's unit tests would break immediately. It wouldn't 
> surprise me
> if std.socket's unit tests broke. std.datetime's unit tests 
> would
> probably break on Posix systems, because some of them 
> temporarily set
> the local time zone - which sets it for the whole program, not 
> just the
> current thread (those tests aren't done on Windows, because 
> Windows only
> lets you set it for the whole OS, not just the program). Any 
> tests which
> aren't pure risk breakage due to changes in whatever global, 
> mutable
> state they're accessing.

We really should think about separating Phobos tests into unit 
tests and higher level ones (in separate top-level source folder).

The fact that importing std.file in my code with `rdmd -unittest` 
may trigger file I/O makes me _extremely_ disgusted. How did we 
even get here? >_<


More information about the Digitalmars-d mailing list