summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/bignum/t/in_effect.t
blob: b4507ea54aad01c38ff11d15a6e4aacd0c27cc3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!perl

###############################################################################
# Test in_effect()

use strict;
use warnings;

use Test::More tests => 9;

use bigint;
use bignum;
use bigrat;

can_ok('bigint', qw/in_effect/);
can_ok('bignum', qw/in_effect/);
can_ok('bigrat', qw/in_effect/);

SKIP: {
    skip('Need at least Perl v5.9.4', 3) if $] < "5.009005";

    is(bigint::in_effect(), 1, 'bigint in effect');
    is(bignum::in_effect(), 1, 'bignum in effect');
    is(bigrat::in_effect(), 1, 'bigrat in effect');
}

{
    no bigint;
    no bignum;
    no bigrat;

    is(bigint::in_effect(), undef, 'bigint not in effect');
    is(bignum::in_effect(), undef, 'bignum not in effect');
    is(bigrat::in_effect(), undef, 'bigrat not in effect');
}