aboutsummaryrefslogtreecommitdiffstats
path: root/test/fp_util_test.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-05-19 09:10:20 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-05-19 09:10:20 +0800
commit09a998993fbd41643ba552751a9a7fd235c25ded (patch)
tree1b1dcdc0262d75ac81c42c1934b25182d1233b2e /test/fp_util_test.cpp
parentb5e34ca403427c2a9666410645d6985b983d2fa4 (diff)
downloadtangerine-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.cpp9
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);
}
}