Skip to content

Commit 4970aba

Browse files
committed
[euler] add tests for problems 288, 329 and 539
1 parent cfc205a commit 4970aba

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

t/categories/euler.t

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 62;
5+
plan 65;
66

77
my $skip = %*ENV<PERL6_EXAMPLES_NOSKIP> ?? False !! True;
88

@@ -687,6 +687,36 @@ unless $skip {
687687
}, "prob189";
688688
}
689689

690+
subtest {
691+
plan 1;
692+
693+
my $problem = "prob288";
694+
my @authors = <shlomif>;
695+
my $expected-output = "Solution == 594452426380733382";
696+
697+
check-example-solutions($problem, $expected-output, @authors)
698+
}, "prob288";
699+
700+
subtest {
701+
plan 1;
702+
703+
my $problem = "prob329";
704+
my @authors = <shlomif>;
705+
my $expected-output = "199740353/29386561536000";
706+
707+
check-example-solutions($problem, $expected-output, @authors)
708+
}, "prob329";
709+
710+
subtest {
711+
plan 1;
712+
713+
my $problem = "prob539";
714+
my @authors = <shlomif>;
715+
my $expected-output = "S(1000000000000000000) = 271051139927967385167988795568221935 (mod = 426334056)";
716+
717+
check-example-solutions($problem, $expected-output, @authors)
718+
}, "prob539";
719+
690720
#| check examples provided by the given authors
691721
sub check-example-solutions($problem, $expected-output, @authors, Bool :$strip_debug = True) {
692722
for @authors -> $author {

0 commit comments

Comments
 (0)