Compare commits

..

1 Commits

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

View File

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

View File

@ -14,12 +14,16 @@ UNIT_TEST_OBJ_DIR = $(OBJ_DIR)/$(UNIT_TEST_SRC_DIR)
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)" ""
INCLUDES += test/inc
else
#Alpine Linux names libftdi libftdi1
ifneq "$(findstring Alpine,$(shell head -1 /etc/issue))" ""
INCLUDES += /usr/include/libftdi1
LIBS := ftdi1
else
LIBS := ftdi

View File

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