Resolve some TODO tests about type constraints
[gitmo/Mouse.git] / t / 040_type_constraints / 029_define_type_twice_throws.t
CommitLineData
b2b106d7 1#!/usr/bin/perl
5a592ad7 2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
b2b106d7 5
6use strict;
7use warnings;
8
5a592ad7 9use Test::More;
b2b106d7 10use Test::Exception;
11
12BEGIN {
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
23throws_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
5a592ad7 30done_testing;