From 166a1075b18017f26ecea6acd084924c5c50fc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mamy=20Andr=C3=A9-Ratsimbazafy?= Date: Sun, 9 Feb 2020 23:26:39 +0100 Subject: [PATCH] add bigint display in GMP test --- tests/test_bigints_vs_gmp.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_bigints_vs_gmp.nim b/tests/test_bigints_vs_gmp.nim index 4015c47..0852b03 100644 --- a/tests/test_bigints_vs_gmp.nim +++ b/tests/test_bigints_vs_gmp.nim @@ -88,7 +88,7 @@ proc main() = mpz_init(r) testRandomModSizes(100, aBits, mBits): - echo "Testing: Dividend bitsize " & align($aBits, 4) & " -- modulus bitsize " & align($mBits, 4) + stdout.write "Testing: Dividend bitsize " & align($aBits, 4) & " -- modulus bitsize " & align($mBits, 4) # Generate random value in the range 0 ..< 2^aBits mpz_urandomb(a, gmpRng, aBits) @@ -96,6 +96,8 @@ proc main() = mpz_urandomb(m, gmpRng, mBits) mpz_setbit(m, mBits-1) + discard gmp_printf(" -- %#Zx mod %#Zx\n", a.addr, m.addr) + ######################################################### # Conversion buffers const aLen = (aBits + 7) div 8