Skip to content

Commit

Permalink
[t/spec] more variable declaration fixes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@25275 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Feb 10, 2009
1 parent e704067 commit 41f65ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions S12-methods/trusts.t
Expand Up @@ -44,19 +44,19 @@ class B {
my ($foo, @bar, %baz);

try {
$foo = $an_A!A::foo;
$foo = $!an_A!A::foo;
};
is( $!.defined ?? 1 !! 0, 0, 'A trusts B, B can get an A scalar attr; '~($!//''), :todo<feature> );
is( $foo, 'hello', 'value read by B from an A scalar var is correct', :todo<feature> );

try {
@bar = $an_A!A::bar;
@bar = $!an_A!A::bar;
};
is( $!.defined ?? 1 !! 0, 0, 'A trusts B, B can get an A array attr; '~($!//''), :todo<feature> );
is_deeply( @bar, [1,2,3], 'value read by B from an A scalar var is correct', :todo<feature> );

try {
%baz = $an_A!A::baz;
%baz = $!an_A!A::baz;
};
is( $!.defined ?? 1 !! 0, 0, 'A trusts B, B can get an A hash attr; '~($!//''), :todo<feature> );
is_deeply( %baz, {'m'=>'v'}, 'value read by B from an A scalar var is correct', :todo<feature> );
Expand Down
7 changes: 3 additions & 4 deletions S16-unfiled/slurp.t
Expand Up @@ -26,10 +26,9 @@ my $self = 't/spec/S16-unfiled/slurp.t';
}

# slurp in list context
{
my @slurped_lines = lines(open($self));
ok +@slurped_lines > 30, "more than 30 lines in this file ?";
}

my @slurped_lines = lines(open($self));
ok +@slurped_lines > 30, "more than 30 lines in this file ?";

#?rakudo skip 'infix:<orelse>'
{
Expand Down
4 changes: 2 additions & 2 deletions S29-hash/kv.t
Expand Up @@ -68,8 +68,8 @@ sub test2{
my $type = %pair.WHAT;
my $elems= +%pair;
for %pair.kv -> $key, $value {
is($key, 'boo', "test2: $elems-elem $type \%pair got the right \$key");
is($value, 'baz', "test2: $elems-elem $type \%pair got the right \$value");
is($key, 'boo', "test2: $elems elem $type \%pair got the right \$key");
is($value, 'baz', "test2: $elems elem $type \%pair got the right \$value");
}
}
test2;
Expand Down

0 comments on commit 41f65ff

Please sign in to comment.