Commit | Line | Data |
6ea98933 |
1 | use strict; |
2 | use warnings; |
3 | |
a28e50e4 |
4 | use Test::More; |
6ea98933 |
5 | |
6 | use Moose::Util::TypeConstraints; |
7 | |
8 | |
9 | eval { Moose::Util::TypeConstraints::create_type_constraint_union() }; |
10 | |
11 | like( $@, qr/\QYou must pass in at least 2 type names to make a union/, |
12 | 'can throw a proper error without Moose being loaded by the caller' ); |
a28e50e4 |
13 | |
8aab053a |
14 | eval { Moose::Util::TypeConstraints::create_type_constraint_intersection() }; |
15 | |
16 | like( $@, qr/\QYou must pass in at least 2 type names to make an intersection/, |
17 | 'can throw a proper error without Moose being loaded by the caller' ); |
18 | |
a28e50e4 |
19 | done_testing; |