summaryrefslogtreecommitdiff
path: root/t/01load.t
blob: 1d9eff9e9f90b65e52cfe4864a5d6af713d5780e (plain)
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
# -*- mode: perl; -*-

use strict;             # restrict unsafe constructs
use warnings;           # enable optional warnings

use Test::More tests => 2;

BEGIN {
    use_ok('Math::BigInt::GMP');
    use_ok('Math::BigInt');         # Math::BigInt is required for the tests
};

my @mods = ('Math::BigInt::GMP',
            'Math::BigInt');

diag("");
diag("Testing with Perl $], $^X");
diag("");
diag(sprintf("%12s %s\n", 'Version', 'Module'));
diag(sprintf("%12s %s\n", '-------', '------'));
for my $mod (@mods) {
    my $ver = $mod -> VERSION();
    my $str = defined($ver) ? $ver : 'undef';
    diag(sprintf("%12s %s\n", $str, $mod));
}

diag("");
diag(sprintf("%12s %s\n", 'Version', 'Library'));
diag(sprintf("%12s %s\n", '-------', '-------'));
my $GMP_version = Math::BigInt::GMP::gmp_version();
diag(sprintf("%12s %s\n", $GMP_version || '-', 'GMP'));
diag("");