Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove crufty test
(predates Z?)
  • Loading branch information
coke committed Apr 5, 2012
1 parent 33dfaa3 commit d0c47d3
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions S04-statements/given.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 53;
plan 51;

=begin pod
Expand Down Expand Up @@ -57,30 +57,6 @@ Tests the given block, as defined in L<S04/"Switch statements">
ok $match, 'regex in when-clause set match object';
};


# from apocalypse 4
#?rakudo skip 'parsefail on each(... ; ...)'
#?niecza skip 'each'
{
# simple example L<S04/"Switch statements" /You don't have to use an explicit default/>
for each(("T", "E", 5) ; (10, 11, 5)) -> $digit, $expected {
my $result_a = do given $digit {
when "T" { 10 }
when "E" { 11 }
$digit
};

my $result_b = do given $digit {
when "T" { 10 }
when "E" { 11 }
default { $digit }
};

is($result_a, $expected, "result of $digit using implicit default {} is $expected");
is($result_b, $expected, "result of $digit using explicit default {} is $expected");
}
}

{
# interleaved code L<S04/"Switch statements" /which may or may not be a when statement/>
my ($b_one, $b_two, $b_three, $panic);
Expand Down

0 comments on commit d0c47d3

Please sign in to comment.