pa1.2: add unit tests

This commit is contained in:
xinyangli 2024-01-13 10:38:20 +08:00
parent 9cca9de2a8
commit e19e89f70e
No known key found for this signature in database
8 changed files with 235 additions and 14 deletions

8
nemu/tests/Makefile Normal file
View file

@ -0,0 +1,8 @@
TEST_SRCS += tests/expr_test.c
$(OBJ_DIR)/%: %.c $(TEST_OBJS) app
@mkdir -p $(dir $@)
@echo + CC $<
@$(CC) $(CFLAGS) -o $@.o -c $<
@echo + LD $@
@$(LD) $(LIBS) $(LDFLAGS) -o $@ $(TEST_OBJS) $@.o