import some (modified) MXMS tests
[p5sagit/Function-Parameters.git] / t / foreign / MooseX-Method-Signatures / no_signature.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 method new($class:) { bless {}, $class }
11 method bar { 42 }
12}
13
14my $foo = Foo->new;
15
16is(exception {
17 $foo->bar
18}, undef, 'method without signature succeeds when called without args');
19
20is(exception {
21 $foo->bar(42)
22}, undef, 'method without signature succeeds when called with args');
23
24done_testing;