From: Vincent Pit Date: Mon, 24 Sep 2012 21:33:48 +0000 (+0200) Subject: Clarify some test loops by using next instead of last X-Git-Tag: v0.07~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=fecf68fc9030feb1afe2a82f685ade1216ec31f1;p=perl%2Fmodules%2FScalar-Vec-Util.git Clarify some test loops by using next instead of last --- diff --git a/t/10-veq-pp.t b/t/10-veq-pp.t index 78092cc..58d90b0 100644 --- a/t/10-veq-pp.t +++ b/t/10-veq-pp.t @@ -45,7 +45,7 @@ my @s = ($p - $q) .. ($p + $q); for my $s1 (@s) { for my $s2 (@s) { for my $l (0 .. $n - 1) { - last if $s1 + $l > $n or $s2 + $l > $n; + next if $s1 + $l > $n or $s2 + $l > $n; pat $v1, $s1, $l, 0; pat $v2, $s2, $l, 0; ok Scalar::Vec::Util::veq_pp($v1 => $s1, $v2 => $s2, $l), diff --git a/t/11-veq.t b/t/11-veq.t index 924bc12..dab1e05 100644 --- a/t/11-veq.t +++ b/t/11-veq.t @@ -46,7 +46,7 @@ my @s = ($p - $q) .. ($p + $q); for my $s1 (@s) { for my $s2 (@s) { for my $l (0 .. $n - 1) { - last if $s1 + $l > $n or $s2 + $l > $n; + next if $s1 + $l > $n or $s2 + $l > $n; pat $v1, $s1, $l, 0; pat $v2, $s2, $l, 0; ok veq($v1 => $s1, $v2 => $s2, $l), "veq $s1, $s2, $l"; diff --git a/t/40-vshift.t b/t/40-vshift.t index b45ffc1..1877677 100644 --- a/t/40-vshift.t +++ b/t/40-vshift.t @@ -67,7 +67,7 @@ sub try { my @s = ($p - $q) .. ($p + $q); for my $s (@s) { for my $l (0 .. $n - 1) { - last if $s + $l > $n; + next if $s + $l > $n; rst $v0; pat $v0, $s, $l, 0; my @b = (0); diff --git a/t/50-vrot.t b/t/50-vrot.t index d897762..523946a 100644 --- a/t/50-vrot.t +++ b/t/50-vrot.t @@ -93,7 +93,7 @@ sub try { my @s = ($p - $q) .. ($p + $q); for my $s (@s) { for my $l (0 .. $n - 1) { - last if $s + $l > $n; + next if $s + $l > $n; my $l2 = int($l/2); rst $v0; pat $v0, $s, $l2, $l - $l2, 0;