preparing to switch to Unity test framework
This commit is contained in:
parent
3d8224657c
commit
7bb8f7deba
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "contrib/Unity"]
|
||||||
|
path = contrib/Unity
|
||||||
|
url = https://github.com/ThrowTheSwitch/Unity.git
|
2
Makefile
2
Makefile
@ -23,6 +23,6 @@ clean:
|
|||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
build/c%: $(OFFSHORE_PROJECTS)/c$$*/*.c $$(OFFSHORE_MAINS)/c$$*.c $$(wildcard $(OFFSHORE_MAINS)/common/*.c)
|
build/c%: $(OFFSHORE_PROJECTS)/c$$*/*.c $$(OFFSHORE_MAINS)/c$$*.c $$(wildcard $(OFFSHORE_MAINS)/common/*.c)
|
||||||
mkdir -p $(@D)
|
mkdir -p $(@D)
|
||||||
$(CC) -o $@ $(CFLAGS_MANDATORY) -Icommon $(CFLAGS) $^
|
$(CC) -o $@ $(CFLAGS_MANDATORY) -Icommon -I contrib/Unity/src $(CFLAGS) $^
|
||||||
norme: $$(wildcard $(OFFSHORE_PROJECTS)/c*)
|
norme: $$(wildcard $(OFFSHORE_PROJECTS)/c*)
|
||||||
norminette $^ || true
|
norminette $^ || true
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
TEST_PRINT_BUFCMP(TEST_FUNC_CASE, TEST_BUF_ORIG_SRC, TEST_BUF_ORIG_DEST, TEST_BUF_MOD_SRC, TEST_BUF_MOD_DEST); \
|
TEST_PRINT_BUFCMP(TEST_FUNC_CASE, TEST_BUF_ORIG_SRC, TEST_BUF_ORIG_DEST, TEST_BUF_MOD_SRC, TEST_BUF_MOD_DEST); \
|
||||||
TEST_PRINT_RETVALS; \
|
TEST_PRINT_RETVALS; \
|
||||||
TEST_RESET_BUFFERS(TEST_BUF_PRISCINE_SRC, TEST_BUF_PRISCINE_DEST, TEST_BUF_ORIG_SRC, TEST_BUF_ORIG_DEST, TEST_BUF_MOD_SRC, TEST_BUF_MOD_DEST);
|
TEST_RESET_BUFFERS(TEST_BUF_PRISCINE_SRC, TEST_BUF_PRISCINE_DEST, TEST_BUF_ORIG_SRC, TEST_BUF_ORIG_DEST, TEST_BUF_MOD_SRC, TEST_BUF_MOD_DEST);
|
||||||
|
|
||||||
#define TEST_SEED(type) \
|
#define TEST_SEED(type) \
|
||||||
char s[TEST_BUF_SIZE] = TEST_SOURCE; \
|
char s[TEST_BUF_SIZE] = TEST_SOURCE; \
|
||||||
char d[TEST_BUF_SIZE] = TEST_DESTINATION; \
|
char d[TEST_BUF_SIZE] = TEST_DESTINATION; \
|
||||||
@ -51,7 +52,9 @@
|
|||||||
#define FG_WHT "\x1B[37m"
|
#define FG_WHT "\x1B[37m"
|
||||||
#define FG_MAG "\x1B[35m"
|
#define FG_MAG "\x1B[35m"
|
||||||
#define COLOR_RESET "\x1B[0m"
|
#define COLOR_RESET "\x1B[0m"
|
||||||
#endif
|
|
||||||
|
|
||||||
int bufcmp(char*, char*, int);
|
int bufcmp(char*, char*, int);
|
||||||
void dump(char*, int);
|
void dump(char*, int);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
1
contrib/Unity
Submodule
1
contrib/Unity
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit bf560290f6020737eafaa8b5cbd2177c3956c03f
|
Loading…
Reference in New Issue
Block a user