File: upgrade2.t

package info (click to toggle)
libmath-bigint-perl 1.999838-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,424 kB
  • sloc: perl: 10,236; pascal: 5,387; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 432 bytes parent folder | download
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');