Permalink
Browse files

Test for some Junction stringifications

  • Loading branch information...
1 parent fe84061 commit a4ed986d226b9e6bb8fd769621edc70809528812 @lumimies lumimies committed Nov 23, 2011
Showing with 11 additions and 1 deletion.
  1. +11 −1 S03-junctions/misc.t
View
12 S03-junctions/misc.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 99;
+plan 101;
=begin pod
@@ -408,6 +408,16 @@ ok Mu & Mu ~~ Mu, 'Mu & Mu ~~ Mu works';
ok %h{all(0,1)} ~~ /^foo/,
'junction can be used to index Hash';
}
+# stringy tests
+{
+ my class Foo {
+ multi method gist(Foo:D:) { "gisted"; }
+ multi method perl(Foo:D:) { "perled"; }
+ multi method Str(Foo:D:) { "Stred"; }
+ }
+ is any(Foo.new).perl, 'any(perled)', 'any(Foo.new).perl';
+ is any(Foo.new).gist, 'any(gisted)', 'any(Foo.new).gist';
+}
done();

0 comments on commit a4ed986

Please sign in to comment.