Skip to content

Commit

Permalink
Merge pull request #130 from craigberry/master
Browse files Browse the repository at this point in the history
Don't loop forever in uniqnum.t
  • Loading branch information
leonerd authored Aug 6, 2024
2 parents cc7ff2b + e394a95 commit 2d93c95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/uniqnum.t
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ is_deeply( [ uniqnum @in],
# Hard to know for sure what an Inf is going to be. Lets make one
my $Inf = 0 + 1E1000;
my $NaN;
$Inf **= 1000 while ( $NaN = $Inf - $Inf ) == $NaN;
for (1..10) {
$Inf **= 1000;
last unless ( $NaN = $Inf - $Inf ) == $NaN;
}

is_deeply( [ uniqnum 0, 1, 12345, $Inf, -$Inf, $NaN, 0, $Inf, $NaN ],
[ 0, 1, 12345, $Inf, -$Inf, $NaN ],
Expand Down

0 comments on commit 2d93c95

Please sign in to comment.