summaryrefslogtreecommitdiff
path: root/cpan/Math-BigInt/t/upgrade2.t
blob: 28ecdbb50b637e15e09c974cf7787fd702a89233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- mode: perl; -*-

use strict;
use warnings;

# Test 2 levels of upgrade classes. This used to cause a segv.

use Test::More tests => 1;

use Math::BigInt upgrade => 'Math::BigFloat';
use Math::BigFloat upgrade => 'Math::BigMouse';

no warnings 'once';
@Math::BigMouse::ISA = 'Math::BigFloat';
sub Math::BigMouse::bsqrt {};

() = sqrt Math::BigInt->new(2);
pass('sqrt on a big int does not segv if there are 2 upgrade levels');