unittesting generic functions

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 14 17:52:38 PDT 2014


On 8/14/14, 3:46 PM, H. S. Teoh via Digitalmars-d wrote:
> Having only .init guaranteed to exist for a generic type T (and
> sometimes not even that if you have a Voldemort) greatly cripples the
> utility of the unittest.

I'm thinking of T.random as a sort of generator of random correct 
objects of type T...

Andrei


More information about the Digitalmars-d mailing list