Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Compute test plan

use strict;
use warnings;

use Test::More;

my @cases = (1, 2, 7);

plan tests => 2 * scalar @cases;

for my $case (@cases) {
    my $value = rand($case);
    cmp_ok $value, '>=', 0, 'bigger than 0';
    cmp_ok $value, '<', $case, "smaller than $case";
}