Open johnnychen94 opened 4 years ago
For zero-arg functions such as f() = rand(), a useful feature is to repeat the tests several times and see if all of the results fall in the acceptable region.
f() = rand()
I'm thinking of the following usage:
@test_reference "references/zero.txt" rand by=(x,y)->abs(x-y)<1 repeat=50
which is equivalent to
for _ in 1:50 rst = rand() @test_reference "references/zero.txt" rst by=(x,y)->abs(x-y)<1 end
Why is this specific to zero arg functions?
foo(q) = x+rand() @test_reference "references/zero.txt" foo(500) by=(x,y)->abs(x-y)<1 repeat=50
For zero-arg functions such as
f() = rand()
, a useful feature is to repeat the tests several times and see if all of the results fall in the acceptable region.I'm thinking of the following usage:
which is equivalent to