1#!/usr/bin/env perl 2use strict; 3use warnings; 4 5use Test::More; 6use Math::Prime::Util qw/valuation/; 7 8#my $extra = defined $ENV{EXTENDED_TESTING} && $ENV{EXTENDED_TESTING}; 9#my $usexs = Math::Prime::Util::prime_get_config->{'xs'}; 10#my $usegmp= Math::Prime::Util::prime_get_config->{'gmp'}; 11#my $use64 = Math::Prime::Util::prime_get_config->{'maxbits'} > 32; 12#$use64 = 0 if $use64 && 18446744073709550592 == ~0; 13 14my @valuations = ( 15 [-4,2, 2], 16 [0,0, 0], 17 [1,0, 0], 18 [96552,6, 3], 19 [1879048192,2, 28], 20 ["65520150907877741108803406077280119039314703968014509493068998974809747144832",2, 7], 21); 22 23plan tests => scalar(@valuations); 24 25###### valuation 26foreach my $r (@valuations) { 27 my($n, $k, $exp) = @$r; 28 is( valuation($n, $k), $exp, "valuation($n,$k) = $exp" ); 29} 30