update foreign tests
[p5sagit/Function-Parameters.git] / t / foreign / MooseX-Method-Signatures / too_many_args.t
CommitLineData
595edbcf 1#!perl
2use strict;
3use warnings FATAL => 'all';
4use Test::More;
5use Test::Fatal;
6
7{
8 package Foo;
9 use Function::Parameters qw(:strict);
10
1a52f2db 11 method new($class:) { bless {}, $class }
595edbcf 12 method foo ($bar) { $bar }
13}
14
15my $o = Foo->new;
16is(exception { $o->foo(42) }, undef);
17like(exception { $o->foo(42, 23) }, qr/Too many arguments/);
18
19done_testing;