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

Brad Roberts braddr at puremagic.com
Sun Aug 14 19:17:48 PDT 2011


On Sunday, August 14, 2011 7:13:35 PM, Walter Bright wrote:
> 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 wo
uld 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.

None of that justifies them being part of the dmd test suite.  They're 
justifications for not being in unittest blocks inside the specific 
files in phobos.


More information about the dmd-internals mailing list