update foreign tests
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures / larna.t
CommitLineData
633048d5 1#!perl
2use strict;
3use warnings FATAL => 'all';
4
5use Test::More;
6
7use Function::Parameters qw(:strict);;
8
1a52f2db 9{
10 my $a;
11 ok eval q{ $a = [ fun () {}, 1 ]; 1 }, 'anonymous function in list is okay'
633048d5 12 or diag "eval error: $@";
1a52f2db 13 is ref $a->[0], "CODE";
14 is $a->[1], 1;
15}
633048d5 16
1a52f2db 17{
18 my $a;
19 ok eval q{ $a = [ method () {}, 1 ]; 1 }, 'anonymous method in list is okay'
633048d5 20 or diag "eval error: $@";
1a52f2db 21 is ref $a->[0], "CODE";
22 is $a->[1], 1;
23}
633048d5 24
25done_testing;