X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F040_type_constraints%2F023_types_and_undef.t;h=f2766889893570f15fca6767ba73f8bd3c465669;hb=9864f0e4ba233c5f30ad6dc7c484ced43d883d27;hp=281877474536cfaf13d2fc760cc12e4a3d6534c8;hpb=8845df4dd6432e3164d078ade741409061adae9f;p=gitmo%2FMouse.git diff --git a/t/040_type_constraints/023_types_and_undef.t b/t/040_type_constraints/023_types_and_undef.t index 2818774..f276688 100644 --- a/t/040_type_constraints/023_types_and_undef.t +++ b/t/040_type_constraints/023_types_and_undef.t @@ -1,14 +1,12 @@ #!/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; +use Test::More tests => 54; use Test::Exception; +use t::lib::MooseCompat; { package Foo; @@ -44,28 +42,28 @@ Mouse::Util::TypeConstraints->export_type_constraints_as_functions; ok( Undef(undef), '... undef is a Undef'); ok(!Defined(undef), '... undef is NOT a Defined'); -ok(!Int(undef), '... undef is NOT an Int'); +ok(!Int(undef), '... undef is NOT a Int'); ok(!Number(undef), '... undef is NOT a Number'); ok(!Str(undef), '... undef is NOT a Str'); ok(!String(undef), '... undef is NOT a String'); ok(!Undef(5), '... 5 is a NOT a Undef'); ok(Defined(5), '... 5 is a Defined'); -ok(Int(5), '... 5 is an Int'); +ok(Int(5), '... 5 is a Int'); ok(Number(5), '... 5 is a Number'); ok(Str(5), '... 5 is a Str'); ok(!String(5), '... 5 is NOT a String'); ok(!Undef(0.5), '... 0.5 is a NOT a Undef'); ok(Defined(0.5), '... 0.5 is a Defined'); -ok(!Int(0.5), '... 0.5 is NOT an Int'); +ok(!Int(0.5), '... 0.5 is NOT a Int'); ok(Number(0.5), '... 0.5 is a Number'); ok(Str(0.5), '... 0.5 is a Str'); ok(!String(0.5), '... 0.5 is NOT a String'); ok(!Undef('Foo'), '... "Foo" is NOT a Undef'); ok(Defined('Foo'), '... "Foo" is a Defined'); -ok(!Int('Foo'), '... "Foo" is NOT an Int'); +ok(!Int('Foo'), '... "Foo" is NOT a Int'); ok(!Number('Foo'), '... "Foo" is NOT a Number'); ok(Str('Foo'), '... "Foo" is a Str'); ok(String('Foo'), '... "Foo" is a String'); @@ -110,4 +108,6 @@ dies_ok { $foo->v_lazy_Number() } '... undef is NOT a Foo->Number'; dies_ok { $foo->v_lazy_Str() } '... undef is NOT a Foo->Str'; dies_ok { $foo->v_lazy_String() } '... undef is NOT a Foo->String'; -done_testing; + + +