projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Also run the special Str tests on the types that descend from Str (tests still pass).
[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
Role
30
)) {
31
is(find_type_constraint($type_name)->name,
32
$type_name,
33
'... got the right name for ' . $type_name);
34
}
35
36
# TODO:
37
# add tests for is_subtype_of which confirm the hierarchy
38
39
done_testing;