diff options
author | Kevin Ryde <user42@zip.com.au> | 2003-12-31 01:00:50 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2003-12-31 01:00:50 +0100 |
commit | b97a76798f205cbc80258d2047f4987743068ba6 (patch) | |
tree | e453062a68ebf2f8ada55ad036d9f8f5d7c6d4ba /demos | |
parent | eac69226dd52c40d871e85b55d5c26836ab8502a (diff) | |
download | gmp-b97a76798f205cbc80258d2047f4987743068ba6.tar.gz |
* demos/perl/GMP.xs (scan0, scan1): Return ~0 for not-found.
* demos/perl/test.pl: Update tests.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/perl/test.pl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/demos/perl/test.pl b/demos/perl/test.pl index 6490a0b19..d8f5d9616 100644 --- a/demos/perl/test.pl +++ b/demos/perl/test.pl @@ -105,8 +105,6 @@ my $ivnv_2p128 = 65536.0 * 65536.0 * 65536.0 * 65536.0 kill (0, $ivnv_2p128); my $str_2p128 = '340282366920938463463374607431768211456'; -my $ulong_max = ~ 0; - my $uv_max = ~ 0; my $uv_max_str = ~ 0; $uv_max_str = "$uv_max_str"; @@ -950,8 +948,8 @@ ok (root(243,5) == 3); ok (scan0 (0, 0) == 0); ok (scan0 (1, 0) == 1); ok (scan0 (3, 0) == 2); -ok (scan0 (-1, 0) == $ulong_max); -ok (scan0 (-2, 1) == $ulong_max); +ok (scan0 (-1, 0) == ~0); +ok (scan0 (-2, 1) == ~0); #------------------------------------------------------------------------------ # GMP::Mpz::scan1 @@ -959,8 +957,8 @@ ok (scan0 (-2, 1) == $ulong_max); ok (scan1 (1, 0) == 0); ok (scan1 (2, 0) == 1); ok (scan1 (4, 0) == 2); -ok (scan1 (0, 0) == $ulong_max); -ok (scan1 (3, 2) == $ulong_max); +ok (scan1 (0, 0) == ~0); +ok (scan1 (3, 2) == ~0); #------------------------------------------------------------------------------ # GMP::Mpz::setbit |