aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-03-26 13:44:01 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-03-26 13:44:01 +0800
commit399a97961a2410aa69913cb46f462fa817f05c49 (patch)
tree7f9093a455ed4f71fd70c6f89bfafb94b149553a
parentd6c61234e0f2d0840d597765152deeb254da17e1 (diff)
downloaddexon-mcl-399a97961a2410aa69913cb46f462fa817f05c49.tar.gz
dexon-mcl-399a97961a2410aa69913cb46f462fa817f05c49.tar.zst
dexon-mcl-399a97961a2410aa69913cb46f462fa817f05c49.zip
add test of mapToG2
-rw-r--r--test/bn_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/bn_test.cpp b/test/bn_test.cpp
index c41494d..a7d67a3 100644
--- a/test/bn_test.cpp
+++ b/test/bn_test.cpp
@@ -128,6 +128,10 @@ void testMapToG2()
if (BN::param.b == 2) {
CYBOZU_TEST_EXCEPTION(BN::mapToG2(g, 0), cybozu::Exception);
}
+ Fp x;
+ x.setMsg("abc");
+ BN::mapToG2(g, Fp2(x, 0));
+ CYBOZU_TEST_ASSERT(g.isValid());
}
void testCyclotomic()