### ----------------------------------------------------
### -- Prime::Factor
### -- Licenses: Artistic-2.0
### -- Authors: Steve Schulze (thundergnat)
### -- File: t/04-sums.rakutest
### ----------------------------------------------------
use v6;
use Test;
use Prime::Factor;

plan 100;

for 1,1,2,3,3,4,4,7,5,6,6,12,7,8,8,15,9,13,10,18,11,12,12,28,13,14,
    14,24,15,24,16,31,17,18,18,39,19,20,20,42,21,32,22,36,23,24,24,60,
    25,31,26,42,27,40,28,56,29,30,30,72,31,32,32,63,33,48,34,54,35,48,
    36,91,37,38,38,60,39,56,40,90,41,42,42,96,43,44,44,84,45,78,46,72,
    47,48,48,124,49,57,50,93 -> $n, $s {
    is-deeply( sigma-sum($n), $s, "Sigma-sum of $n")
}

for 1,0,2,1,3,1,4,3,5,1,6,6,7,1,8,7,9,4,10,8,11,1,12,16,13,1,
    14,10,15,9,16,15,17,1,18,21,19,1,20,22,21,11,22,14,23,1,
    24,36,25,6,26,16,27,13,28,28,29,1,30,42,31,1,32,31,33,15,
    34,20,35,13,36,55,37,1,38,22,39,17,40,50,41,1,42,54,43,1,
    44,40,45,33,46,26,47,1,48,76,49,8,50,43 -> $n, $s {
    is-deeply( aliquot-sum($n), $s, "Aliquot-sum of $n")
}

done-testing;


