Skip to content

Commit

Permalink
more Type() -> (Type) gistification
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Feb 23, 2013
1 parent bb83c9a commit 0512ff9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion S02-types/native.t
Expand Up @@ -71,7 +71,7 @@ plan 25;
# RT #102256
{
isa_ok int, Mu, 'int ~~ Mu';
is num.gist, 'num()', 'num.gist';
is num.gist, '(num)', 'num.gist';
nok str.defined, 'str.defined';
}

Expand Down
2 changes: 1 addition & 1 deletion S06-multi/unpackability.t
Expand Up @@ -24,7 +24,7 @@ is foo(1,2,3,4), "four", "multi dispatch on slurpy packed with four elements";
multi sub bar ([$a,$b?]) { return "$a|$b.gist()" }
multi sub bar (*[$a,$b,$c?]) { return "$a+$b+$c" }

is bar(@a), "1|Any()", "multi dispatch on array packed with one required element + no optional";
is bar(@a), "1|(Any)", "multi dispatch on array packed with one required element + no optional";
is bar(@b), "1|2", "multi dispatch on array packed with one required element + one optional";
is bar(1,2,3), "1+2+3", "multi dispatch on slurpy packed with two required element + one optional";

Expand Down
4 changes: 2 additions & 2 deletions S06-signature/unpack-array.t
Expand Up @@ -24,8 +24,8 @@ sub baz([$x, $y?, $z?]) {
}

dies_ok { baz( [] ) } , 'unpack optional scalars; required scalar missing';
is baz( [2] ), "2|Any()|Any()", 'unpack optional scalars; one required';
is baz( [2,3] ), "2|3|Any()", 'unpack optional scalars; one required + one optional';
is baz( [2] ), "2|(Any)|(Any)", 'unpack optional scalars; one required';
is baz( [2,3] ), "2|3|(Any)", 'unpack optional scalars; one required + one optional';
is baz( [2,3,4] ), "2|3|4", 'unpack optional scalars; one required + two optional';
dies_ok { baz( [2,3,4,5] ) }, 'unpack optional scalars; one required + too many optional';

Expand Down
2 changes: 1 addition & 1 deletion S12-class/lexical.t
Expand Up @@ -30,7 +30,7 @@ eval_dies_ok '{ my class B {}; B.new; }; B.new',
ok $pint ~~ WeissBier, 'can smart-match against lexical class';
is $pint.name, 'Erdinger', 'attribute in lexical class works';
is $pint.describe, 'outstanding flavour', 'method call on lexical class works';
is WeissBier.gist, 'WeissBier()', 'lexical type object stringifies correct';
is WeissBier.gist, '(WeissBier)', 'lexical type object stringifies correct';

my class LessThanAmazingWeissBier is WeissBier {
method describe() { 'tastes like sweetcorn' }
Expand Down
2 changes: 1 addition & 1 deletion S12-enums/basic.t
Expand Up @@ -50,7 +50,7 @@ enum Day <Sun Mon Tue Wed Thu Fri Sat>;
is Day::Mon.key, 'Mon', '.key on long form of Enum value';
is Mon.key, 'Mon', '.key on short form of Enum value';

is Day::Mon.WHAT.gist, 'Day()', '.WHAT.gist on enum value stringifies to the enum name';
is Day::Mon.WHAT.gist, '(Day)', '.WHAT.gist on enum value stringifies to the enum name';
}

{
Expand Down

0 comments on commit 0512ff9

Please sign in to comment.