From 52764ee1441f54e1ac0c1dba0feda0996bad3bb4 Mon Sep 17 00:00:00 2001
From: Weiqi <weltch1997@gmail.com>
Date: Tue, 14 Nov 2023 16:22:25 -0500
Subject: [PATCH] Update test
---
tests/test_group_asym.cpp | 67 +++++++++++++++++++--------------------
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/tests/test_group_asym.cpp b/tests/test_group_asym.cpp
index 236cdda..619a5a2 100644
--- a/tests/test_group_asym.cpp
+++ b/tests/test_group_asym.cpp
@@ -1,50 +1,47 @@
-
#include "asym_group.h"
-#include "relic_sym/relic.h"
-
-int test_all(bn_st *N) {
- // Set integers.
- ZP_ASYM a = zp_from_int(5, N);
- ZP_ASYM b = zp_from_int(6, N);
- ZP_ASYM c = zp_from_int(30, N);
-
- // Declare variables.
- g1_asym j, k;
- g2_asym m, n;
- gt_asym x, y, z;
-
- core_init();
-
- //
- g1_gen(j);
- g2_gen(m);
- asym_bn_t test;
- asym_bn_set_dig(test, 20);
-
-
- g1_mul(k, j, test);
-
-
- // Compare e(g_sym^5, g_sym^5) with e(g_sym, g_sym)^25.
- return RLC_EQ;
-}
+//int test_all(bn_st *N) {
+// // Set integers.
+// ZP_ASYM a = zp_from_int(5, N);
+// ZP_ASYM b = zp_from_int(6, N);
+// ZP_ASYM c = zp_from_int(30, N);
+//
+// // Declare variables.
+// g1_asym j, k;
+// g2_asym m, n;
+// gt_asym x, y, z;
+//
+// //
+// g1_gen(j);
+// g2_gen(m);
+//
+// asym_bn_t test;
+// asym_bn_set_dig(test, 20);
+//
+// g1_mul(k, j, test);
+//
+//
+// // Compare e(g_sym^5, g_sym^5) with e(g_sym, g_sym)^25.
+// return RLC_EQ;
+//}
int main() {
core_clean();
- asym_core_clean();
// Init core and setup.
- asym_core_init();
- asym_pc_core_init();
+ core_init();
pc_param_set_any();
+ g1_asym p;
+ g1_new(p);
+ g1_get_gen(p);
+
// Get order.
- bn_t N;
- pc_get_ord(N);
+// bn_t N;
+// pc_get_ord(N);
// Perform tests.
- if (test_all(N) != RLC_EQ) return 1;
+// if (test_all(N) != RLC_EQ) return 1;
return 0;
}
\ No newline at end of file
--
GitLab