From 0fa14e8c37d364d8b8be495bc912f3f55f0f3714 Mon Sep 17 00:00:00 2001 From: Francesco Date: Tue, 25 Nov 2025 23:31:15 +0100 Subject: [PATCH] refactor(test): fix meson compile --- test/hashmap/hm1.c | 2 +- test/queue/queue1.c | 2 +- test/socket/socket1.c | 7 +++++-- test/stack/stack1.c | 2 +- test/string/str1.c | 2 +- test/string/str2.c | 2 +- test/string/str3.c | 2 +- test/test.c | 2 +- test/vector/vec1.c | 4 ++-- 9 files changed, 14 insertions(+), 11 deletions(-) diff --git a/test/hashmap/hm1.c b/test/hashmap/hm1.c index 19610c5..8d50d1e 100644 --- a/test/hashmap/hm1.c +++ b/test/hashmap/hm1.c @@ -1,5 +1,5 @@ +#include "../hashmap/myhashmap.h" #include -#include #include #include #include diff --git a/test/queue/queue1.c b/test/queue/queue1.c index b258a63..ca69f28 100644 --- a/test/queue/queue1.c +++ b/test/queue/queue1.c @@ -1,5 +1,5 @@ +#include "../queue/myqueue.h" #include -#include void test_queue1(void) { /* Allocate a new queue */ diff --git a/test/socket/socket1.c b/test/socket/socket1.c index 3ad6e9d..50e44c0 100644 --- a/test/socket/socket1.c +++ b/test/socket/socket1.c @@ -1,7 +1,10 @@ -#define _XOPEN_SOURCE 700 -#include +#include "../socket/mysocket.h" +#include +#include #include #include +#include +#include void test_socket1(void) { sock_platform_init(); diff --git a/test/stack/stack1.c b/test/stack/stack1.c index 17c6be4..53c7a90 100644 --- a/test/stack/stack1.c +++ b/test/stack/stack1.c @@ -1,5 +1,5 @@ +#include "../stack/mystack.h" #include -#include #include void test_stack1(void) { diff --git a/test/string/str1.c b/test/string/str1.c index 4762f9a..e23bcba 100644 --- a/test/string/str1.c +++ b/test/string/str1.c @@ -1,5 +1,5 @@ +#include "../string/mystring.h" #include -#include #include #include #include diff --git a/test/string/str2.c b/test/string/str2.c index bdca11e..e6969c1 100644 --- a/test/string/str2.c +++ b/test/string/str2.c @@ -1,5 +1,5 @@ +#include "../string/mystring.h" #include -#include #include void test_str2(void) { diff --git a/test/string/str3.c b/test/string/str3.c index c8af528..7ffce3a 100644 --- a/test/string/str3.c +++ b/test/string/str3.c @@ -1,5 +1,5 @@ +#include "../string/mystring.h" #include -#include #include void test_str3(void) { diff --git a/test/test.c b/test/test.c index 45653d7..7359600 100644 --- a/test/test.c +++ b/test/test.c @@ -17,7 +17,7 @@ void test_vec1(void); void test_stack1(void); -void test_socket1(); +void test_socket1(void); int main(void) { puts("==== [Running Hashmap tests] ===="); diff --git a/test/vector/vec1.c b/test/vector/vec1.c index 26ff920..f3db08d 100644 --- a/test/vector/vec1.c +++ b/test/vector/vec1.c @@ -1,5 +1,5 @@ +#include "../vector/myvector.h" #include -#include #include typedef struct my_elem { @@ -29,7 +29,7 @@ int my_cmp(const void *a, const void *b) { return ma->age - mb->age; } -void test_vec1() { +void test_vec1(void) { /* Allocate a new vector */ size_t elem_size = sizeof(my_elem_s); vec_s *v = vec_new(10, elem_size);