diff options
author | Steve Peters <steve@fisharerojo.org> | 2006-02-11 14:16:45 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-02-11 14:16:45 +0000 |
commit | 669ffa903665df001970da4ac0e76e0b64d36fab (patch) | |
tree | 57103fa7788a8fe43474a40637185f5522e2d4c0 /lib/integer.t | |
parent | ece1bcefc6e1d5c666cb173e3db4fb5c6663a8b9 (diff) | |
download | perl-669ffa903665df001970da4ac0e76e0b64d36fab.tar.gz |
Test to go with change #27155.
p4raw-link: @27155 on //depot/perl: ece1bcefc6e1d5c666cb173e3db4fb5c6663a8b9
p4raw-id: //depot/perl@27158
Diffstat (limited to 'lib/integer.t')
-rw-r--r-- | lib/integer.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/integer.t b/lib/integer.t index 946103d8d1..5c353b348c 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"); +} |