Commit | Line | Data |
b2b106d7 |
1 | #!/usr/bin/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; |
b2b106d7 |
5 | |
6 | use strict; |
7 | use warnings; |
8 | |
fde8e43f |
9 | use Test::More; |
b2b106d7 |
10 | use Test::Exception; |
11 | |
12 | BEGIN { |
13 | use_ok('Mouse::Util::TypeConstraints'); |
14 | } |
15 | |
16 | { |
17 | package Some::Class; |
18 | use Mouse::Util::TypeConstraints; |
19 | |
20 | subtype 'MySubType' => as 'Int' => where { 1 }; |
21 | } |
22 | |
23 | throws_ok { |
24 | package Some::Other::Class; |
25 | use Mouse::Util::TypeConstraints; |
26 | |
27 | subtype 'MySubType' => as 'Int' => where { 1 }; |
28 | } qr/cannot be created again/, 'Trying to create same type twice throws'; |
29 | |
fde8e43f |
30 | done_testing; |