feature #1

Merged
thoehne merged 3 commits from feature into main 2025-06-25 23:17:03 +00:00
10 changed files with 396 additions and 67 deletions
Showing only changes of commit 97ab23ecdf - Show all commits

View File

@@ -1,41 +0,0 @@
ifndef verbose
SILENT = @
endif
CC := gcc
AR := ar
CFLAGS := -I include/
ifeq ($(colorized), y)
CFLAGS += -D COLORIZED
endif
ifeq ($(no_banner), y)
CFLAGS += -D NO_BANNER
endif
ifeq ($(testing), y)
CFLAGS += -g2 -O0
else
CFLAGS += -O2
endif
all: create_output_dir libset.a
clean:
$(SILENT) rm -rf int/
$(SILENT) rm -f libset.a
create_output_dir:
$(SILENT) mkdir -p int/
libset.a: $(patsubst src/%.c, int/%.o, $(wildcard src/*.c))
@echo "Archiving $^ to $@"
$(SILENT) $(AR) rcs $@ int/**.o
# Recipe
int/%.o: src/%.c
@echo "Building $< => $@"
$(SILENT) $(CC) $(CFLAGS) -c $< -o $@
.PHONY: all clean test create_output_dir

View File

@@ -86,7 +86,7 @@ static void dispatch_single_test(struct SETest *test)
{ {
test->function(test); test->function(test);
log_test_summary(test); log_test_summary(test);
// set_free_all(); set_free_all();
exit(0); exit(0);
} }
} }

View File

@@ -54,6 +54,7 @@ void *set_malloc(size_t n)
if (block_meta_head == NULL) if (block_meta_head == NULL)
{ {
meta->end = meta; meta->end = meta;
block_meta_head = meta;
} }
else else
{ {

View File

@@ -73,7 +73,7 @@ TEST(Other_With_Malloc)
} }
fprintf(stdout, ".\n"); fprintf(stdout, ".\n");
ASSERT_TRUE(true); ASSERT_TRUE(false);
} }
SUIT_ST(Other, Basic_Setup, EMPTY) SUIT_ST(Other, Basic_Setup, EMPTY)