RTest, a random testing framework
BCS
ao at pathlink.com
Mon Jul 21 15:12:51 PDT 2008
Reply to Fawzi,
I'm not quite following that, it seems to randomly select test values to
supply to a function.
While I like that Idea, the implementation doesn't appeal to me (I have never
liked string mixins if anything else is usable). I had an idea a while ago
to might make for a better interface and might even allow better application
of constraints:
double x,y;
Assert(1/x=pow(x,-1)).
Where(x).NotZero.
TestRandom();
Assert(x<y).
Where(x).LessThan(y).
Where(x).InRange(-10,10).
TestEdges(1000); //< 1000 test points
Assert's arg would be lazy bool and the delegate would be storeed, the Where
would use ref so it can pick up a pointer to x. Some sort of internal magic
would keep track of what constraints apply to what and let the Test* functions
inelegantly search the envelope.
More information about the Digitalmars-d
mailing list