pa1.2: add unit tests
This commit is contained in:
parent
9cca9de2a8
commit
e19e89f70e
8 changed files with 235 additions and 14 deletions
8
nemu/tests/Makefile
Normal file
8
nemu/tests/Makefile
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue