/
main.c
54 lines (33 loc) · 815 Bytes
/
main.c
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
47
48
49
50
51
52
53
54
/*
* main.c
*
* Created on: May 16, 2011
* Author: Robert Winkler
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <CUnit/Automated.h>
#include "skiplist.h"
extern void skiplist_i_test();
extern void skiplist_iv_test();
CU_TestInfo skiplist_tests[] = {
{ "skiplist_i", skiplist_i_test },
{ "skiplist_iv", skiplist_iv_test },
};
CU_SuiteInfo skiplist_suites[] = {
{ "Skiplist", NULL, NULL, skiplist_tests },
CU_SUITE_INFO_NULL,
};
int main()
{
if (CUE_SUCCESS != CU_initialize_registry())
return CU_get_error();
CU_ErrorCode error = CU_register_suites(skiplist_suites);
if( error != CUE_SUCCESS )
fprintf(stderr, "wtf!");
CU_automated_run_tests();
fprintf(stdout, "%d\n", CU_get_error());
CU_cleanup_registry();
return CU_get_error();
}