testing with unity
This commit is contained in:
parent
6568720c6d
commit
4277d58f26
3
Makefile
Normal file
3
Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
.PHONY: assertions
|
||||
assertions:
|
||||
$(MAKE) -C assertions/
|
2
assertions/.gitignore
vendored
Normal file
2
assertions/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
target/
|
||||
test_runners/
|
27
assertions/Makefile
Normal file
27
assertions/Makefile
Normal file
@ -0,0 +1,27 @@
|
||||
CLEANUP = rm -f
|
||||
|
||||
C_COMPILER=clang
|
||||
|
||||
UNITY_ROOT=../extern/Unity
|
||||
|
||||
CFLAGS = -std=c17
|
||||
|
||||
INC_DIRS=-I$(UNITY_ROOT)/src
|
||||
|
||||
SRC_NAMESPACES_FS_1=$(UNITY_ROOT)/src/unity.c namespaces/fs/TestUnshare.c test_runners/namespaces_fs_TestUnshare_Runner.c
|
||||
TARGET_NAMESPACES_FS_1=target/test_namespaces_fs
|
||||
|
||||
all: clean default
|
||||
|
||||
default: $(TARGET_NAMESPACES_FS_1)
|
||||
- ./$(TARGET_NAMESPACES_FS_1)
|
||||
|
||||
$(TARGET_NAMESPACES_FS_1): $(SRC_NAMESPACES_FS_1)
|
||||
$(C_COMPILER) $(CFLAGS) $(INC_DIRS) $(SYMBOLS) $(SRC_NAMESPACES_FS_1) -o $(TARGET_NAMESPACES_FS_1)
|
||||
|
||||
test_runners/namespaces_fs_TestUnshare_Runner.c: namespaces/fs/TestUnshare.c
|
||||
ruby $(UNITY_ROOT)/auto/generate_test_runner.rb namespaces/fs/TestUnshare.c test_runners/namespaces_fs_TestUnshare_Runner.c
|
||||
|
||||
clean:
|
||||
$(CLEANUP) $(TARGET_NAMESPACES_FS_1)
|
||||
mkdir -p test_runners/ target/
|
6
assertions/namespaces/fs/TestUnshare.c
Normal file
6
assertions/namespaces/fs/TestUnshare.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "unity.h"
|
||||
|
||||
void setUp(void) {}
|
||||
void tearDown(void) {}
|
||||
|
||||
void test_alwaysSucceeds_succeeds(void) { TEST_ASSERT_EQUAL(1, 1); }
|
Reference in New Issue
Block a user