Unencumbered V0.1.2: Write Cucumber step definitions in D

Atila Neves via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Apr 25 05:59:38 PDT 2014


On Friday, 25 April 2014 at 12:18:41 UTC, John Colvin wrote:
> On Friday, 25 April 2014 at 11:11:18 UTC, Atila Neves wrote:
>> On Friday, 25 April 2014 at 10:20:47 UTC, Rikki Cattermole 
>> wrote:
>>> On Friday, 25 April 2014 at 10:02:45 UTC, Dicebot wrote:
>>>> On Friday, 25 April 2014 at 09:45:06 UTC, Rikki Cattermole 
>>>> wrote:
>>>>> Also when using things like __LINE__ keep them to template 
>>>>> args, as they are inferred to the initiation if possible.
>>>>
>>>> This is antipattern. Default function arguments for __LINE__ 
>>>> and __FILE__ are also evaluated at call site. Moving this to 
>>>> template parameter creates huge amount of template bloat and 
>>>> must be used only if there is no other way around (that 
>>>> usually implies variadic arguments)
>>>
>>> True in this specific case it might be over the top.
>>
>> It was a template parameter before anyway. Also, this is for 
>> acceptance/feature/integration testing, so I doubt anyone 
>> would care how much bloat it generates as long as it gets the 
>> job done.
>
> It will hurt build-times, so it's worth avoiding.

Normally I'd agree. But it'll take longer to run the server and 
the tests themselves than it'll take to build anyway, so it 
really doesn't matter that much.

Now, if it were for _unit_ tests... hmm, speaking of which I 
should probably try and optimise that for unit-threaded. But that 
means profiling the compiler I guess.

Atila


More information about the Digitalmars-d-announce mailing list