xref: /openbsd/gnu/usr.bin/perl/cpan/bignum/t/in_effect.t (revision 09467b48)
1#!perl
2
3###############################################################################
4# Test in_effect()
5
6use strict;
7use warnings;
8
9use Test::More tests => 9;
10
11use bigint;
12use bignum;
13use bigrat;
14
15can_ok('bigint', qw/in_effect/);
16can_ok('bignum', qw/in_effect/);
17can_ok('bigrat', qw/in_effect/);
18
19SKIP: {
20    skip('Need at least Perl v5.9.4', 3) if $] < "5.009005";
21
22    is(bigint::in_effect(), 1, 'bigint in effect');
23    is(bignum::in_effect(), 1, 'bignum in effect');
24    is(bigrat::in_effect(), 1, 'bigrat in effect');
25}
26
27{
28    no bigint;
29    no bignum;
30    no bigrat;
31
32    is(bigint::in_effect(), undef, 'bigint not in effect');
33    is(bignum::in_effect(), undef, 'bignum not in effect');
34    is(bigrat::in_effect(), undef, 'bigrat not in effect');
35}
36