2014-06-25 Niels Möller <nisse@lysator.liu.se>
+ * testsuite/bignum-test.c: Use WITH_HOGWEED instead of HAVE_LIBGMP
+ for preprocessor conditionals.
+ * testsuite/testutils.h: Likewise.
+ * testsuite/sexp-format-test.c: Likewise.
+
* testsuite/ecdsa-keygen-test.c (test_main): Use printf,
mpz_out_str and write_mpn instead of gmp_fprintf.
* testsuite/ecdsa-sign-test.c (test_ecdsa): Likewise.
#include <stdlib.h>
#include <string.h>
-#if HAVE_LIBGMP
+#if WITH_HOGWEED
#include "bignum.h"
static void
ASSERT(nettle_mpz_sizeinbase_256_s(t) == size);
mpz_clear(t);
}
-#endif /* HAVE_LIBGMP */
+#endif /* WITH_HOGWEED */
void
test_main(void)
{
-#if HAVE_LIBGMP
+#if WITH_HOGWEED
test_size(0, 1);
test_size(1, 1);
test_size(0x7f, 1);
test_bignum("-8000", SHEX( "8000"));
test_bignum("-8001", SHEX("ff7fff"));
-#else /* !HAVE_LIBGMP */
+#else /* !WITH_HOGWEED */
SKIP();
-#endif /* !HAVE_LIBGMP */
+#endif /* !WITH_HOGWEED */
}
#include "buffer.h"
-#if HAVE_LIBGMP
+#if WITH_HOGWEED
# include "bignum.h"
#endif
nettle_buffer_clear(&buffer);
}
-#if HAVE_LIBGMP
+#if WITH_HOGWEED
{
mpz_t x;
mpz_t y;
mpz_clear(y);
mpz_clear(z);
}
-#endif /* HAVE_LIBGMP */
+#endif /* WITH_HOGWEED */
}
#include <stdio.h>
#include <string.h>
-#if HAVE_LIBGMP
-# include "bignum.h"
-#endif
-
#if WITH_HOGWEED
# include "rsa.h"
# include "dsa-compat.h"