-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.c
51 lines (44 loc) · 1.23 KB
/
tests.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
#include "tests.h"
void test_thread_printf() {
printf("TEST:test_thread_printf\n");
// int threadID = create_thread(sampleThread, 0);
}
void test_find_thread_byID() {
/*
printf("TEST:test_find_thread_byID\n");
thread_manager_init(0,NULL);
int threadID = create_thread(a, 0);
node_t_p currentNode = container->container;
get_thread_byID(currentNode, threadID);
threadToString(THREAD_DATA(currentNode));
*/
}
int TestReadFile() {
printf("TEST:TestReadFile\n");
int threads = 0;
Jobs jobs;
JobsDeps deps;
JobsForThreads jobsForThreads;
ASSERT(readFile("/home/danni/test", &deps, &jobs, &jobsForThreads, &threads) == OP_SUCCESS);
}
int TestQ1() {
/*
printf("TEST:TestQ1\n");
runType = malloc(sizeof(run_t));
*runType = RR;
thread_manager_init(0, NULL, 0);
int i=create_thread(a, 0, 0, 0);
printf("%d",i);
create_thread(b, 0, 0, 0);
create_thread(c, 0, 0, 0);
threads_start();
int waitAmount = switches_wait(1);
printf("T1:%d", waitAmount);
waitAmount = switches_wait(2);
printf("T2:%d", waitAmount);
waitAmount = switches_wait(3);
printf("T3:%d", waitAmount);
printf("\ndone...\n");
free(runType);
*/
}