RTest, a random testing framework

Don nospam at nospam.com.au
Thu Jul 24 00:59:49 PDT 2008


BCS wrote:
> Reply to Fawzi,
> 
>> On 2008-07-23 00:54:49 +0200, BCS <ao at pathlink.com> said:
>>
>>> Also the parse errors get better messages.
>>>
>> well I spent some effort in making that better, if there is a syntax
>> error it caches it and writes your a message saying there is and
>> error,
>> your arguments and the core part of the generated mixin.
>> Not perfect, but much better than the default behavior.
> 
> the better thing about non string mixin code is that the error happens 
> at the point of the error, there is no way to tell where the string is 
> defined and generate an error there.

Yes there is! If you detect an error, instead of returning your mixed-in 
string, you return `static assert(0, "Found an error in your code");`
And then the error points the line of the user's code. That's actually 
much better than you can do with templates.




More information about the Digitalmars-d mailing list