diff --git a/test/Makefile b/test/Makefile index f37b9ea630d9326c261649106fe0c504b99d66f5..89ece81dd0d1e24202edfdd7a16a23e8170a83ae 100644 --- a/test/Makefile +++ b/test/Makefile @@ -15,8 +15,8 @@ CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstri CFLAGS += $(DEBUG) DEFINES = -D UNITY_OUTPUT_CHAR=putcharSpy DEFINES += -D UNITY_OUTPUT_CHAR_HEADER_DECLARATION=putcharSpy\(int\) -#DEFINES += -D UNITY_OUTPUT_FLUSH=flushSpy -#DEFINES += -D UNITY_OUTPUT_FLUSH_HEADER_DECLARATION=flushSpy\(void\) +DEFINES += -D UNITY_OUTPUT_FLUSH=flushSpy +DEFINES += -D UNITY_OUTPUT_FLUSH_HEADER_DECLARATION=flushSpy\(void\) DEFINES += $(UNITY_SUPPORT_64) $(UNITY_INCLUDE_DOUBLE) UNITY_SUPPORT_64 = -D UNITY_SUPPORT_64 UNITY_INCLUDE_DOUBLE = -D UNITY_INCLUDE_DOUBLE diff --git a/test/testdata/testRunnerGenerator.c b/test/testdata/testRunnerGenerator.c index e036dd96749d8ff57b52354633fe506271521fa0..7a4d63b8a2c51190601615facbe1cf21ffe5bb1c 100644 --- a/test/testdata/testRunnerGenerator.c +++ b/test/testdata/testRunnerGenerator.c @@ -21,7 +21,10 @@ /* Support for Meta Test Rig */ #define TEST_CASE(a) -void putcharSpy(int c) { (void)putchar(c);} // include passthrough for linking tests + +/* Include Passthroughs for Linking Tests */ +void putcharSpy(int c) { (void)putchar(c);} +void flushSpy(int c) {} /* Global Variables Used During These Tests */ int CounterSetup = 0; diff --git a/test/testdata/testRunnerGeneratorSmall.c b/test/testdata/testRunnerGeneratorSmall.c index c683749480fc8b7794f1dc1a793322b2c70e1092..a8707fb6c9d9972d3f0895441164eaf0b7681122 100644 --- a/test/testdata/testRunnerGeneratorSmall.c +++ b/test/testdata/testRunnerGeneratorSmall.c @@ -13,7 +13,10 @@ TEST_FILE("some_file.c") /* Support for Meta Test Rig */ #define TEST_CASE(a) -void putcharSpy(int c) { (void)putchar(c);} // include passthrough for linking tests + +/* Include Passthroughs for Linking Tests */ +void putcharSpy(int c) { (void)putchar(c);} +void flushSpy(int c) {} /* Global Variables Used During These Tests */ int CounterSetup = 0; diff --git a/test/testdata/testRunnerGeneratorWithMocks.c b/test/testdata/testRunnerGeneratorWithMocks.c index 7eb0b671f6b90c502b9c53ce305425000f2e7789..a7d622d5962c72fd922096bf0b06cd026277bd65 100644 --- a/test/testdata/testRunnerGeneratorWithMocks.c +++ b/test/testdata/testRunnerGeneratorWithMocks.c @@ -22,7 +22,10 @@ /* Support for Meta Test Rig */ #define TEST_CASE(a) -void putcharSpy(int c) { (void)putchar(c);} // include passthrough for linking tests + +/* Include Passthroughs for Linking Tests */ +void putcharSpy(int c) { (void)putchar(c);} +void flushSpy(int c) {} /* Global Variables Used During These Tests */ int CounterSetup = 0; diff --git a/test/tests/testparameterized.c b/test/tests/testparameterized.c index aa6d1732c2de1a30b68b2b49ebe241c1536e930b..7be7f2bd02784b9839d4d2e11ba397fa68ddb038 100644 --- a/test/tests/testparameterized.c +++ b/test/tests/testparameterized.c @@ -8,10 +8,13 @@ #include #include "unity.h" -void putcharSpy(int c) { (void)putchar(c);} // include passthrough for linking tests - +/* Support for Meta Test Rig */ #define TEST_CASE(...) +/* Include Passthroughs for Linking Tests */ +void putcharSpy(int c) { (void)putchar(c);} +void flushSpy(int c) {} + #define EXPECT_ABORT_BEGIN \ if (TEST_PROTECT()) \ { diff --git a/test/tests/testunity.c b/test/tests/testunity.c index af06647f81c0565dd20b0593b6b2d0586fe5d6db..1884cbb1ae9639434fbfad42431a86e9a54139ff 100644 --- a/test/tests/testunity.c +++ b/test/tests/testunity.c @@ -3335,6 +3335,14 @@ void putcharSpy(int c) #endif } +#if 0 +void flushSpy(void) +{ + static unsigned int calls = 0; + calls++; // count every call +} +#endif + void testFailureCountIncrementsAndIsReturnedAtEnd(void) { UNITY_UINT savedFailures = Unity.TestFailures;