projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
initialize the metaclass when calling ->does
[gitmo/Moose.git]
/
t
/
type_constraints
/
util_find_type_constraint.t
1
#!/usr/bin/perl
2
3
use strict;
4
use warnings;
5
6
use Test::More;
7
8
BEGIN {
9
use_ok('Moose::Util::TypeConstraints');
10
}
11
12
foreach my $type_name (qw(
13
Any
14
Item
15
Bool
16
Undef
17
Defined
18
Value
19
Num
20
Int
21
Str
22
Ref
23
ScalarRef
24
ArrayRef
25
HashRef
26
CodeRef
27
RegexpRef
28
Object
29
)) {
30
is(find_type_constraint($type_name)->name,
31
$type_name,
32
'... got the right name for ' . $type_name);
33
}
34
35
# TODO:
36
# add tests for is_subtype_of which confirm the hierarchy
37
38
done_testing;