-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtestmain.c
29 lines (24 loc) · 936 Bytes
/
testmain.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
#include <stdio.h>
#include "config.h"
// A little test program to verify that config file loading works.
int main(int argc, char **argv) {
Config *config = LoadConfig(argv[1]);
printf("Loaded config!\n");
ClassConfig *clazz = config->class_list;
while (clazz != NULL) {
printf("Class: %s\n", clazz->name);
MethodConfig *method = clazz->method_list;
while (method != NULL) {
printf(" Method: %s%s\n", method->method->name, method->method->signature);
printf(" parameter pos: %d display method: %s show_trace: %d\n",
method->parameterPosition,
method->displayMethod == NULL ? "<NULL>"
: method->displayMethod->name,
method->showTrace);
method = method->next;
}
clazz = clazz->next;
}
ReleaseConfig(config);
return 0;
}