1#!/usr/bin/perl -w
2
3# test BigFloat constants alone (w/o BigInt loading)
4
5use strict;
6use Test;
7
8BEGIN
9  {
10  $| = 1;
11  # to locate the testing files
12  my $location = $0; $location =~ s/const_mbf.t//i;
13  if ($ENV{PERL_CORE})
14    {
15    # testing with the core distribution
16    @INC = qw(../t/lib);
17    }
18  unshift @INC, qw(../lib);
19  if (-d 't')
20    {
21    chdir 't';
22    require File::Spec;
23    unshift @INC, File::Spec->catdir(File::Spec->updir, $location);
24    }
25  else
26    {
27    unshift @INC, $location;
28    }
29  print "# INC = @INC\n";
30
31  plan tests => 2;
32  if ($] < 5.006)
33    {
34    for (1..2) { skip (1,'Not supported on older Perls'); }
35    exit;
36    }
37  } 
38
39use Math::BigFloat ':constant';
40
41ok (1.0 / 3.0, '0.3333333333333333333333333333333333333333');
42
43# BigInt was not loadede with ':constant', so only floats are handled
44ok (ref(2 ** 2),'');
45
46