Skip to content

Commit

Permalink
Revert "More tests for malformed loops"
Browse files Browse the repository at this point in the history
This reverts commit 1b0b309.
  • Loading branch information
AlexDaniel committed May 4, 2020
1 parent 1b0b309 commit 71ed05c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions S32-exceptions/misc.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use lib $?FILE.IO.parent(2).add("packages");
use Test;
use Test::Util;

plan 175;
plan 171;

# RT #77270
throws-like 'sub foo(--> NoSuchType) { }; foo', X::Undeclared, what => { m/'Type'/ }, symbol => { m/'NoSuchType'/ };
Expand Down Expand Up @@ -286,12 +286,7 @@ throws-like 'for ^5 { return; }', X::ControlFlow::Return;
throws-like 'return;', X::ControlFlow::Return;

# RT #125595
throws-like 'loop (my $i = 0; $i <= 5; $i++;) { say $i }', X::Syntax::Malformed, what => /^'loop spec'/;
# RT #127857
throws-like 'loop () { say $i }', X::Syntax::Malformed, what => /^'loop spec' .* 'semicolon'/;
throws-like 'loop (my $i = 0, $i <= 5, $i++) { say $i }', X::Syntax::Malformed, what => /^'loop spec' .* 'got 1'/;
throws-like 'loop (my $i = 0; $i <= 5, $i++) { say $i }', X::Syntax::Malformed, what => /^'loop spec' .* 'got 2'/;
throws-like 'loop (my $i = 0; $i <= 5; $i++; $i++) { say $i }', X::Syntax::Malformed, what => /^'loop spec' .* 'got more'/;
throws-like 'loop (my $i = 0; $i <= 5; $i++;) { say $i }', X::Syntax::Malformed, what => 'loop spec';

# RT #115398
throws-like 'my package P { }; P[Int]', X::NotParametric;
Expand Down

0 comments on commit 71ed05c

Please sign in to comment.