File: buildopt.t

package info (click to toggle)
libmath-mpfr-perl 4.45-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,716 kB
  • sloc: perl: 1,508; ansic: 517; makefile: 9
file content (39 lines) | stat: -rwxr-xr-x 1,307 bytes parent folder | download | duplicates (7)
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
36
37
38
39
use warnings;
use strict;
use Math::MPFR qw(:mpfr);

print "1..4\n";

print  "# Using Math::MPFR version ", $Math::MPFR::VERSION, "\n";
print  "# Using mpfr library version ", MPFR_VERSION_STRING, "\n";
print  "# Using gmp library version ", Math::MPFR::gmp_v(), "\n";

if(MPFR_VERSION_MAJOR >= 3) {
  if(defined(Rmpfr_buildopt_tls_p())) {print "ok 1\n"}
  else {print "not ok 1\n"}
  if(defined(Rmpfr_buildopt_decimal_p())) {print "ok 2\n"}
  else {print "not ok 2\n"}
}
else {
  eval{Rmpfr_buildopt_tls_p();};
  if($@ =~ /Rmpfr_buildopt_tls_p not implemented/) {print "ok 1\n"}
  else {print "not ok 1\n"}
  eval{Rmpfr_buildopt_decimal_p();};
  if($@ =~ /Rmpfr_buildopt_decimal_p not implemented/) {print "ok 2\n"}
  else {print "not ok 2\n"}
}

if((MPFR_VERSION_MAJOR == 3 && MPFR_VERSION_MINOR >= 1) || MPFR_VERSION_MAJOR > 3) {
  if(defined(Rmpfr_buildopt_tune_case())) {print "ok 3\n"}
  else {print "not ok 3\n"}
  if(defined(Rmpfr_buildopt_gmpinternals_p())) {print "ok 4\n"}
  else {print "not ok 4\n"}
}
else {
  eval{Rmpfr_buildopt_tune_case();};
  if($@ =~ /Rmpfr_buildopt_tune_case not implemented/) {print "ok 3\n"}
  else {print "not ok 3\n"}
  eval{Rmpfr_buildopt_gmpinternals_p();};
  if($@ =~ /Rmpfr_buildopt_gmpinternals_p not implemented/) {print "ok 4\n"}
  else {print "not ok 4\n"}
}