From b9a79799deb68874beb0f1f62aeee35230ee0c61 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 25 Sep 2023 08:14:44 +0200 Subject: [PATCH] :broom: clean c tests --- tests/driver/Makefile | 2 +- tests/driver/simple_driver.c | 2 -- tests/fork/fork_join.gw | 2 +- tests/module/Makefile | 2 +- tests/module/get_module.c | 2 -- tests/module/module.c | 2 -- tests/plug/Makefile | 2 +- tests/plug/compile_file.c | 1 - tests/plug/compile_string.c | 1 - tests/plug/fail_on_next_arg.c | 2 -- tests/plug/fail_on_next_arg2.c | 2 -- tests/plug/invalid_names.c | 2 -- tests/plug/invalid_names0.c | 2 -- tests/plug/invalid_names1.c | 2 -- tests/plug/invalid_names2.c | 2 -- tests/plug/invalid_names3.c | 2 -- tests/plug/static_string.c | 1 - tests/plug/str2decl.c | 2 -- tests/plug/trig.c | 2 -- 19 files changed, 4 insertions(+), 31 deletions(-) diff --git a/tests/driver/Makefile b/tests/driver/Makefile index edc8d0e2..35df5e9c 100644 --- a/tests/driver/Makefile +++ b/tests/driver/Makefile @@ -4,7 +4,7 @@ CC ?= gcc NAME := ${NAME} SRC = ${NAME}.c OBJ = $(SRC:.c=.o) -CFLAGS += -std=c99 ${INC} -Wall -Wextra -g -Og +CFLAGS += -std=c99 ${INC} -Wall -Wextra -g -Og -D_GNU_SOURCE # os specific ifeq ($(shell uname), Darwin) diff --git a/tests/driver/simple_driver.c b/tests/driver/simple_driver.c index 6490254f..78a22594 100644 --- a/tests/driver/simple_driver.c +++ b/tests/driver/simple_driver.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/fork/fork_join.gw b/tests/fork/fork_join.gw index e9526cf7..a18dd254 100644 --- a/tests/fork/fork_join.gw +++ b/tests/fork/fork_join.gw @@ -1,3 +1,3 @@ -fork { <<< __func__ >>>; } => var Fork f; +fork { <<< __func__ >>>; } :=> var Fork f; second => now; f.join(); diff --git a/tests/module/Makefile b/tests/module/Makefile index edc8d0e2..35df5e9c 100644 --- a/tests/module/Makefile +++ b/tests/module/Makefile @@ -4,7 +4,7 @@ CC ?= gcc NAME := ${NAME} SRC = ${NAME}.c OBJ = $(SRC:.c=.o) -CFLAGS += -std=c99 ${INC} -Wall -Wextra -g -Og +CFLAGS += -std=c99 ${INC} -Wall -Wextra -g -Og -D_GNU_SOURCE # os specific ifeq ($(shell uname), Darwin) diff --git a/tests/module/get_module.c b/tests/module/get_module.c index c44b1773..ec9cd361 100644 --- a/tests/module/get_module.c +++ b/tests/module/get_module.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/module/module.c b/tests/module/module.c index 7deb36b5..65e0df77 100644 --- a/tests/module/module.c +++ b/tests/module/module.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/Makefile b/tests/plug/Makefile index bb37cb13..1432b6fe 100644 --- a/tests/plug/Makefile +++ b/tests/plug/Makefile @@ -4,7 +4,7 @@ CC ?= gcc NAME := ${NAME} SRC = ${NAME}.c OBJ = $(SRC:.c=.o) -CFLAGS += -std=c99 ${INC} -Wall -Wextra -g -Og +CFLAGS += -std=c99 ${INC} -Wall -Wextra -g -Og -D_GNU_SOURCE # os specific ifeq ($(shell uname), Darwin) diff --git a/tests/plug/compile_file.c b/tests/plug/compile_file.c index e3d21c8b..563affaa 100644 --- a/tests/plug/compile_file.c +++ b/tests/plug/compile_file.c @@ -10,7 +10,6 @@ #include "gwi.h" #include "compile.h" -#define _XOPEN_SOURCE 500 #include GWION_IMPORT(compile_file) { DECL_OB(FILE *, file, = fopen("rm_me.gw", "w+")); diff --git a/tests/plug/compile_string.c b/tests/plug/compile_string.c index df02fede..899381db 100644 --- a/tests/plug/compile_string.c +++ b/tests/plug/compile_string.c @@ -10,7 +10,6 @@ #include "gwi.h" #include "compile.h" -#define _XOPEN_SOURCE 500 #include GWION_IMPORT(compile_string) { return compile_string(gwi->gwion, __FILE__, "1;") ? GW_OK : GW_ERROR; diff --git a/tests/plug/fail_on_next_arg.c b/tests/plug/fail_on_next_arg.c index bce8309b..5533acf0 100644 --- a/tests/plug/fail_on_next_arg.c +++ b/tests/plug/fail_on_next_arg.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/fail_on_next_arg2.c b/tests/plug/fail_on_next_arg2.c index 1abbd5bf..07b02e6c 100644 --- a/tests/plug/fail_on_next_arg2.c +++ b/tests/plug/fail_on_next_arg2.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/invalid_names.c b/tests/plug/invalid_names.c index df7f9873..bda333ee 100644 --- a/tests/plug/invalid_names.c +++ b/tests/plug/invalid_names.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/invalid_names0.c b/tests/plug/invalid_names0.c index 186e9c1e..7f138d54 100644 --- a/tests/plug/invalid_names0.c +++ b/tests/plug/invalid_names0.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/invalid_names1.c b/tests/plug/invalid_names1.c index b8aa0850..f795e9f2 100644 --- a/tests/plug/invalid_names1.c +++ b/tests/plug/invalid_names1.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/invalid_names2.c b/tests/plug/invalid_names2.c index f62630cb..19ff0d83 100644 --- a/tests/plug/invalid_names2.c +++ b/tests/plug/invalid_names2.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/invalid_names3.c b/tests/plug/invalid_names3.c index 8c125b07..59426ea6 100644 --- a/tests/plug/invalid_names3.c +++ b/tests/plug/invalid_names3.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/static_string.c b/tests/plug/static_string.c index c8b1d85f..2f7d6f46 100644 --- a/tests/plug/static_string.c +++ b/tests/plug/static_string.c @@ -1,4 +1,3 @@ -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/str2decl.c b/tests/plug/str2decl.c index 68128f10..72ee0089 100644 --- a/tests/plug/str2decl.c +++ b/tests/plug/str2decl.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" diff --git a/tests/plug/trig.c b/tests/plug/trig.c index b0521872..69e48139 100644 --- a/tests/plug/trig.c +++ b/tests/plug/trig.c @@ -1,5 +1,3 @@ -#include -#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" -- 2.43.0