Skip to content

Commit e50ae20

Browse files
author
Конрад Боровски
committed
Merge pull request #27 from amire80/bug82308_signature_smartmatch_tests
Add a test for smartmatching Signature and Signature
2 parents 5efc2af + 748aace commit e50ae20

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

S03-smartmatch/signature-signature.t

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use v6;
2+
use Test;
3+
plan 5;
4+
5+
#L<S03/Smart matching/Signature-signature>
6+
{
7+
ok (:(Str) ~~ :(Str)), 'signature :(Str) is the same as :(Str)';
8+
ok !(:(Str) ~~ :(Int)), 'signature :(Str) is not the same as :(Int)';
9+
ok (:(Str, Int) ~~ :(Str, Int)), 'signature :(Str, Int) is the same as :(Str, Int)';
10+
ok !(:(Str, Int) ~~ :(Int, Str)), 'signature :(Str, Int) is not the same as :(Int, Str)';
11+
ok !(:(Str, Int) ~~ :(Str, Int, Str)), 'signature :(Str, Int) is not the same as :(Str, Int, Str)';
12+
}
13+
14+
done;
15+
16+
# vim: ft=perl6

0 commit comments

Comments
 (0)