diff --git a/test/bn_c_test.hpp b/test/bn_c_test.hpp index e9dc593..8db329d 100644 --- a/test/bn_c_test.hpp +++ b/test/bn_c_test.hpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include template std::ostream& dump(std::ostream& os, const uint64_t (&x)[N]) @@ -604,7 +604,7 @@ CYBOZU_TEST_AUTO(mod) mpz_class p(buf); mpz_class x = mpz_class(1) << (mclBn_getFpByteSize() * 2); mclBnFp y; - int ret = mclBnFp_setLittleEndianMod(&y, x.get_mpz_t()->_mp_d, x.get_mpz_t()->_mp_size * sizeof(void*)); + int ret = mclBnFp_setLittleEndianMod(&y, mcl::gmp::getUnit(x), mcl::gmp::getUnitSize(x) * sizeof(void*)); CYBOZU_TEST_EQUAL(ret, 0); mclBnFp_getStr(buf, sizeof(buf), &y, 10); CYBOZU_TEST_EQUAL(mpz_class(buf), x % p); @@ -616,7 +616,7 @@ CYBOZU_TEST_AUTO(mod) mpz_class p(buf); mpz_class x = mpz_class(1) << (mclBn_getFrByteSize() * 2); mclBnFr y; - int ret = mclBnFr_setLittleEndianMod(&y, x.get_mpz_t()->_mp_d, x.get_mpz_t()->_mp_size * sizeof(void*)); + int ret = mclBnFr_setLittleEndianMod(&y, mcl::gmp::getUnit(x), mcl::gmp::getUnitSize(x) * sizeof(void*)); CYBOZU_TEST_EQUAL(ret, 0); mclBnFr_getStr(buf, sizeof(buf), &y, 10); CYBOZU_TEST_EQUAL(mpz_class(buf), x % p);