clang-format
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
This commit is contained in:
parent
bb574d2a2c
commit
5068a1b90d
4 changed files with 10 additions and 12 deletions
|
@ -20,8 +20,8 @@
|
||||||
#define SEODISPARATE_COM_SIMPLE_ARCHIVER_ARCHIVER_H_
|
#define SEODISPARATE_COM_SIMPLE_ARCHIVER_ARCHIVER_H_
|
||||||
|
|
||||||
// Standard library includes.
|
// Standard library includes.
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
// Local includes.
|
// Local includes.
|
||||||
#include "data_structures/hash_map.h"
|
#include "data_structures/hash_map.h"
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
#include "linked_list.h"
|
#include "linked_list.h"
|
||||||
|
|
||||||
// Standard library includes.
|
// Standard library includes.
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
SDArchiverLinkedList *simple_archiver_list_init(void) {
|
SDArchiverLinkedList *simple_archiver_list_init(void) {
|
||||||
SDArchiverLinkedList *list = malloc(sizeof(SDArchiverLinkedList));
|
SDArchiverLinkedList *list = malloc(sizeof(SDArchiverLinkedList));
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
// `data_structures/test.c` is the source for testing data structure code.
|
// `data_structures/test.c` is the source for testing data structure code.
|
||||||
|
|
||||||
// Standard library includes.
|
// Standard library includes.
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
// Local includes.
|
// Local includes.
|
||||||
#include "../algorithms/linear_congruential_gen.h"
|
#include "../algorithms/linear_congruential_gen.h"
|
||||||
|
@ -148,8 +148,8 @@ int main(void) {
|
||||||
key = malloc(sizeof(int32_t));
|
key = malloc(sizeof(int32_t));
|
||||||
*value = idx;
|
*value = idx;
|
||||||
*key = idx;
|
*key = idx;
|
||||||
simple_archiver_hash_map_insert(hash_map, value, key, sizeof(int32_t), NULL,
|
simple_archiver_hash_map_insert(hash_map, value, key, sizeof(int32_t),
|
||||||
NULL);
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,16 +205,14 @@ int main(void) {
|
||||||
CHECK_TRUE(simple_archiver_hash_map_iter(hash_map, hash_map_iter_check_fn,
|
CHECK_TRUE(simple_archiver_hash_map_iter(hash_map, hash_map_iter_check_fn,
|
||||||
found) == 0);
|
found) == 0);
|
||||||
|
|
||||||
for (uint32_t idx = 0; idx < SDARCHIVER_DS_TEST_HASH_MAP_ITER_SIZE;
|
for (uint32_t idx = 0; idx < SDARCHIVER_DS_TEST_HASH_MAP_ITER_SIZE; ++idx) {
|
||||||
++idx) {
|
|
||||||
CHECK_TRUE(found[idx] == 1);
|
CHECK_TRUE(found[idx] == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECK_TRUE(simple_archiver_hash_map_iter(hash_map, hash_map_iter_check_fn2,
|
CHECK_TRUE(simple_archiver_hash_map_iter(hash_map, hash_map_iter_check_fn2,
|
||||||
found) == 2);
|
found) == 2);
|
||||||
|
|
||||||
for (uint32_t idx = 0; idx < SDARCHIVER_DS_TEST_HASH_MAP_ITER_SIZE;
|
for (uint32_t idx = 0; idx < SDARCHIVER_DS_TEST_HASH_MAP_ITER_SIZE; ++idx) {
|
||||||
++idx) {
|
|
||||||
CHECK_TRUE(found[idx] == 1);
|
CHECK_TRUE(found[idx] == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
// `test.c` is the source for testing code.
|
// `test.c` is the source for testing code.
|
||||||
|
|
||||||
// Standard library includes.
|
// Standard library includes.
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
// Local includes.
|
// Local includes.
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
|
Loading…
Reference in a new issue