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

Don Clugston dclugston at googlemail.com
Mon Aug 15 02:59:49 PDT 2011


On 14 August 2011 22:14, Brad Roberts <braddr at puremagic.com> 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.

There are a huge number of imports of std.stdio (most are probably
just for writefln), a large number of std.conv,
and quite a few import std.string. Imports of std.c modules aren't too
bad, either (most are just importing printf).

Apart from those, I think removing the others is an achievable goal.
The worst I found were two imports of std.random.rand and  std.stream
(which I have a pull request for) and:
* test60 imports std.algorithm
 ---> These tests should be moved to std.algorithm.
* xtest64 --> std. traits
  ---> This import was only introduced two months ago!! Should be in std.traits.
* test8 and stress import std.utf
* testthread2 imports std.random

* untag and variadic import lots of evil stuff
* test34 and testgc2 imports std.format
* quite a few import std.math. Most of those tests are already
duplicated in std.math.
* testsignals, testsocket, testmmfile, testdate, testzip test the
corresponding Phobos modules.



>
> On 8/14/2011 12:58 PM, kenji hara wrote:
>> I think that the dmd tests depends on phobos should move to.
>>
>> Kenji Hara
>>
>> 2011/8/15 Jonathan M Davis <jmdavisProg at gmx.com>:
>>> From what I can tell, it's just testing std.date. I would have thought that
>>> that's the sort of testing that you'd do in std.date, not dmd. And since
>>> std.date has now been deprecated, it seems that that's breaking dmd's tests.
>>>
>>> So, does these tests need to be rewritten for std.datetime, or should we just
>>> get rid ouf them? I don't understand why the tests exist in the first place.
>>> It's the sort of thing that I would have expected to see in std.date, not dmd.
>>>
>>> - Jonathan M Davis
>>> _______________________________________________
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>


More information about the dmd-internals mailing list