Simple bolt-on unittest improvement

Nick Sabalausky a at a.a
Sat Sep 12 12:34:07 PDT 2009


"Bill Baxter" <wbaxter at gmail.com> wrote in message 
news:mailman.64.1252768975.20261.digitalmars-d at puremagic.com...
> On Sat, Sep 12, 2009 at 7:09 AM, Justin Johansson
> <procode at adam-dott-com.au> wrote:
>> Lutger Wrote:
>>
>>> I'm rewriting my testing stuff at the moment, I hoped to use the runtime
>>> features to be able to user regular asserts too but that didn't work 
>>> out.
>>>
>>> Do you know you can get rid of the need to pass __FILE__ and __LINE__?
>
> You can use a string mixin.  That's the only way I know of in D1.  But
> then the syntax becomes something like
>
>     mixin(expectEquals("message"));
>
> The expectEquals then has to return a string of code which contains
> the __FILE__ and __LINE__.
>

Yea, that's what my stuff does. 





More information about the Digitalmars-d mailing list