Commit | Line | Data |
67199842 |
1 | #!/usr/bin/env perl |
fde8e43f |
2 | # This is automatically generated by author/import-moose-test.pl. |
3 | # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! |
4 | use t::lib::MooseCompat; |
67199842 |
5 | use strict; |
6 | use warnings; |
fde8e43f |
7 | use Test::More; |
67199842 |
8 | use Mouse (); |
9 | |
10 | do { |
11 | package My::Meta::Role; |
12 | use Mouse; |
13 | extends 'Mouse::Meta::Role'; |
14 | |
15 | has test_serial => ( |
16 | is => 'ro', |
17 | isa => 'Int', |
18 | default => 1, |
19 | ); |
20 | |
21 | no Mouse; |
22 | }; |
23 | |
24 | my $role = My::Meta::Role->create_anon_role; |
25 | is($role->test_serial, 1, "default value for the serial attribute"); |
26 | |
27 | my $nine_role = My::Meta::Role->create_anon_role(test_serial => 9); |
28 | is($nine_role->test_serial, 9, "parameter value for the serial attribute"); |
29 | |
fde8e43f |
30 | done_testing; |