Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GLR tweaks to advent 2012 days 03 & 09
  • Loading branch information
dwarring committed Aug 22, 2015
1 parent 08eeb00 commit 59b6d26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion integration/advent2012-day03.t
Expand Up @@ -31,7 +31,7 @@ class Widget {

$remaining-space -= [+] @static-sizes;

$unspecified-size = ([-] $remaining-space, @dynamic-sizes».($remaining-space))
$unspecified-size = ([-] $remaining-space, @dynamic-sizes».($remaining-space).Slip)
/ $nb-unspecified;

.compute-layout($remaining-space, $unspecified-size) for @!sub-widgets;
Expand Down
12 changes: 6 additions & 6 deletions integration/advent2012-day09.t
Expand Up @@ -4,7 +4,7 @@ use Test;
plan 8;

is ~("food and drink" ~~ / foo | food /), 'food', 'ltm';
is ~("food and drink" ~~ / foo || food /), 'foo', 'first alternantive';
is ~("food and drink" ~~ / foo || food /), 'foo', 'first alternative';

grammar Letter {
rule text { <greet> $<body>=<line>+? <close> }
Expand All @@ -20,10 +20,10 @@ my $informal-letter = "Yo Cabal,
Informal body text.
Later dude, Random Hacker";

my $p = Letter.parse($informal-letter, :rule<text>);
is ~$p, $informal-letter, 'informal letter parse';
my @p = Letter.parse($informal-letter, :rule<text>);
is ~@p, $informal-letter, 'informal letter parse';

for $p -> $/ {
for @p -> $/ {
is ~$<greet><to>, 'Cabal', 'informal letter greet';
is ~$<close><from>, 'Random Hacker', 'informal letter close';
}
Expand All @@ -37,5 +37,5 @@ my $formal-letter = "Dear Perl6,
Formal body text.
Yours sincerely, Tester";

$p = FormalLetter.parse($formal-letter, :rule<text>);
is ~$p, $formal-letter, 'formal letter parse';
@p = FormalLetter.parse($formal-letter, :rule<text>);
is ~@p, $formal-letter, 'formal letter parse';

0 comments on commit 59b6d26

Please sign in to comment.