1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2025-05-21 23:21:15 +02:00

refactor: include only in header files

This commit is contained in:
Divlo
2023-01-07 19:38:01 +01:00
parent 886038a0ac
commit bd85171e2d
41 changed files with 101 additions and 131 deletions

View File

@ -1,12 +1,5 @@
#include "array_list_test.h"
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
void array_list_test() {
struct array_list *list = array_list_initialization();
assert(list->size == 0);

View File

@ -1,6 +1,13 @@
#ifndef __ARRAY_LIST_TEST__
#define __ARRAY_LIST_TEST__
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
void array_list_test();
#endif

View File

@ -1,12 +1,5 @@
#include "character_test.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
#include "test.h"
void character_test() {
character_append_test();
character_append_at_test();

View File

@ -1,6 +1,13 @@
#ifndef __CHARACTER_TEST__
#define __CHARACTER_TEST__
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
#include "test.h"
void character_test();
void character_append_test();

View File

@ -1,12 +1,5 @@
#include "convert_test.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
#include "test.h"
void convert_test() {
convert_character_to_string_test();
convert_character_to_digit_test();

View File

@ -1,6 +1,13 @@
#ifndef __CONVERT_TEST__
#define __CONVERT_TEST__
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
#include "test.h"
void convert_test();
void convert_character_to_string_test();

View File

@ -1,11 +1,5 @@
#include "dictionary_test.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
void dictionary_test() {
struct dictionary *dictionary = dictionary_initialization();
assert(dictionary->length == 0);

View File

@ -1,6 +1,12 @@
#ifndef __DICTIONARY_TEST__
#define __DICTIONARY_TEST__
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
void dictionary_test();
#endif

View File

@ -1,12 +1,5 @@
#include "linked_list_test.h"
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
void linked_list_test() {
linked_list_initialization_test();
linked_list_add_in_head_test();

View File

@ -1,6 +1,13 @@
#ifndef __LINKED_LIST_TEST__
#define __LINKED_LIST_TEST__
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
void linked_list_test();
void linked_list_initialization_test();

View File

@ -1,9 +1,5 @@
#include "mathematics_test.h"
#include <assert.h>
#include "libcproject.h"
void mathematics_test() {
mathematics_absolute_value_test();
mathematics_pow_test();

View File

@ -1,6 +1,10 @@
#ifndef __MATHEMATICS_TEST__
#define __MATHEMATICS_TEST__
#include <assert.h>
#include "libcproject.h"
void mathematics_test();
void mathematics_absolute_value_test();

View File

@ -1,11 +1,5 @@
#include "queue_test.h"
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include "libcproject.h"
void queue_test() {
queue_initialization_test();
queue_push_test();

View File

@ -1,6 +1,12 @@
#ifndef __QUEUE_TEST__
#define __QUEUE_TEST__
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include "libcproject.h"
void queue_test();
void queue_initialization_test();

View File

@ -1,11 +1,5 @@
#include "stack_test.h"
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include "libcproject.h"
void stack_test() {
stack_initialization_test();
stack_push_test();

View File

@ -1,6 +1,12 @@
#ifndef __STACK_TEST__
#define __STACK_TEST__
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include "libcproject.h"
void stack_test();
void stack_initialization_test();

View File

@ -1,12 +1,5 @@
#include "string_test.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
#include "test.h"
void string_test() {
string_get_length_test();
string_to_uppercase_test();

View File

@ -1,6 +1,13 @@
#ifndef __STRING_TEST__
#define __STRING_TEST__
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "libcproject.h"
#include "test.h"
void string_test();
void string_get_length_test();

View File

@ -1,6 +1,4 @@
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "test.h"
bool assert_string_equal(const char *actual, const char *expected) {
if (strcmp(expected, actual) != 0) {

View File

@ -2,6 +2,8 @@
#define __TEST__
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
bool assert_string_equal(const char *actual, const char *expected);