Commits

Shlomi Fish committed d5c71bd

Add a test in Euler77 and fixed a bug.

  • Participants
  • Parent commits c608038

Comments (0)

Files changed (2)

project-euler/77/Euler77.pm

 
             get_combinations(
                 [$max_prime], 
-                $max_prime, 
+                $max_prime_idx, 
                 $sum-$max_prime, 
                 \@combinations
             );

project-euler/77/euler77.t

 use strict;
 use warnings;
 
-use Test::More tests => 4;
+use Test::More tests => 5;
 
 use Euler77;
 
     "4 == { [2,3], [5] }",
 );
 
+# TEST
+is (get_num_primes_combinations(10), 5,
+    "10 == {[7,3], [5, 5], [5, 3, 2], [3, 3, 2, 2], [2, 2, 2, 2, 2]}",
+);
+