MCPcopy Create free account
hub / github.com/codr7/hacktical-c / task_tests

Function task_tests

task/tests.c:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void task_tests() {
41 struct hc_task_list tl;
42 hc_task_list_init(&tl);
43
44 int value = 0;
45
46 struct my_task pt = {.value = &value};
47 hc_task_init(&pt.task, &tl, &producer);
48
49 struct my_task ct = {.value = &value};
50 hc_task_init(&ct.task, &tl, &consumer);
51
52 hc_task_list_run(&tl);
53 assert(value == 4);
54}

Callers 1

mainFunction · 0.85

Calls 3

hc_task_list_initFunction · 0.85
hc_task_initFunction · 0.85
hc_task_list_runFunction · 0.85

Tested by

no test coverage detected