Skip to content

Commit

Permalink
t/op/infnan.t: Remove enclosing eval in "-Inf" to IV conversion test
Browse files Browse the repository at this point in the history
As per review by @hvds in GH #19404, this test file doesn't have to worry
about whether `use integer` might fail.
  • Loading branch information
t-a-k committed Feb 12, 2022
1 parent 8ecd4e6 commit a99bf55
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions t/op/infnan.t
Expand Up @@ -578,9 +578,6 @@ cmp_ok('-1e-9999', '==', 0, "underflow to 0 (runtime) from neg");

# "-Inf" should be converted to IV consistently
{
# Enclosed in a string eval so that majority of infnan.t are run
# before loading integer.pm, just in case.
eval <<'EOC';
use integer;
my $x = '-Inf';
my $y = $NInf; # $NInf and $y shall be NV -Inf
Expand All @@ -589,7 +586,6 @@ cmp_ok('-1e-9999', '==', 0, "underflow to 0 (runtime) from neg");
# $z shall be IV_MIN here, but as the actual value of IV_MIN is not
# (easily) available in Perl so check its negative-ness as the next best.
cmp_ok($z, '<', 0, "'-Inf' should be converted to a negative IV");
EOC
}

done_testing();

0 comments on commit a99bf55

Please sign in to comment.