tests: add intrusive list tests
This commit is contained in:
parent
6b0eab2f51
commit
67ae3d45ee
3 changed files with 598 additions and 0 deletions
34
Makefile
Normal file
34
Makefile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
CC = gcc
|
||||
CFLAGS = -Wall -Wextra -pedantic -std=c99 -Werror
|
||||
CPPFLAGS = -Iinclude/ -Itests/
|
||||
VPATH = src/ tests/
|
||||
|
||||
SRC = \
|
||||
src/list.c \
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
|
||||
.PHONY: all
|
||||
all: $(OBJS)
|
||||
|
||||
.PHONY: check
|
||||
check: testsuite
|
||||
./testsuite --verbose
|
||||
|
||||
TEST_SRC = \
|
||||
tests/list.c \
|
||||
tests/testsuite.c \
|
||||
|
||||
TEST_OBJS = $(TEST_SRC:.c=.o)
|
||||
|
||||
testsuite: LDFLAGS+=-lcriterion -fsanitize=address
|
||||
testsuite: CFLAGS+=-fsanitize=address
|
||||
testsuite: CFLAGS+=-g
|
||||
testsuite: $(OBJS) $(TEST_OBJS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) $(OBJS)
|
||||
$(RM) $(TEST_OBJS)
|
||||
$(RM) testsuite
|
||||
Loading…
Add table
Add a link
Reference in a new issue