Permalink
Browse files

test X::Assignment::RO, and add tests for RT #113534

  • Loading branch information...
1 parent 6625f6f commit 61b24d9ec3be76a3dc7f0ec27a4cfc35154c0b56 @moritz moritz committed Jun 6, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 S32-exceptions/misc.t
@@ -213,6 +213,14 @@ throws_like 'sub f() returns Str { 5 }; f', X::TypeCheck::Return, got => Int, ex
throws_like 'my Int $x = "foo"', X::TypeCheck::Assignment, got => 'foo',
expected => Int, symbol => '$x';
+throws_like 'sub f() { }; f() = 3', X::Assignment::RO;
+throws_like '1.0 = 3', X::Assignment::RO;
+# RT #113534
+#?rakudo 3 skip '113534'
+throws_like '120 = 3', X::Assignment::RO;
+throws_like '1e0 = 3', X::Assignment::RO;
+throws_like '"a" = 3', X::Assignment::RO;
+
throws_like '1.foo', X::Method::NotFound, method => 'foo', typename => 'Int';
throws_like 'my class NC { }; NC.new does NC', X::Mixin::NonComposable,
:target(*.defined), :rolish(*.^name eq 'NC');

0 comments on commit 61b24d9

Please sign in to comment.