Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test X::Attribute::Package and X::Attribute::NoPackage

  • Loading branch information...
commit 6467df25fa05c6f02648b4aa685c1edb4cc34fee 1 parent 8988efd
@moritz moritz authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 S32-exceptions/misc.t
View
7 S32-exceptions/misc.t
@@ -26,12 +26,12 @@ sub throws_like($code, $ex_type, *%matcher) {
unless $ok {
diag "Got: $got\n"
~"Expected: $v";
-
}
}
} else {
diag "Got: {$_.WHAT.gist}\n"
~"Expected: {$ex_type.gist}";
+ diag "Exception message: $_.message()";
skip 'wrong exception type', %matcher.elems;
}
}
@@ -76,7 +76,7 @@ throws_like 'my class A { }; my class A { }', X::Redeclaration, symbol => 'A';
throws_like 'my class B { }; my subset B { }', X::Redeclaration, symbol => 'B';
throws_like 'CATCH { }; CATCH { }', X::Phaser::Multiple, block => 'CATCH';
-throws_like 'class A { my @a; @a!List::foo() }',
+throws_like 'my class A { my @a; @a!List::foo() }',
X::Method::Private::Permission,
method => 'foo',
calling-package => 'A',
@@ -135,4 +135,7 @@ throws_like 'self', X::Syntax::Self::WithoutObject;
throws_like 'class { has $.x = $.y }', X::Syntax::VirtualCall, call => '$.y';
throws_like '$.a', X::Syntax::NoSelf, variable => '$.a';
+throws_like 'has $.x', X::Attribute::NoPackage;
+throws_like 'my module A { has $.x }', X::Attribute::Package, package-type => 'module';
+
done;
Please sign in to comment.
Something went wrong with that request. Please try again.