-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathmain.c
More file actions
46 lines (41 loc) · 1.28 KB
/
main.c
File metadata and controls
46 lines (41 loc) · 1.28 KB
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
43
44
45
46
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
bool test_ballot_code(void);
bool test_ballot(void);
bool test_chaum_pedersen_proof(void);
bool test_collections(void);
bool test_election(void);
bool test_elgamal(void);
bool test_encrypt_compact(void);
bool test_encrypt(void);
bool test_group(void);
bool test_hash(void);
bool test_manifest(void);
int main(void)
{
printf("\n ---------- RUNNING C TESTS ------------ \n");
bool ballot_code = test_ballot_code();
bool ballot = test_ballot();
bool proofs = test_chaum_pedersen_proof();
bool collections = test_collections();
bool election = test_election();
bool elgamal = test_elgamal();
bool encrypt_compact = test_encrypt_compact();
bool encrypt = test_encrypt();
bool group = test_group();
bool hash = test_hash();
bool manifest = test_manifest();
bool success = ballot_code && ballot && proofs && collections && election && elgamal &&
encrypt_compact && encrypt && group && hash && manifest;
if (success == true) {
printf("\n ---------- C TEST STATUS SUCCESS! ---------- \n");
return 0;
} else {
printf("\n ---------- C TEST FAILED! ---------- \n");
return 1;
}
}