import more Method::Signatures tests
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures / comments.t
1 #!perl
2 use strict;
3 use warnings FATAL => 'all';
4
5 use Test::More
6         eval { require Moose; 1 }
7         ? (tests => 2)
8         : (skip_all => "Moose required for testing types")
9 ;
10 use Test::Fatal;
11
12 use Function::Parameters qw(:strict);
13
14
15 is exception
16 {
17     eval q{
18         fun foo (
19             Int :$foo,              # this is foo
20             Int :$bar               # this is bar
21         )
22         {
23         }
24
25         1;
26     } or die;
27 }, undef,
28 'survives comments within the signature itself';
29
30 is exception
31 {
32     eval q{
33         fun bar ( Int :$foo, Int :$bar )       # this is a signature
34         {
35         }
36
37         1;
38     } or die;
39 }, undef,
40 'survives comments between signature and open brace';
41
42 #SKIP:
43 #{
44 #    eval { require MooseX::Declare } or skip "MooseX::Declare required for this test", 1;
45 #
46 #    lives_ok
47 #    {
48 #        eval q{
49 #            use MooseX::Declare;
50 #            use Method::Signatures::Modifiers;
51 #
52 #            class Foo
53 #            {
54 #                method bar ( Int :$foo, Int :$bar )     # this is a signature
55 #                {
56 #                }
57 #            }
58 #
59 #            1;
60 #        } or die;
61 #    }
62 #    'survives comments between signature and open brace';
63 #}
64 #
65 #
66 #done_testing();