Skip to content

Commit

Permalink
update test file
Browse files Browse the repository at this point in the history
  • Loading branch information
thundergnat committed Jun 25, 2016
1 parent 860e6e8 commit 90c56df
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions t/00-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ use Test;
use Prime::Factor;

for '', 'a', .5, pi, 0, -12 -> $p {
dies-ok { factors($p) }, "Dies ok with bad parameter $p";
dies-ok { prime-factors($p) }, "Dies ok with bad parameter $p";
}

is factors(1), (), 'factors of 1 returns nothing ok';
is factors(2), (2), 'factors 2 ok';
is factors(7), (7), 'factors 7 ok';
is factors(12), (2,2,3), 'factors 12 ok';
is factors(25), (5,5), 'factors 25 ok';
is factors(2016), (2,2,2,2,2,3,3,7), 'factors 2016 ok';
is factors(123899765), (5,11,11,204793), 'factors 123899765 ok';
is factors(2**100-1), (3,5,5,5,11,31,41,101,251,601,1801,4051,8101,268501),
is prime-factors(1), (), 'factors of 1 returns nothing ok';
is prime-factors(2), (2), 'factors 2 ok';
is prime-factors(7), (7), 'factors 7 ok';
is prime-factors(12), (2,2,3), 'factors 12 ok';
is prime-factors(25), (5,5), 'factors 25 ok';
is prime-factors(2016), (2,2,2,2,2,3,3,7), 'factors 2016 ok';
is prime-factors(123899765), (5,11,11,204793), 'factors 123899765 ok';
is prime-factors(2**100-1), (3,5,5,5,11,31,41,101,251,601,1801,4051,8101,268501),
'factors 2**100-1 ok';

done-testing;

0 comments on commit 90c56df

Please sign in to comment.