forked from 10gic/vanitygen-plusplus
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_tests.c
More file actions
27 lines (24 loc) · 711 Bytes
/
run_tests.c
File metadata and controls
27 lines (24 loc) · 711 Bytes
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
#include "tests.h"
#include <check.h>
#include <stdio.h>
int GRSFlag = 0; // avoid link error when test function in util.c
int TRXFlag = 0; // avoid link error when test function in util.c
// run suite
//
// See:
// https://libcheck.github.io/check/
// http://developertesting.rocks/tools/check/
int main(void)
{
int number_failed;
Suite* suite = create_sample_suite();
SRunner* runner = srunner_create(suite);
// srunner_add_suite(runner, <another suite would go here>);
srunner_run_all(runner, CK_VERBOSE);
number_failed = srunner_ntests_failed(runner);
srunner_free(runner);
if (number_failed == 0) {
printf("PASSED ALL TESTS\n");
}
return number_failed;
}