use warnings;
use Test::More;
-use Test::Fatal;
+use Test::Exception;
BEGIN {
use_ok("Moose::Util::TypeConstraints");
}
-ok ! exception {
+lives_ok {
subtype 'MyCollections' => as 'ArrayRef | HashRef';
-}, '... created the subtype special okay';
+} '... created the subtype special okay';
{
my $t = find_type_constraint('MyCollections');
ok(!$t->check(1), '... validated it correctly');
}
-ok ! exception {
+lives_ok {
subtype 'MyCollectionsExtended'
=> as 'ArrayRef|HashRef'
=> where {
}
1;
};
-}, '... created the subtype special okay';
+} '... created the subtype special okay';
{
my $t = find_type_constraint('MyCollectionsExtended');