unit-threaded v0.8.0

Petar Petar
Thu Jan 31 10:12:16 UTC 2019


On Wednesday, 30 January 2019 at 14:55:37 UTC, jmh530 wrote:
> Also, there is an example in the readme on @Values of
> @Values(1, 2, 3) unittest { assert(getValue!int % 2 == 0); }
> What if it's not so easy to create the values? I suppose you 
> could pass the parameters in @Values to some other function 
> that will then create what you actually need and then test 
> using that. Maybe good to provide some more examples of 
> advanced usage?

I suppose that if the values you want to test with require some 
complicated initialization only possible at runtime, @Values 
could be made to hold a list functions that would be called at 
runtime to create the values, before executing your test function.




More information about the Digitalmars-d-announce mailing list