use v6;
use Test;

my @true-tests  = [^10,  5], [^Inf,  42], [-Inf .. Inf, Inf], [-Inf..Inf, -Inf];
my @false-tests = [^10, 99], [^Inf, Inf], [-Inf^..^Inf, Inf], [-Inf..Inf,  NaN];
plan @true-tests + @false-tests;

for @true-tests -> ($range, $thing) {
    is-deeply $range.in-range($thing), True, "$thing is in range $range";
}
for @false-tests -> ($range, $thing) {
    throws-like { $range.in-range($thing) }, X::OutOfRange,
        "$thing is in not in range $range";
}

Add basic tests for Range.in-range
Add basic tests for Range.in-range

It's a somewhat internal method with no presence in the roast, so
I'm adding it in Rakudo's t/

https://irclog.perlgeek.de/perl6-dev/2016-12-30#i_13825497
