-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblock-table-test.c
More file actions
37 lines (25 loc) · 786 Bytes
/
block-table-test.c
File metadata and controls
37 lines (25 loc) · 786 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
28
29
30
31
32
33
34
35
36
37
//
// Created by dran on 4/5/22.
//
#include <stdio.h>
#include "block-table.h"
int single_threaded_add_check_test () {
block_table_t* table;
int result;
table = block_table_create();
block_table_add(table, "key1");
block_table_add(table, "key2");
block_table_add(table, "key3");
result = block_table_check(table, "key1");
printf("key1, found %d/%d\n", result, 1);
result = block_table_check(table, "key2");
printf("key2, found %d/%d\n", result, 1);
result = block_table_check(table, "key3");
printf("key3, found %d/%d\n", result, 1);
result = block_table_check(table, "key4");
printf("key4, found %d/%d\n", result, 0);
return 0;
}
int main (int argc, char* argv[]) {
return single_threaded_add_check_test();
}