RTest, a random testing framework

Fawzi Mohamed fmohamed at mac.com
Wed Jul 23 00:30:52 PDT 2008


On 2008-07-23 09:20:47 +0200, Fawzi Mohamed <fmohamed at mac.com> said:

> On 2008-07-23 00:54:49 +0200, BCS <ao at pathlink.com> said:
> 
>> Reply to Fawzi,
>> 
>> 
>>> ok I see how this could work, you have one where clause for each
>>> generator, and that is used to pick up the type and the address of the
>>> variable and store them is some structure (like a Variant).
>>> Then subsequent messages would set the generator, and maybe
>>> constraints.
>>> It could be done, and would be an interesting and challenging
>>> project...
>>> Would it be easier to use or simpler to implement than string mixins?
>>> I don't know, probably not, still an interesting approach.
>>> 
>> 
>> Easier to use, yes. For one, it would syntax highlight correctly!
> 
> fair enough
> 
>>  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.

and I forgot to say that my hope is that the most common case will be 
of using the default generator for each type (so instantiate the 
template with no arguments).
Quickcheck enforces it, if you want another generator you need to 
define a typedef, I leave more freedom, one can (and should) do it if 
he thinks that this generator is going to be used often.

> 
>>  Easier to write? probably not, but it might not be harder either.
> 
> true, in my case expression mixin (a D 2.0 feature) would have made the 
> interface and usage a little bit better, but well...
> 
> Fawzi





More information about the Digitalmars-d mailing list