xref: /openbsd-src/gnu/usr.bin/perl/cpan/Math-BigInt/t/calling-constant.t (revision 256a93a44f36679bee503f12e49566c2183f6181)
1# -*- mode: perl; -*-
2
3use strict;
4use warnings;
5use lib 't';
6
7use Test::More tests => 1;
8
9my ($x, $expected, $try);
10
11my $class = 'Math::BigInt';
12
13# test whether :constant works or not
14
15$try = qq|use $class 0, "bgcd", ":constant";|
16     . q| $x = 2**150; bgcd($x); $x = "$x";|;
17$expected = eval $try;
18is($expected, "1427247692705959881058285969449495136382746624", $try);
19