summaryrefslogtreecommitdiff
path: root/cpan/Scalar-List-Utils
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-10-22 08:42:00 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2016-10-22 15:51:18 -0400
commit3ad3fb7edd9a5db1e0cf38ad50a84824ef641c39 (patch)
tree19b0e9872284e861fa3e289152f867ee848053d8 /cpan/Scalar-List-Utils
parent5b15f36c4b1c5025dccabeef937495997e37e512 (diff)
downloadperl-3ad3fb7edd9a5db1e0cf38ad50a84824ef641c39.tar.gz
Scalar-List-Utils: netbsd-vax: no inf/nan
Diffstat (limited to 'cpan/Scalar-List-Utils')
-rw-r--r--cpan/Scalar-List-Utils/t/uniq.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpan/Scalar-List-Utils/t/uniq.t b/cpan/Scalar-List-Utils/t/uniq.t
index 5a6925d1f5..e47b407f0d 100644
--- a/cpan/Scalar-List-Utils/t/uniq.t
+++ b/cpan/Scalar-List-Utils/t/uniq.t
@@ -70,6 +70,10 @@ is_deeply( [ uniqnum qw( 1 1.1 1.2 1.3 ) ],
[ 1, 1.1, 1.2, 1.3 ],
'uniqnum distinguishes floats' );
+SKIP: {
+my $vax_float = (pack("d",1) =~ /^[\x80\x10]\x40/);
+skip("VAX does not have inf/nan", 1) if $vax_float;
+
# Hard to know for sure what an Inf is going to be. Lets make one
my $Inf = 0 + 1E1000;
my $NaN;
@@ -78,6 +82,7 @@ $Inf **= 1000 while ( $NaN = $Inf - $Inf ) == $NaN;
is_deeply( [ uniqnum 0, 1, 12345, $Inf, -$Inf, $NaN, 0, $Inf, $NaN ],
[ 0, 1, 12345, $Inf, -$Inf, $NaN ],
'uniqnum preserves the special values of +-Inf and Nan' );
+}
{
my $maxint = ~0;