From: Steve Peters Date: Sat, 11 Feb 2006 14:16:45 +0000 (+0000) Subject: Test to go with change #27155. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=669ffa903665df001970da4ac0e76e0b64d36fab;p=p5sagit%2Fp5-mst-13.2.git Test to go with change #27155. p4raw-link: @27155 on //depot/perl: ece1bcefc6e1d5c666cb173e3db4fb5c6663a8b9 p4raw-id: //depot/perl@27158 --- diff --git a/lib/integer.t b/lib/integer.t index 946103d..5c353b3 100644 --- a/lib/integer.t +++ b/lib/integer.t @@ -7,7 +7,7 @@ BEGIN { use integer; -use Test::More tests => 11; +use Test::More tests => 12; use Config; my $x = 4.5; @@ -51,3 +51,14 @@ SKIP: { } is(~0, -1, "signed instead of unsigned"); + +# [perl #38485] use integer; 0x80000000/-1; +SKIP: { + my $ivsize = $Config{ivsize}; + skip "ivsize == $ivsize", 2 unless $ivsize == 4 || $ivsize == 8; + + my $iv_min = $ivsize == 4 ? -2147483648 : -9223372036854775808; + my $biff; + eval { $biff = $iv_min / -1 }; + like($@, qr/Integer overflow in division/, "Caught IV_MIN / -1"); +}