Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pull/115'
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jan 28, 2017
2 parents 798d9ba + 3e0c33c commit d670481
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions S26-documentation/block-trailing.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 327;
plan 334;

my $pod_index = 0;

Expand Down Expand Up @@ -72,16 +72,19 @@ test-trailing(&panther, 'pink');
class Sheep {
#={a sheep}
has $.wool; #={usually white}
has $.sound = 'baa'; #=(usually quiet)

method roar { 'roar!' }
#={not too scary}
}

{
my $wool-attr = Sheep.^attributes.grep({ .name eq '$!wool' })[0];
my $sound-attr = Sheep.^attributes.grep({ .name eq '$!sound' })[0];
my $roar-method = Sheep.^find_method('roar');
test-trailing(Sheep, 'a sheep');
test-trailing($wool-attr, 'usually white');
test-trailing($sound-attr, 'usually quiet');
test-trailing($roar-method, 'not too scary');
}

Expand Down Expand Up @@ -145,7 +148,7 @@ sub so-many-params(
{
my @params = &so-many-params.signature.params;
test-trailing(@params[0], 'first param');
ok !@params[1].WHY.defined, 'the second parameter has no comments'
ok !@params[1].WHY.defined, 'the second parameter has no comments'
or diag(@params[1].WHY.contents);
}

Expand Down
7 changes: 5 additions & 2 deletions S26-documentation/why-trailing.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 348;
plan 355;

my $pod_index = 0;

Expand Down Expand Up @@ -64,16 +64,19 @@ test-trailing(&panther, 'pink');
class Sheep {
#= a sheep
has $.wool; #= usually white
has $.sound is rw = "baa"; #= usually quiet

method roar { 'roar!' }
#= not too scary
}

{
my $wool-attr = Sheep.^attributes.grep({ .name eq '$!wool' })[0];
my $sound-attr = Sheep.^attributes.grep({ .name eq '$!sound' })[0];
my $roar-method = Sheep.^lookup('roar');
test-trailing(Sheep, 'a sheep');
test-trailing($wool-attr, 'usually white');
test-trailing($sound-attr, 'usually quiet');
test-trailing($roar-method, 'not too scary');
}

Expand Down Expand Up @@ -137,7 +140,7 @@ sub so-many-params(
{
my @params = &so-many-params.signature.params;
test-trailing(@params[0], 'first param');
ok !@params[1].WHY.defined, 'the second parameter has no comments'
ok !@params[1].WHY.defined, 'the second parameter has no comments'
or diag(@params[1].WHY.contents);
}

Expand Down

0 comments on commit d670481

Please sign in to comment.