[dmd-internals] test failures

Don Clugston dclugston at googlemail.com
Sat May 21 18:04:41 PDT 2011


On 20 May 2011 16:48, Rainer Schuetze <r.sagitario at gmx.de> wrote:
> 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

This looks like exactly what I want. Unfortunately when I select that
menu item, I just get a gray box. Presumably something's gone wrong in
the installation (I just upgraded from a few versions back; VS shell
2008). Any ideas?


More information about the dmd-internals mailing list