Randomized unittests

Gorge Jingale via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 24 21:57:53 PDT 2016


On Monday, 25 July 2016 at 02:36:04 UTC, Chris Wright wrote:
> On Mon, 25 Jul 2016 01:49:25 +0000, Gorge Jingale wrote:
>
>> [...]
>
> http://code.dlang.org/packages/unit-threaded
>
> @Values() annotation on a unittest takes a range. Base that on 
> a range that yields random values and Bob's your uncle.
>
> That range may need to be a compile-time constant. If so, it 
> will be a little awkward to create, and you can ping Atila 
> about possibly creating a @ValuesFrom annotation that will take 
> a method or lambda that yields a range of values.

Thanks, looks nice, a bit confusing but seems pretty useful.

But why is Bob my uncle? ;)


More information about the Digitalmars-d-learn mailing list