X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F040_type_constraints%2Ffailing%2F001_util_type_constraints.t;fp=t-failing%2F040_type_constraints%2F001_util_type_constraints.t;h=a928ff561b36de25f8c00e594430915211b1d91a;hb=9864f0e4ba233c5f30ad6dc7c484ced43d883d27;hp=9c53dab0aa72528ce88e47003981aee6d10def87;hpb=8845df4dd6432e3164d078ade741409061adae9f;p=gitmo%2FMouse.git diff --git a/t-failing/040_type_constraints/001_util_type_constraints.t b/t/040_type_constraints/failing/001_util_type_constraints.t similarity index 95% rename from t-failing/040_type_constraints/001_util_type_constraints.t rename to t/040_type_constraints/failing/001_util_type_constraints.t index 9c53dab..a928ff5 100644 --- a/t-failing/040_type_constraints/001_util_type_constraints.t +++ b/t/040_type_constraints/failing/001_util_type_constraints.t @@ -1,17 +1,15 @@ #!/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; -$TODO = q{Mouse is not yet completed}; +use Test::More tests => 85; use Test::Exception; use Scalar::Util (); +use lib 't/lib'; +use Test::Mouse; use Mouse::Util::TypeConstraints; @@ -108,7 +106,7 @@ ok(!$natural->has_message, '... it does not have a message'); ok(!defined($natural->validate(5)), '... validated successfully (no error)'); is($natural->validate(-5), - "Validation failed for 'Natural' with value -5", + "Validation failed for 'Natural' failed with value -5", '... validated unsuccessfully (got error)'); my $string = find_type_constraint('String'); @@ -198,11 +196,6 @@ throws_ok {$r->add_type_constraint(bless {}, 'SomeClass')} qr/not a valid type c # sugar was indistinguishable from calling directly. { - no warnings 'redefine'; - *Mouse::Deprecated::deprecated = sub { return }; -} - -{ my $type = type( 'Number2', sub { Scalar::Util::looks_like_number($_) } ); ok( $type->check(5), '... this is a Num' ); @@ -234,4 +227,3 @@ throws_ok {$r->add_type_constraint(bless {}, 'SomeClass')} qr/not a valid type c ok( ! $subtype->check('Foo'), '... this is not a Natural'); } -done_testing;