How does import work?

Steven Schveighoffer schveiguy at yahoo.com
Tue Oct 19 06:34:35 PDT 2010


On Tue, 19 Oct 2010 08:57:03 -0400, Jens Mueller <jens.k.mueller at gmx.de>  
wrote:

> Thanks very much for your explanation. It just seemed natural to me to
> test them separately. Often I do not know even which modules a module
> depends on. And assuming there are many tests that might take long,
> picking a specific one seemed the better option to me. In general if the
> test suite is large and something fails then after the problem is fixed
> or while fixing I want to run only the depended tests.
> But admittedly this does not come up in practice, does it? I mean phobos
> does not need it. Testing everything is fast.
> So then I'll just test all.

Phobos unittests are run individually by a script.  Why, I don't know.  I  
think it has to do with a recent experiement in making the code continue  
on a failing unit test.

To give you an idea of how long it takes to run unit tests, dcollections  
probably has about 156 unit tests, and each is tested with 11 different  
template instantiations.  That's 156 * 11 = 1716 unit tests.  It runs in  
less than a second (takes a long time to compile though).

In general, unit tests are not going to slow you down unless you are doing  
some kind of i/o or timing tests.

-Steve


More information about the Digitalmars-d mailing list