Skip to content

Commit

Permalink
[t/spec] account for the fact that subs are lexical by default; fudge…
Browse files Browse the repository at this point in the history
… an integration test for rakudo

git-svn-id: http://svn.pugscode.org/pugs@30269 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Apr 2, 2010
1 parent 9e4ba28 commit decd043
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions integration/99problems-31-to-40.t
Expand Up @@ -63,7 +63,7 @@ plan 67;
# Yet, it should be possible to define it even for commutative rings
# other than Integers, so we use a multi sub.

multi sub gcd(Int $a, Int $b){
our multi sub gcd(Int $a, Int $b){
return $a if $b == 0;
return gcd($b,$a % $b);
}
Expand Down Expand Up @@ -138,7 +138,7 @@ plan 67;
#
# Hint: The problem is similar to problem P13.

sub prime_factors_mult(Int $n is copy){
our sub prime_factors_mult(Int $n is copy){
return () if $n == 1;
my $count = 0;
my $cond = 2;
Expand Down Expand Up @@ -217,13 +217,14 @@ plan 67;
skip 1, 'No Benchmark module yet'
}

#?rakudo skip 'unknown problems'
{
# P39 (*) A list of prime numbers.
#
# Given a range of integers by its lower and upper limit, construct a list of all
# prime numbers in that range.

sub primes($from, $to) {
our sub primes($from, $to) {
my @p = (2);
for 3..$to -> $x {
push @p, $x unless grep { $x % $_ == 0 }, 2..ceiling sqrt $x;
Expand All @@ -235,6 +236,7 @@ plan 67;
is primes(16,100), (17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97), "a few more.";
}

#?rakudo skip 'unknown problems'
{
# P40 (**) Goldbach's conjecture.
#
Expand Down

0 comments on commit decd043

Please sign in to comment.