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
CommitLineData
1f1ccccd 1package MyInteger;
2use Mouse;
3
4has a_int => (
5 is => 'rw',
6 isa => 'Int',
7);
8
9has a_num => (
10 is => 'rw',
11 isa => 'Num',
12);
13
14package main;
15use Test::More tests => 212 * 2;
16
17for (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}