6 use Test::More 'no_plan';
8 use Scalar::Vec::Util qw<vfill SVU_SIZE>;
10 for ([ 1, 'offset', -1 ], [ 2, 'length', '-1' ]) {
12 $args[$_->[0]] = $_->[2];
13 eval { &vfill(@args) }; my $line = __LINE__;
14 like $@, qr/^Invalid\s+negative\s+$_->[1]\s+at\s+\Q$0\E\s+line\s+$line/;
22 *myfill = *Scalar::Vec::Util::vfill_pp;
23 *myeq = *Scalar::Vec::Util::veq_pp;
25 sub rst { myfill($_[0], 0, $n, 0); $_[0] = '' }
28 (undef, my $a, my $b, my $x) = @_;
31 myfill($_[0], 0, $a, $x);
32 myfill($_[0], $a, $b, 1 - $x);
36 my ($v, $c) = ('') x 2;
38 my @s = ($p - $q) .. ($p + $q);
40 for my $l (0 .. $n - 1) {
45 ok(myeq($v, 0, $c, 0, $n), "vfill $s, $l");
46 is(length $v, length $c, "length is ok");