Compare commits

...

3 Commits

Author SHA1 Message Date
ffbbe11553 fixes in makefile
test wildcard must include non-directory wildcard.
Furthermore, `-lc` mustn't be included due to `mingw` complaining... It
was a bit stupid to include this regardless.
2025-08-12 11:03:21 +02:00
98be56290d fix: tests were still using types.h, rather than intdef.h 2025-08-12 11:02:15 +02:00
4d53f03ad8 add comment to explain sar test 2025-08-12 11:01:32 +02:00
4 changed files with 5 additions and 4 deletions

View File

@@ -48,13 +48,13 @@ CFLAGS += -DNDEBUG -O2
endif endif
CFLAGS += -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/include CFLAGS += -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/include
LDFLAGS += -lc -lm lib/glad/gl.o lib/glfw/src/libglfw3.a LDFLAGS += -lm lib/glad/gl.o lib/glfw/src/libglfw3.a
# get source files # get source files
SRC := $(wildcard src/*.c) $(wildcard src/**/*.c) SRC := $(wildcard src/*.c) $(wildcard src/**/*.c)
RES := $(wildcard res/*.glsl) RES := $(wildcard res/*.glsl)
ifeq ($(DEBUG),test) ifeq ($(DEBUG),test)
SRC := $(filter-out src/main.c, $(SRC)) $(wildcard test/**/*.c) SRC := $(filter-out src/main.c, $(SRC)) $(wildcard test/*.c) $(wildcard test/**/*.c)
endif endif
NAME += $(if $(filter 1,$(ISWIN)),.exe,) NAME += $(if $(filter 1,$(ISWIN)),.exe,)

View File

@@ -1,7 +1,7 @@
#include <stdint.h> #include <stdint.h>
#include "../src/util/conf.h" #include "../src/util/conf.h"
#include "../src/util/types.h" #include "../src/util/intdef.h"
#include "t_arith.h" #include "t_arith.h"
#include "t_conf.h" #include "t_conf.h"
#include "test.h" #include "test.h"

View File

@@ -2,6 +2,7 @@
#include "test.h" #include "test.h"
/* tests arithmetic shift for signed integers (rather than logical shift) */
int test_sar(void *dat) { int test_sar(void *dat) {
(void)dat; (void)dat;
return assert_true(-3 >> 5 == -1); return assert_true(-3 >> 5 == -1);

View File

@@ -5,7 +5,7 @@
#include <string.h> #include <string.h>
#include "../src/util/conf.h" #include "../src/util/conf.h"
#include "../src/util/types.h" #include "../src/util/intdef.h"
#include "test.h" #include "test.h"
// Environment saver structure for conf_getpat tests // Environment saver structure for conf_getpat tests