aboutsummaryrefslogtreecommitdiff
path: root/test/src/cm/test_custom.c
blob: 3309de7c828e381036ca9614d9cdd8df87c3d153 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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();
}