refactor(test): fix meson compile
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "../hashmap/myhashmap.h"
|
||||
#include <assert.h>
|
||||
#include <myclib/myhashmap.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../queue/myqueue.h"
|
||||
#include <assert.h>
|
||||
#include <myclib/myqueue.h>
|
||||
|
||||
void test_queue1(void) {
|
||||
/* Allocate a new queue */
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#define _XOPEN_SOURCE 700
|
||||
#include <myclib/mysocket.h>
|
||||
#include "../socket/mysocket.h"
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
void test_socket1(void) {
|
||||
sock_platform_init();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../stack/mystack.h"
|
||||
#include <assert.h>
|
||||
#include <myclib/mystack.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void test_stack1(void) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../string/mystring.h"
|
||||
#include <assert.h>
|
||||
#include <myclib/mystring.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../string/mystring.h"
|
||||
#include <assert.h>
|
||||
#include <myclib/mystring.h>
|
||||
#include <string.h>
|
||||
|
||||
void test_str2(void) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../string/mystring.h"
|
||||
#include <assert.h>
|
||||
#include <myclib/mystring.h>
|
||||
#include <string.h>
|
||||
|
||||
void test_str3(void) {
|
||||
|
||||
@@ -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] ====");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../vector/myvector.h"
|
||||
#include <assert.h>
|
||||
#include <myclib/myvector.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user