File: rand_range.t

package info (click to toggle)
liblist-maker-perl 0.005-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 184 kB
  • sloc: perl: 225; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 280 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
use Test::More 'no_plan';

use List::Maker;

for (1..100) {
    my $rand = < 2 r 7 >;
    ok $rand >= 2 && $rand <= 7       => "< 2 r 7 > rand $_ ($rand)";
}

for (1..100) {
    my $rand = < -2.2 r .7 >;
    ok $rand >= -2.2 && $rand <= 0.7  => "< -2.2 r .7 > rand $_ ($rand)";
}