aboutsummaryrefslogtreecommitdiff
path: root/test/src/cm/test_custom.c
diff options
context:
space:
mode:
authorJ08nY2017-09-29 16:50:13 +0200
committerJ08nY2018-04-07 14:38:24 +0200
commit99e192422d95240adbe806a53caabfa9ddb258c3 (patch)
tree0903938e52b62a494b3f00e8d4b04a1d7c761e0c /test/src/cm/test_custom.c
parent962e197004b19e0b8e42dc977dc0ec1a85f407c1 (diff)
downloadecgen-99e192422d95240adbe806a53caabfa9ddb258c3.tar.gz
ecgen-99e192422d95240adbe806a53caabfa9ddb258c3.tar.zst
ecgen-99e192422d95240adbe806a53caabfa9ddb258c3.zip
Diffstat (limited to 'test/src/cm/test_custom.c')
-rw-r--r--test/src/cm/test_custom.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/src/cm/test_custom.c b/test/src/cm/test_custom.c
new file mode 100644
index 0000000..3309de7
--- /dev/null
+++ b/test/src/cm/test_custom.c
@@ -0,0 +1,42 @@
+/*
+ * ecgen, tool for generating Elliptic curve domain parameters
+ * Copyright (C) 2017 J08nY
+ */
+
+#include <criterion/criterion.h>
+#include "misc/config.h"
+#include "util/random.h"
+#include "test/default.h"
+#include "test/input.h"
+#include "cm/custom.h"
+
+void custom_setup() {
+ default_setup();
+ input_setup();
+ random_init();
+}
+
+void custom_teardown() {
+ input_teardown();
+}
+
+TestSuite(custom, .init = custom_setup, .fini = custom_teardown);
+
+Test(custom, test_curve_one) {
+ cr_skip("Doesnt work yet.");
+ cfg->bits = 128;
+ cfg->cm_order = "263473633827487324648193013259296339349";
+ cfg->random = false;
+
+ fprintf(write_in, "191345683451069598953886857691544477637\n");
+ custom_curve();
+}
+
+Test(custom, test_curve_other) {
+ cr_skip("Doesnt work yet.");
+ cfg->bits = 128;
+ cfg->cm_order = "263473633827487324648193013259296339349";
+ cfg->random = true;
+
+ custom_curve();
+} \ No newline at end of file