X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScalar-Vec-Util.git;a=blobdiff_plain;f=t%2F10-veq-pp.t;h=98fea99ad69657588fef72c64396bc3d5b300d82;hp=ffd721a76ce95f665df24da863e56f74369f6f17;hb=01ef742d705c0bd6577139d1ee8a2808101336da;hpb=0062dbd2da53db62346382e729b84097131c61ee diff --git a/t/10-veq-pp.t b/t/10-veq-pp.t index ffd721a..98fea99 100644 --- a/t/10-veq-pp.t +++ b/t/10-veq-pp.t @@ -5,7 +5,7 @@ use warnings; use Test::More 'no_plan'; -use Scalar::Vec::Util qw/SVU_SIZE/; +use Scalar::Vec::Util; eval { Scalar::Vec::Util::veq_pp(undef, 0, my $y, 0, 0) }; like($@, qr/Invalid\s+argument/, 'first argument undef croaks'); @@ -18,12 +18,15 @@ like($@, qr/Invalid\s+argument/, 'fourth argument undef croaks'); eval { Scalar::Vec::Util::veq_pp(my $x, 0, my $y, 0, undef) }; like($@, qr/Invalid\s+argument/, 'fifth argument undef croaks'); -my $p = SVU_SIZE; -$p = 8 if $p < 8; +my $p = 8; my $n = 3 * $p; my $q = 1; -*myfill = *Scalar::Vec::Util::vfill_pp; +sub myfill { + (undef, my $s, my $l, my $x) = @_; + $x = 1 if $x; + vec($_[0], $_, 1) = $x for $s .. $s + $l - 1; +} sub rst { myfill($_[0], 0, $n, 0) }