Simple bolt-on unittest improvement
Bill Baxter
wbaxter at gmail.com
Sat Sep 12 08:01:37 PDT 2009
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__.
--bb
More information about the Digitalmars-d
mailing list