removed redundant stuff in xt/, which is now part of Devel::Declare
[Method-Signatures-Simple.git] / t / 01-parse-proto.t
blob82fb5f705dfa184f80786ac7a7818603c9218e83
2 use strict;
3 use warnings;
5 use Test::More tests => 10;
7 my $mss = 'Method::Signatures::Simple';
8 use_ok $mss;
9 my $inst = $mss->new(invocant => '$self');
11 my @tests = (
12     [''               => [ qr'my \$self = shift;'                                   ]],
13     ['$class: %opts'  => [ qr'my \$class = shift;', qr'my \(\%opts\) = \@_;'        ]],
14     ['@stuff'         => [ qr'my \$self = shift;',  qr'my \(\@stuff\) = \@_;'       ]],
15     ['$foo, $bar'     => [ qr'my \$self = shift;',  qr'my \(\$foo, \$bar\) = \@_;'  ]],
16     ["$/foo, $/bar$/" => [ qr'my \$self = shift;',  qr'my \(foo, bar\) = \@_;'      ]],
19 for my $t (@tests) {
20     my $p = $inst->parse_proto($t->[0]);
21     for my $match (@{$t->[1]}) {
22         like $p, $match; # , "$t->[0] matches $match";
23     }