From 0fe07b047c80127dfb6d9cd01e55ae036e449c96 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 30 Oct 2019 11:07:14 +0900 Subject: [PATCH] fix vint_test with MCL_USE_GMP=0 --- test/fp_util_test.cpp | 4 ++-- test/vint_test.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/fp_util_test.cpp b/test/fp_util_test.cpp index 45b1573..ba221bc 100644 --- a/test/fp_util_test.cpp +++ b/test/fp_util_test.cpp @@ -289,7 +289,7 @@ CYBOZU_TEST_AUTO(BitIterator) while (bi.hasNext()) { uint32_t v1 = bi.getNext(w); mpz_class v2 = x & bi.mask(w); - CYBOZU_TEST_EQUAL(v1, v2); + CYBOZU_TEST_EQUAL(v2, v1); x >>= w; } CYBOZU_TEST_EQUAL(x, 0); @@ -302,7 +302,7 @@ CYBOZU_TEST_AUTO(BitIterator) while (bi.hasNext()) { uint32_t v1 = bi.peekBit(); mpz_class v2 = x & 1; - CYBOZU_TEST_EQUAL(v1, v2); + CYBOZU_TEST_EQUAL(v2, v1); x >>= 1; bi.skipBit(); } diff --git a/test/vint_test.cpp b/test/vint_test.cpp index a2d4219..ab37814 100644 --- a/test/vint_test.cpp +++ b/test/vint_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#ifndef DONT_USE_GMP_IN_TEST +#ifndef MCL_USE_VINT #include #endif @@ -1259,7 +1259,7 @@ CYBOZU_TEST_AUTO(bench) x.setStr(tbl[i].x); y.setStr(tbl[i].y); CYBOZU_BENCH_C("fast div", N, Vint::div, z, x, y); -#ifndef DONT_USE_GMP_IN_TEST +#ifndef MCL_USE_VINT { mpz_class mx(tbl[i].x), my(tbl[i].y), mz; CYBOZU_BENCH_C("gmp", N, mpz_div, mz.get_mpz_t(), mx.get_mpz_t(), my.get_mpz_t());