summaryrefslogtreecommitdiff
path: root/lib/Math/BigInt/t/alias.inc
blob: b17f317fd2b851c8a9d2c9bab843826034886c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12

# alias subroutine testing, included by sub_ali.t and mbi_ali.t

my $x = $CL->new(123);

is ($x->is_pos(), 1, '123 is positive');
is ($x->is_neg(), 0, '123 is not negative');
is ($x->as_int(), 123, '123 is 123 as int');
is (ref($x->as_int()), $CL, "as_int(123) is of class '$CL'");
$x->bneg();
is ($x->is_pos(), 0, '-123 is not positive');
is ($x->is_neg(), 1, '-123 is negative');