Delete function call syntax from Spy detect macros

This fixes #168. See that github.com issue for more discussion.
 Allows the tests to build when putchar() is defined as a macro
  with parenthesis around it, as in the ARM embedded gcc compiler.
This commit is contained in:
jsalling
2016-02-25 10:41:04 -06:00
parent 324000d8e2
commit f55bed38a6
2 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -2175,12 +2175,12 @@ void testIgnoredAndThenFailInTearDown(void)
// Tricky series of macros to set USING_OUTPUT_SPY
#define USING_SPY_AS(a) EXPAND_AND_USE_2ND(ASSIGN_VALUE(a), 0)
#define ASSIGN_VALUE(a) VAL_FUNC_##a
#define VAL_FUNC_putcharSpy() 0, 1
#define ASSIGN_VALUE(a) VAL_##a
#define VAL_putcharSpy 0, 1
#define EXPAND_AND_USE_2ND(a, b) SECOND_PARAM(a, b, throwaway)
#define SECOND_PARAM(a, b, ...) b
#if USING_SPY_AS(UNITY_OUTPUT_CHAR())
#define USING_OUTPUT_SPY // true only if UNITY_OUTPUT_CHAR = putchar_Spy
#if USING_SPY_AS(UNITY_OUTPUT_CHAR)
#define USING_OUTPUT_SPY // true only if UNITY_OUTPUT_CHAR = putcharSpy
#endif
#ifdef USING_OUTPUT_SPY