Remove dependency on GMP, so that it is easier to run the bench suite.
This commit is contained in:
1 parent
18710567f2
commit
bc83fe43e5
9 files changed
+142
-74
No files matched your search
@@ -21,9 +21,9 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <gmp.h>
|
||||
|
||||
#include "mympz.h"
|
||||
#include "m-string.h"
|
||||
|
||||
#include "m-variant.h"
|
||||
|
||||
#include "coverage.h"
|
||||
@@ -138,7 +138,7 @@ static void test_pair(void)
|
||||
|
||||
VARIANT_DEF2(triple,
|
||||
(s, string_t, STRING_OPLIST),
|
||||
(z, mpz_t, (INIT(mpz_init), INIT_SET(mpz_init_set), SET(mpz_set), CLEAR(mpz_clear) )),
|
||||
(z, my_mpz_t, (INIT(my_mpz_init), INIT_SET(my_mpz_init_set), SET(my_mpz_set), CLEAR(my_mpz_clear) )),
|
||||
(i, int, M_DEFAULT_OPLIST) )
|
||||
|
||||
static void
|
||||
@@ -148,10 +148,10 @@ test_triple(void)
|
||||
triple_init(t);
|
||||
string_t s;
|
||||
string_init(s);
|
||||
mpz_t z;
|
||||
mpz_init(z);
|
||||
my_mpz_t z;
|
||||
my_mpz_init(z);
|
||||
|
||||
mpz_set_str(z, "125567890456789345784567812345678", 10);
|
||||
my_mpz_set_ui(z, 2556789045);
|
||||
string_set_str(s, "FHZKJHFKZUHFKZHFUHZFUHURHYERUYEUIRYEIURYIEYRIU");
|
||||
assert( triple_type(t) == triple_EMPTY);
|
||||
|
||||
@@ -165,9 +165,9 @@ test_triple(void)
|
||||
assert( triple_type(t) == triple_z);
|
||||
triple_set_z(t, z);
|
||||
assert( triple_type(t) == triple_z);
|
||||
assert( mpz_cmp (z, *triple_get_z(t)) == 0);
|
||||
assert( my_mpz_cmp (z, *triple_get_z(t)) == 0);
|
||||
|
||||
mpz_clear(z);
|
||||
my_mpz_clear(z);
|
||||
string_clear(s);
|
||||
triple_clear(t);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user