Skip to content

Commit

Permalink
Update test to latest spec; remove a Rakudo fudging.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jul 30, 2011
1 parent baa7d6f commit bcd4217
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions S02-builtin_data_types/undefined-types.t
Expand Up @@ -30,26 +30,25 @@ plan 23;
is $i, 8, '... block executed';
}

#?rakudo skip 'Stringy'
{
my $obj;
my Int $int;

is ~$obj, '', 'prefix:<~> on type object gives empty string (Mu)';
is ~$obj, '', 'prefix:<~> on type object gives empty string (Any)';
is ~$int, '', 'prefix:<~> on type object gives empty string (Int)';
is $obj.Stringy, '', '.Stringy on type object gives empty string (Mu)';
is $obj.Stringy, '', '.Stringy on type object gives empty string (Any)';
is $int.Stringy, '', '.Stringy on type object gives empty string (Int)';

ok (~$obj) ~~ Stringy, 'prefix:<~> returns a Stringy (Mu)';
ok (~$obj) ~~ Stringy, 'prefix:<~> returns a Stringy (Any)';
ok (~$int) ~~ Stringy, 'prefix:<~> returns a Stringy (Int)';

ok $obj.Stringy ~~ Stringy, '.Stringy returns a Stringy (Mu)';
ok $obj.Stringy ~~ Stringy, '.Stringy returns a Stringy (Any)';
ok $int.Stringy ~~ Stringy, '.Stringy returns a Stringy (Int)';

is $obj.Str, 'Mu()', '.Str on type object gives Mu()';
is $int.Str, 'Int()', '.Str on type object gives Int()';
is $obj.gist, 'Any()', '.gist on type object gives Any()';
is $int.gist, 'Int()', '.gist on type object gives Int()';

is 'a' ~ $obj, 'a', 'infix:<~> uses coercion to Stringy (Mu)';
is 'a' ~ $obj, 'a', 'infix:<~> uses coercion to Stringy (Any)';
is 'a' ~ $int, 'a', 'infix:<~> uses coercion to Stringy (Int)';
}

Expand Down

0 comments on commit bcd4217

Please sign in to comment.