[dmd-internals] What is the point of runnable/testdate.d?

Walter Bright walter at digitalmars.com
Sun Aug 14 19:13:35 PDT 2011



On 8/14/2011 1:14 PM, Brad Roberts wrote:
> Changing tests is dangerous.  Without going back to the original code to make sure the original bug is still caught and
> tested for by the moved code or the altered to be a even more reduced test case, there's a real risk of a reduction in
> the quality of the test suite.  I'd personally LOVE it if not a single phobos import existed in any of the dmd test
> suite.  Possibly even true for druntime imports in the dmd test suite.  However, it's not clear that the benefits
> justify the risk.
>

Some library tests are probably infeasible to do as unit tests, such as:

1. tests that involve a whole bunch of modules working together (integration tests)

2. ones that are far more exhaustive than would be suitable for inclusion in the 
library source code.

3. The regexp tests, for another example, are under a different license than 
Phobos', so I think it would be inappropriate to fold them into std.regexp.d.

4. Tests that are cobbled up from some interesting application that may be 
completely unsuitable as being part of the library source code.


More information about the dmd-internals mailing list