From: M. J. T. Guy Date: Tue, 18 Apr 2000 18:24:49 +0000 (+0100) Subject: Do not assume sign propagation. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=85e0ebd8793b17cfbac766abc03b5fff57b2b2cd;p=p5sagit%2Fp5-mst-13.2.git Do not assume sign propagation. Subject: [PATCH] Re: [ID 20000410.010] Unicoss 10.0.0.6 and perl 5.6.0 To: payner@ncifcrf.gov, perl5-porters@perl.org Message-Id: p4raw-id: //depot/cfgperl@5935 --- diff --git a/t/op/bop.t b/t/op/bop.t index 7bcabdf..22a5bc9 100755 --- a/t/op/bop.t +++ b/t/op/bop.t @@ -39,7 +39,7 @@ print (((1 << ($bits - 1)) == $cusp && do { use integer; 1 << ($bits - 1) } == -$cusp) ? "ok 11\n" : "not ok 11\n"); print ((($cusp >> 1) == ($cusp / 2) && - do { use integer; $cusp >> 1 } == -($cusp / 2)) + do { use integer; abs($cusp >> 1) } == ($cusp / 2)) ? "ok 12\n" : "not ok 12\n"); $Aaz = chr(ord("A") & ord("z")); diff --git a/t/op/misc.t b/t/op/misc.t index ac1a44f..41a7202 100755 --- a/t/op/misc.t +++ b/t/op/misc.t @@ -59,12 +59,12 @@ $a = ":="; split /($a)/o, "a:=b:=c"; print "@_" EXPECT a := b := c ######## -use integer; $cusp = ~0 ^ (~0 >> 1); +use integer; $, = " "; -print +($cusp - 1) % 8, $cusp % 8, -$cusp % 8, ($cusp + 1) % 8, "!\n"; +print +($cusp - 1) % 8, $cusp % 8, -$cusp % 8, 8 | (($cusp + 1) % 8 + 7), "!\n"; EXPECT --1 0 0 1 ! +7 0 0 8 ! ######## $foo=undef; $foo->go; EXPECT