-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added double list tests and remade concatenate function into a splice…
… function
- Loading branch information
Showing
8 changed files
with
1,029 additions
and
284 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
add_executable(list_test main.c | ||
add_executable(double_list_test main.c | ||
infinite_allocated_double_list_test.c | ||
finite_allocated_double_list_test.c | ||
finite_preprocessor_double_list_test.c | ||
infinite_realloc_double_list_test.c | ||
) | ||
target_link_libraries(list_test PRIVATE greatest project_headers) | ||
add_test(NAME LIST_TEST COMMAND list_test) | ||
target_link_libraries(double_list_test PRIVATE greatest project_headers) | ||
add_test(NAME DOUBLE_LIST_TEST COMMAND double_list_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef DOUBLE_LIST_TEST_H | ||
#define DOUBLE_LIST_TEST_H | ||
|
||
#include <greatest.h> | ||
|
||
typedef union type_dst { | ||
int sub_one; | ||
char * sub_two; | ||
} type_dst_u; | ||
|
||
#define DOUBLE_LIST_DATA_TYPE type_dst_u | ||
|
||
#define TEST_STRING "thegazed" | ||
void destroy_element(DOUBLE_LIST_DATA_TYPE * element); | ||
DOUBLE_LIST_DATA_TYPE copy_element(const DOUBLE_LIST_DATA_TYPE element); | ||
|
||
void operation_int(DOUBLE_LIST_DATA_TYPE * element, void * args); | ||
void operation_string(DOUBLE_LIST_DATA_TYPE * element, void * args); | ||
|
||
SUITE_EXTERN(infinite_allocated_double_list_test); | ||
SUITE_EXTERN(finite_allocated_double_list_test); | ||
SUITE_EXTERN(infinite_realloc_double_list_test); | ||
SUITE_EXTERN(finite_preprocessor_double_list_test); | ||
|
||
#endif // DOUBLE_LIST_TEST_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "double_list_test.h" | ||
|
||
#define DOUBLE_LIST_MODE FINITE_ALLOCATED_DOUBLE_LIST | ||
#define MAXIMUM_FINITE_DOUBLE_LIST (1 << 4) | ||
#include <double_list.h> | ||
|
||
SUITE (finite_allocated_double_list_test) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "double_list_test.h" | ||
|
||
#define DOUBLE_LIST_MODE FINITE_PRERPOCESSOR_DOUBLE_LIST | ||
#define PREPROCESSOR_DOUBLE_LIST_SIZE (1 << 4) | ||
#include <double_list.h> | ||
|
||
SUITE (finite_preprocessor_double_list_test) { | ||
} |
Oops, something went wrong.