Skip to content

Commit

Permalink
[construction.t] Added tests for an unreported bug fixed in Rakudo 03…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodi Arfer authored and Kodi Arfer committed Nov 10, 2010
1 parent 4d4775e commit 91b1991
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion S12-construction/construction.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 15;
plan 19;

# L<S12/"Construction and Initialization">

Expand Down Expand Up @@ -66,6 +66,18 @@ is Foo.new("a string").a, 'a string', "our own 'new' was called";
is $foo.x[0], 3, "... and keeps its value properly."
}

# Test for a bug fixed in Rakudo 037775eb.
{
class SeqAttr { has $.x };
my $f = { SeqAttr.new: :$^x };

my $o = $f(<a b>);
isa_ok $o, SeqAttr, 'Created SeqAttr object';
isa_ok $o.x, Seq, '...with a Seq attribute';
is ($o.x)[0], 'a', '...with the right first element';
is ($o.x)[1], 'b', '...and the right second element.';
}

# RT #64116
{
class RT64116 { has %.env is rw };
Expand Down

0 comments on commit 91b1991

Please sign in to comment.