This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Re: 'if not / unless' optimization change makes my pow test go POW!
[perl5.git]
/
t
/
op
/
lop.t
diff --git
a/t/op/lop.t
b/t/op/lop.t
index
a78ac72
..
2c2d2a6
100755
(executable)
--- a/
t/op/lop.t
+++ b/
t/op/lop.t
@@
-9,7
+9,7
@@
BEGIN {
@INC = '../lib';
}
@INC = '../lib';
}
-print "1..
9
\n";
+print "1..
11
\n";
my $test = 0;
for my $i (undef, 0 .. 2, "", "0 but true") {
my $test = 0;
for my $i (undef, 0 .. 2, "", "0 but true") {
@@
-48,7
+48,18
@@
$i = !$x || $y;
print "not " unless $i == 8;
print "ok ", ++$test, "\n";
print "not " unless $i == 8;
print "ok ", ++$test, "\n";
-
($x, $y) = (0, 9)
;
-$i = !$x
&&
$y;
+
++$y
;
+$i = !$x
|| !$x || !$x ||
$y;
print "not " unless $i == 9;
print "ok ", ++$test, "\n";
print "not " unless $i == 9;
print "ok ", ++$test, "\n";
+
+$x = 0;
+++$y;
+$i = !$x && $y;
+print "not " unless $i == 10;
+print "ok ", ++$test, "\n";
+
+++$y;
+$i = !$x && !$x && !$x && $y;
+print "not " unless $i == 11;
+print "ok ", ++$test, "\n";