X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F024-isa.t;h=670a611a7587185f7d9769bcd17d66ce9503bb51;hb=e8b3db47ed7f906cc4ad294d2a28b36656a3c333;hp=476ab0cc5eb7f3f8369a5fbc449ccc1ced379365;hpb=dfaf3196b3695d135ee2ea6a9dbd653de9a4b68d;p=gitmo%2FMouse.git diff --git a/t/024-isa.t b/t/024-isa.t index 476ab0c..670a611 100644 --- a/t/024-isa.t +++ b/t/024-isa.t @@ -3,6 +3,7 @@ use strict; use warnings; use Test::More; use Test::Exception; +use IO::Handle; my @types = qw/Any Item Bool Undef Defined Value Num Int Str ClassName Ref ScalarRef ArrayRef HashRef CodeRef RegexpRef GlobRef @@ -10,9 +11,9 @@ my @types = qw/Any Item Bool Undef Defined Value Num Int Str ClassName my @type_values = ( undef , [qw/Any Item Undef Bool/], - 0 => [qw/Any Item Defined Bool Value Num Int/], - 1 => [qw/Any Item Defined Bool Value Num Int/], - 1.5 => [qw/Any Item Defined Value Num/], + 0 => [qw/Any Item Defined Bool Value Num Int Str/], + 1 => [qw/Any Item Defined Bool Value Num Int Str/], + 1.5 => [qw/Any Item Defined Value Num Str/], '' => [qw/Any Item Defined Bool Value Str/], 't' => [qw/Any Item Defined Value Str/], 'f' => [qw/Any Item Defined Value Str/], @@ -26,7 +27,9 @@ my @type_values = ( {} => [qw/Any Item Defined Ref HashRef/], sub { die } => [qw/Any Item Defined Ref CodeRef/], qr/.*/ => [qw/Any Item Defined Ref RegexpRef/], + \*main::ok => [qw/Any Item Defined Ref GlobRef/], \*STDOUT => [qw/Any Item Defined Ref GlobRef FileHandle/], + IO::Handle->new => [qw/Any Item Defined Ref Object FileHandle/], Test::Builder->new => [qw/Any Item Defined Ref Object/], ); @@ -81,7 +84,7 @@ for my $type (@types) { } for my $value (@{ $values_for_type{$type}{invalid} }) { - my $display = defined($value) ? $value : 'undef'; + my $display = defined($value) ? overload::StrVal($value) : 'undef'; my $via_new; throws_ok { $via_new = Class->new($type => $value);