1 # See also http://rt.cpan.org/Public/Bug/Display.html?id=55048
3 use Test::More tests => 24;
20 foreach my $i(2**32, 2**40, 2**46) {
22 my $value = $i * $sig;
24 my $int = MyInteger->new( a_int => $value )->a_int;
25 cmp_ok($int, '==', $value, "Mouse groked the Int $i");
28 my $num = MyInteger->new( a_num => $value )->a_num;
29 cmp_ok($num, '==', $value, "Mouse groked the Num $i");
33 eval { MyInteger->new( a_int => $value ) };
34 like $@, qr/does not pass the type constraint/, "Mouse does not regard $value as Int";
35 eval { MyInteger->new( a_num => $value ) };
36 is $@, '', "Mouse regards $value as Num";