Test using is_any
- Test::IsAny was created based on the earlier example.
We can easily test if the returned values fall are integer numbers and fall in the right range (we have even created the is_any function for this), but what if we would like to be more precise in our tests? What if we would like to control the randomness?
use strict;
use warnings;
use Test::More;
use Test::IsAny qw(is_any);
use MyRandomApp qw(dice);
is_any dice(10), [1..10];
is_any dice(10), [1..10];
done_testing;
prove -lv t/test-is-any.t