Compare commits

..

1 Commits

Author SHA1 Message Date
Thomas Klaehn
97d7353ef0 Add unit test framework and simple unit test example 2019-07-15 22:44:29 +02:00
3 changed files with 2 additions and 8 deletions

View File

@ -2,7 +2,6 @@
"files.associations": { "files.associations": {
"stdbool.h": "c", "stdbool.h": "c",
"cstdlib": "c", "cstdlib": "c",
"ftdi_dev.h": "c", "ftdi_dev.h": "c"
"time.h": "c"
} }
} }

View File

@ -14,16 +14,12 @@ UNIT_TEST_OBJ_DIR = $(OBJ_DIR)/$(UNIT_TEST_SRC_DIR)
INCLUDES := inc INCLUDES := inc
#Alpine Linux names libftdi libftdi1
ifneq "$(findstring Alpine,$(shell head -1 /etc/issue))" ""
INCLUDES += /usr/include/libftdi1
endif
ifneq "$(findstring $(MAKECMDGOALS), build_unit_test exec_unit_test)" "" ifneq "$(findstring $(MAKECMDGOALS), build_unit_test exec_unit_test)" ""
INCLUDES += test/inc INCLUDES += test/inc
else else
#Alpine Linux names libftdi libftdi1 #Alpine Linux names libftdi libftdi1
ifneq "$(findstring Alpine,$(shell head -1 /etc/issue))" "" ifneq "$(findstring Alpine,$(shell head -1 /etc/issue))" ""
INCLUDES += /usr/include/libftdi1
LIBS := ftdi1 LIBS := ftdi1
else else
LIBS := ftdi LIBS := ftdi

View File

@ -1,7 +1,6 @@
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdbool.h> #include <stdbool.h>
#include <time.h>
#include <fff.h> #include <fff.h>
#include <utest.h> #include <utest.h>