Skip to content

Commit

Permalink
fix up traits and importing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed May 8, 2012
1 parent 95257ca commit 17368d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion S11-modules/importing.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ plan 15;
is( waz(), 'Foo::waz', 'Foo::waz is the sub we expect' );
is( waz(1), 'Foo::wazhere', 'Foo::waz imported does not wipe out our other waz multis' );

#?rakudo 2 todo 'importing stuff'
dies_ok { eval 'qux()' }, 'qux() not imported';
dies_ok { eval 'gaz()' }, 'gaz() not imported';
}
Expand Down
12 changes: 6 additions & 6 deletions S14-traits/routines.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ plan(10);
has $.description is rw;
}

multi trait_mod:<is>(Routine $code, description, $arg) {
$code does description($arg);
multi trait_mod:<is>(Routine $code, description, $arg) {
$code does description($arg)
}
multi trait_mod:<is>(Routine $code, description) {
$code does description("missing description!");
$code does description('missing description!')
}
multi trait_mod:<is>(Routine $code, $arg, :$described!) {
$code does description($arg);
multi trait_mod:<is>(Routine $code, Str :$described!) {
$code does description($described);
}
multi trait_mod:<is>(Routine $code, :$described!) {
multi trait_mod:<is>(Routine $code, Bool :$described!) {
$code does description("missing description!");
}

Expand Down
5 changes: 2 additions & 3 deletions integration/advent2009-day12.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BEGIN {
{
eval_lives_ok 'use Fancy::Utilities', 'Can use Fancy::Utilities';

use Fancy::Utilities;
use Fancy::Utilities :greet;
is Fancy::Utilities::lolgreet('Tene'), 'O HAI TENE', 'Referencing subs by fullname works';
is lolgreet('Jnthn'), 'O HAI JNTHN', 'Exporting symbols works';
}
Expand All @@ -27,13 +27,12 @@ BEGIN {
nok nicegreet('Jnthn'), 'Good morning, Jnthn!', 'Cannot use a sub not explicitly imported';
}

#?rakudo skip "Importing all symbols using :ALL doesn't work in current Rakudo"
{
eval_lives_ok 'use Fancy::Utilities :ALL;', 'Can import everything marked for export using :ALL';

use Fancy::Utilities :ALL;
#?pugs todo
is lolrequest("Cake"), 'I CAN HAZ A cake?', 'Can use a sub marked as exported and imported via :ALL';
is lolrequest("Cake"), 'I CAN HAZ A CAKE?', 'Can use a sub marked as exported and imported via :ALL';
}

#?rakudo skip "Multi subs aren't imported by default in current Rakudo - is this to spec?"
Expand Down

0 comments on commit 17368d0

Please sign in to comment.