diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2018-12-15 08:03:57 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2018-12-15 08:03:57 +0100 |
commit | 26b22f58cd5a54e867d41eb1b5eef41c629a257a (patch) | |
tree | 42d5867c4cf19eb6dab438b66ca2309817a1713c /mini-gmp/tests | |
parent | bb180231ec6452eea292d0a730d24054c047304e (diff) | |
download | gmp-26b22f58cd5a54e867d41eb1b5eef41c629a257a.tar.gz |
mini-gmp/tests/t-bitops.c: Somehow test also mpz_com.
Diffstat (limited to 'mini-gmp/tests')
-rw-r--r-- | mini-gmp/tests/t-bitops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mini-gmp/tests/t-bitops.c b/mini-gmp/tests/t-bitops.c index 7e1688e66..27d87caf0 100644 --- a/mini-gmp/tests/t-bitops.c +++ b/mini-gmp/tests/t-bitops.c @@ -79,6 +79,7 @@ testmain (int argc, char **argv) } mini_random_bit_op (OP_COMBIT, MAXBITS, a, &b, ref); mpz_set (res, a); + mpz_com (a, a); mpz_combit (res, b); if (mpz_cmp (res, ref)) { @@ -89,7 +90,7 @@ testmain (int argc, char **argv) dump ("ref", ref); abort (); } - if (mpz_tstbit (res, b) == mpz_tstbit (a, b)) + if (mpz_tstbit (res, b) != mpz_tstbit (a, b)) { fprintf (stderr, "mpz_tstbit failed (after mpz_combit):\n"); dump ("res", a); |