[dmd-internals] test failures
Rainer Schuetze
r.sagitario at gmx.de
Fri May 20 07:48:39 PDT 2011
On 20.05.2011 16:32, Andrei Alexandrescu wrote:
> On 5/20/11 2:16 AM, Don Clugston wrote:
>> Apart from the size, a particular problem with std.datetime is that it
>> has unittests _inside_ struct declarations.
>> This makes the code practically unreadable, especially since those
>> unittests are enormous, and it makes bisection a very painful, manual
>> process. 30K lines with only a few blocks of unittests wouldn't be a
>> problem.
>
> Just a thought - how about a tool (that would go in the same dir as
> dmd and rdmd) called strip_unittest? It would read a D program and
> output to stdout the same program without unittests.
>
> All we need is a D tokenizer (which we need anyway) and a small driver.
>
Visual D has a "token replacer" that allows to do this:
http://www.dsource.org/projects/visuald/wiki/Tour/TokenReplace
replacing "unittest { $anything }" with "unittest { }" (to not get into
troubles with version conditionals before the unittest statement)
reduces the size of datetime.d to about a third of its original size.
Rainer
More information about the dmd-internals
mailing list