Moose used an incorrect cast at the C-level resulting in errors with >2**32 IV's...
[gitmo/Mouse.git] / t / 900_bug / 005_more_than_32_bit_int_on_32_bit_systems.t
1 package MyInteger;
2 use Mouse;
3
4 has a_int => (
5     is => 'rw',
6     isa => 'Int',
7 );
8
9 has a_num => (
10     is => 'rw',
11     isa => 'Num',
12 );
13
14 package main;
15 use Test::More tests => 212 * 2;
16
17 for (my $i = 1; $i <= 10e100; $i += $i * 2) {
18     my $int = MyInteger->new( a_int => $i )->a_int;
19     cmp_ok($int, '==', $i, "Mouse groked the Int $i");
20
21     my $num = MyInteger->new( a_num => $i )->a_num;
22     cmp_ok($num, '==', $i, "Mouse groked the Num $i");
23 }