#!/usr/bin/perl
+# This is automatically generated by author/import-moose-test.pl.
+# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
+use t::lib::MooseCompat;
use strict;
use warnings;
-use Test::More tests => 8; # tests => 26;
+use Test::More;
+$TODO = q{Mouse is not yet completed};
use Test::Exception;
-use lib 't/lib';
-use MooseCompat;
-
BEGIN {
- use_ok('Mouse::Util::TypeConstraints');
+ use_ok('Mouse::Util::TypeConstraints');
}
{
=> via { HTTPHeader->new(hash => $_[0]) };
} 'coercion of anonymous subtype succeeds';
-=pod
-
foreach my $coercion (
find_type_constraint('Header')->coercion,
$anon_type->coercion
) {
+
isa_ok($coercion, 'Mouse::Meta::TypeCoercion');
{
}
}
-=cut
-
subtype 'StrWithTrailingX'
=> as 'Str'
=> where { /X$/ };
my $tc = find_type_constraint('StrWithTrailingX');
is($tc->coerce("foo"), "fooX", "coerce when needed");
is($tc->coerce("fooX"), "fooX", "do not coerce when unneeded");
+
+done_testing;