6 use Test::More 'no_plan';
8 use Scalar::Vec::Util qw/vcopy SVU_SIZE/;
15 *myfill = *Scalar::Vec::Util::vfill_pp;
16 *myeq = *Scalar::Vec::Util::veq_pp;
18 sub rst { myfill($_[0], 0, $n, 0); $_[0] = '' }
21 (undef, my $a, my $b, my $x) = @_;
24 myfill($_[0], 0, $a, $x);
25 myfill($_[0], $a, $b, 1 - $x);
29 my ($v, $c) = ('') x 2;
31 my @s = ($p - $q) .. ($p + $q);
34 for my $l (0 .. $n - 1) {
35 last if $s1 + $l > $n or $s2 + $l > $n;
38 myfill($c, $s1, $l, 1);
39 myfill($c, $s2, $l, 1);
40 vcopy $v => $s1, $v => $s2, $l;
41 ok(myeq($v, 0, $c, 0, $n), "vcopy $s1, $s2, $l (move)");
42 is(length $v, length $c, "length is ok");