mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-29 13:57:31 +08:00
update fixture tests too
This commit is contained in:
@ -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
|
|||||||
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)
|
|||||||
/* 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)
|
|||||||
#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)
|
||||||
|
Reference in New Issue
Block a user