Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix CPAN RT #147612. The "perl Makefile.PL" step would fail if Math::GMPz was not installed. - Add test file t/02gmpcompat.t to verify that the GMP library is compatible, i.e., recent enough.
- Loading branch information
Showing
4 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- mode: perl; -*- | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Test::More tests => 2; | ||
|
||
#use Math::GMPz 0.36 qw< :mpz >; | ||
BEGIN { use_ok("Math::GMPz", 0.36, ":mpz") } | ||
|
||
# We need GMP 5.1.0 or newer for Rmpz_2fac_ui(). | ||
|
||
# It might be that Math::GMPz was built with a newer version of GMP than the | ||
# one that is currently available. Checking Math::GMPz::gmp_v() won't help, | ||
# since it seems to return the version of GMP used when Math::GMPz was built, | ||
# not the version of GMP that is currently available. | ||
|
||
# If Rmpz_2fac_ui() is not implemented, Math::GMPz dies with the message: | ||
# "Rmpz_2fac_ui not implemented - gmp-5.1.0 (or later) is needed" | ||
|
||
eval { my $x = Rmpz_init(); Rmpz_2fac_ui($x, 0); }; | ||
ok(! $@, "gmp-5.1.0 (or later) is available") or diag <<"EOF" | ||
The version of the GMP library that is used by Math::GMPz is too old. | ||
EOF |