update foreign tests
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures-Simple / RT80505.t
CommitLineData
1a52f2db 1#!perl
2use strict;
3use warnings FATAL => 'all';
4use Test::More tests => 2;
5
6{
7 package My::Obj;
8 use Function::Parameters qw(:strict);
9 method new () {
10 bless {}, $self;
11 }
12 method foo (
13 $x, # the X
14 $y, # the Y
15 ) {
16 return $x * $y;
17 }
18 my $bar = method (
19 $P, # comment
20 $Q, # comment
21 ) { # comment
22 $P + $Q
23 };
24}
25
26my $o = My::Obj->new;
27is $o->foo(4, 5), 20, "should allow comments and newlines in proto";
28is __LINE__, 28, "should leave line number intact";
29
30__END__