summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2005-12-13 13:54:44 +0000
committerGisle Aas <gisle@activestate.com>2005-12-13 13:54:44 +0000
commit45e52d633a4db0d7507f9a59668e6ca1d9771e8b (patch)
treeed45597b6f428de3c24b81a3e280e51bfa8b2129
parent2b37efcc2bc957549bbeb5c71adf3fced634e4c9 (diff)
downloadperl-45e52d633a4db0d7507f9a59668e6ca1d9771e8b.tar.gz
Remove tests that were not portable to 64bit ints.
p4raw-id: //depot/perl@26342
-rw-r--r--t/op/sprintf2.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t
index 5c00b2a2a7..754470538d 100644
--- a/t/op/sprintf2.t
+++ b/t/op/sprintf2.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 283;
+plan tests => 275;
is(
sprintf("%.40g ",0.01),
@@ -36,7 +36,7 @@ fresh_perl_is(
);
# check overflows
-for (int(~0/2+1), ~0, ~0 + 1, ~0 + 2, "9999999999999999999") {
+for (int(~0/2+1), ~0, "9999999999999999999") {
is(eval {sprintf "%${_}d", 0}, undef, "no sprintf result expected %${_}d");
like($@, qr/^Integer overflow in format string for sprintf /, "overflow in sprintf");
is(eval {printf "%${_}d\n", 0}, undef, "no printf result expected %${_}d");
@@ -55,7 +55,7 @@ for (int(~0/2+1), ~0, ~0 + 1, ~0 + 2, "9999999999999999999") {
}
};
- my $fmt = join('', map("%$_\$s%" . int(~0/2+1-$_) . '$s', 1..20));
+ my $fmt = join('', map("%$_\$s%" . ((1 << 31)-$_) . '$s', 1..20));
my $result = sprintf $fmt, qw(a b c d);
is($result, "abcd", "only four valid values in $fmt");
is($warn, 36, "expected warnings");