diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-05-19 09:10:20 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-05-19 09:10:20 +0800 |
commit | 09a998993fbd41643ba552751a9a7fd235c25ded (patch) | |
tree | 1b1dcdc0262d75ac81c42c1934b25182d1233b2e /test/fp_util_test.cpp | |
parent | b5e34ca403427c2a9666410645d6985b983d2fa4 (diff) | |
download | tangerine-mcl-09a998993fbd41643ba552751a9a7fd235c25ded.tar.gz tangerine-mcl-09a998993fbd41643ba552751a9a7fd235c25ded.tar.zst tangerine-mcl-09a998993fbd41643ba552751a9a7fd235c25ded.zip |
remove fromStr16
Diffstat (limited to 'test/fp_util_test.cpp')
-rw-r--r-- | test/fp_util_test.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/fp_util_test.cpp b/test/fp_util_test.cpp index 72e6c7d..c516274 100644 --- a/test/fp_util_test.cpp +++ b/test/fp_util_test.cpp @@ -53,7 +53,7 @@ CYBOZU_TEST_AUTO(arrayToBin) } // CYBOZU_TEST_AUTO(verifyStr) // QQQ -CYBOZU_TEST_AUTO(fromStr16) +CYBOZU_TEST_AUTO(hexToArray) { const struct { const char *str; @@ -71,10 +71,9 @@ CYBOZU_TEST_AUTO(fromStr16) for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(tbl); i++) { const size_t xN = 4; uint64_t x[xN]; - mcl::fp::fromStr16(x, xN, tbl[i].str, strlen(tbl[i].str)); - for (size_t j = 0; j < xN; j++) { - CYBOZU_TEST_EQUAL(x[j], tbl[i].x[j]); - } + size_t n = mcl::fp::hexToArray(x, xN, tbl[i].str, strlen(tbl[i].str)); + CYBOZU_TEST_ASSERT(n > 0); + CYBOZU_TEST_EQUAL_ARRAY(x, tbl[i].x, n); } } |