提交 8d044e60 编写于 作者: M mvandervoord

update fixture tests too

上级 368a7d89
...@@ -52,7 +52,7 @@ def build_compiler_fields ...@@ -52,7 +52,7 @@ def build_compiler_fields
defines = if $cfg['compiler']['defines']['items'].nil? defines = if $cfg['compiler']['defines']['items'].nil?
'' ''
else else
squash($cfg['compiler']['defines']['prefix'], $cfg['compiler']['defines']['items'] + ['UNITY_OUTPUT_CHAR=UnityOutputCharSpy_OutputChar'] + ['UNITY_OUTPUT_CHAR_HEADER_DECLARATION=UnityOutputCharSpy_OutputChar\(int\)']) squash($cfg['compiler']['defines']['prefix'], $cfg['compiler']['defines']['items'] + ['UNITY_OUTPUT_CHAR=UnityOutputCharSpy_OutputChar'] + ['UNITY_OUTPUT_CHAR_HEADER_DECLARATION=UnityOutputCharSpy_OutputChar(int)'])
end end
options = squash('', $cfg['compiler']['options']) options = squash('', $cfg['compiler']['options'])
includes = squash($cfg['compiler']['includes']['prefix'], $cfg['compiler']['includes']['items']) includes = squash($cfg['compiler']['includes']['prefix'], $cfg['compiler']['includes']['items'])
......
...@@ -6,7 +6,7 @@ endif ...@@ -6,7 +6,7 @@ endif
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
CFLAGS += $(DEBUG) CFLAGS += $(DEBUG)
DEFINES = -D UNITY_OUTPUT_CHAR=UnityOutputCharSpy_OutputChar DEFINES = -D UNITY_OUTPUT_CHAR=UnityOutputCharSpy_OutputChar
DEFINES += -D UNITY_OUTPUT_CHAR_HEADER_DECLARATION=UnityOutputCharSpy_OutputChar\(int\) DEFINES += -D UNITY_OUTPUT_CHAR_HEADER_DECLARATION=UnityOutputCharSpy_OutputChar(int)
SRC = ../src/unity_fixture.c \ SRC = ../src/unity_fixture.c \
../../../src/unity.c \ ../../../src/unity.c \
unity_fixture_Test.c \ unity_fixture_Test.c \
......
...@@ -345,7 +345,7 @@ TEST_TEAR_DOWN(LeakDetection) ...@@ -345,7 +345,7 @@ TEST_TEAR_DOWN(LeakDetection)
/* This tricky set of defines lets us see if we are using the Spy, returns 1 if true */ /* This tricky set of defines lets us see if we are using the Spy, returns 1 if true */
#ifdef __STDC_VERSION__ #ifdef __STDC_VERSION__
#if UNITY_SUPPORT_VARIADIC_MACROS #ifdef UNITY_SUPPORT_VARIADIC_MACROS
#define USING_SPY_AS(a) EXPAND_AND_USE_2ND(ASSIGN_VALUE(a), 0) #define USING_SPY_AS(a) EXPAND_AND_USE_2ND(ASSIGN_VALUE(a), 0)
#define ASSIGN_VALUE(a) VAL_##a #define ASSIGN_VALUE(a) VAL_##a
#define VAL_UnityOutputCharSpy_OutputChar 0, 1 #define VAL_UnityOutputCharSpy_OutputChar 0, 1
...@@ -357,11 +357,13 @@ TEST_TEAR_DOWN(LeakDetection) ...@@ -357,11 +357,13 @@ TEST_TEAR_DOWN(LeakDetection)
#endif /* UNITY_SUPPORT_VARIADIC_MACROS */ #endif /* UNITY_SUPPORT_VARIADIC_MACROS */
#else /* __STDC_VERSION__ else */ #else /* __STDC_VERSION__ else */
#define UnityOutputCharSpy_OutputChar 42 #define UnityOutputCharSpy_OutputChar 42
#if UNITY_OUTPUT_CHAR == UnityOutputCharSpy_OutputChar /* Works if no -Wundef -Werror */ #if UNITY_OUTPUT_CHAR == UnityOutputCharSpy_OutputChar /* Works if no -Wundef -Werror */
#define USING_OUTPUT_SPY #define USING_OUTPUT_SPY
#endif #endif
#undef UnityOutputCharSpy_OutputChar #undef UnityOutputCharSpy_OutputChar
#endif /* __STDC_VERSION__ */ #endif /* __STDC_VERSION__ */
TEST(LeakDetection, DetectsLeak) TEST(LeakDetection, DetectsLeak)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册