Skip to content

Commit a4ed986

Browse files
committed
Test for some Junction stringifications
1 parent fe84061 commit a4ed986

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

S03-junctions/misc.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 99;
5+
plan 101;
66

77
=begin pod
88
@@ -408,6 +408,16 @@ ok Mu & Mu ~~ Mu, 'Mu & Mu ~~ Mu works';
408408
ok %h{all(0,1)} ~~ /^foo/,
409409
'junction can be used to index Hash';
410410
}
411+
# stringy tests
412+
{
413+
my class Foo {
414+
multi method gist(Foo:D:) { "gisted"; }
415+
multi method perl(Foo:D:) { "perled"; }
416+
multi method Str(Foo:D:) { "Stred"; }
417+
}
418+
is any(Foo.new).perl, 'any(perled)', 'any(Foo.new).perl';
419+
is any(Foo.new).gist, 'any(gisted)', 'any(Foo.new).gist';
420+
}
411421

412422
done();
413423

0 commit comments

Comments
 (0)