Want to help DMD bugfixing? Write a simple utility.
Simen kjaeraas
simen.kjaras at gmail.com
Mon Mar 21 13:24:14 PDT 2011
On Mon, 21 Mar 2011 01:52:45 +0100, Ary Manzana <ary at esperanto.org.ar>
wrote:
> On 3/19/11 9:11 PM, Don wrote:
>> Here's the task:
>> Given a .d source file, strip out all of the unittest {} blocks,
>> including everything inside them.
>> Strip out all comments as well.
>> Print out the resulting file.
>>
>> Motivation: Bug reports frequently come with very large test cases.
>> Even ones which look small often import from Phobos.
>> Reducing the test case is the first step in fixing the bug, and it's
>> frequently ~30% of the total time required. Stripping out the unit tests
>> is the most time-consuming and error-prone part of reducing the test
>> case.
>>
>> This should be a good task if you're relatively new to D but would like
>> to do something really useful.
>> -Don
>
> Can it be done in Ruby? Or you need it in D?
Part of the idea was that someone use it to learn D. However, the important
part is that it's done. Doing it in D would be preferable, but not a
requisite.
--
Simen
More information about the Digitalmars-d-learn
mailing list