mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-09-07 18:59:58 +00:00
Added flushSpy
This commit is contained in:
+2
-2
@@ -15,8 +15,8 @@ CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstri
|
|||||||
CFLAGS += $(DEBUG)
|
CFLAGS += $(DEBUG)
|
||||||
DEFINES = -D UNITY_OUTPUT_CHAR=putcharSpy
|
DEFINES = -D UNITY_OUTPUT_CHAR=putcharSpy
|
||||||
DEFINES += -D UNITY_OUTPUT_CHAR_HEADER_DECLARATION=putcharSpy\(int\)
|
DEFINES += -D UNITY_OUTPUT_CHAR_HEADER_DECLARATION=putcharSpy\(int\)
|
||||||
#DEFINES += -D UNITY_OUTPUT_FLUSH=flushSpy
|
DEFINES += -D UNITY_OUTPUT_FLUSH=flushSpy
|
||||||
#DEFINES += -D UNITY_OUTPUT_FLUSH_HEADER_DECLARATION=flushSpy\(void\)
|
DEFINES += -D UNITY_OUTPUT_FLUSH_HEADER_DECLARATION=flushSpy\(void\)
|
||||||
DEFINES += $(UNITY_SUPPORT_64) $(UNITY_INCLUDE_DOUBLE)
|
DEFINES += $(UNITY_SUPPORT_64) $(UNITY_INCLUDE_DOUBLE)
|
||||||
UNITY_SUPPORT_64 = -D UNITY_SUPPORT_64
|
UNITY_SUPPORT_64 = -D UNITY_SUPPORT_64
|
||||||
UNITY_INCLUDE_DOUBLE = -D UNITY_INCLUDE_DOUBLE
|
UNITY_INCLUDE_DOUBLE = -D UNITY_INCLUDE_DOUBLE
|
||||||
|
|||||||
Vendored
+4
-1
@@ -21,7 +21,10 @@
|
|||||||
|
|
||||||
/* Support for Meta Test Rig */
|
/* Support for Meta Test Rig */
|
||||||
#define TEST_CASE(a)
|
#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 */
|
/* Global Variables Used During These Tests */
|
||||||
int CounterSetup = 0;
|
int CounterSetup = 0;
|
||||||
|
|||||||
+4
-1
@@ -13,7 +13,10 @@ TEST_FILE("some_file.c")
|
|||||||
|
|
||||||
/* Support for Meta Test Rig */
|
/* Support for Meta Test Rig */
|
||||||
#define TEST_CASE(a)
|
#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 */
|
/* Global Variables Used During These Tests */
|
||||||
int CounterSetup = 0;
|
int CounterSetup = 0;
|
||||||
|
|||||||
+4
-1
@@ -22,7 +22,10 @@
|
|||||||
|
|
||||||
/* Support for Meta Test Rig */
|
/* Support for Meta Test Rig */
|
||||||
#define TEST_CASE(a)
|
#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 */
|
/* Global Variables Used During These Tests */
|
||||||
int CounterSetup = 0;
|
int CounterSetup = 0;
|
||||||
|
|||||||
@@ -8,10 +8,13 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
|
|
||||||
void putcharSpy(int c) { (void)putchar(c);} // include passthrough for linking tests
|
/* Support for Meta Test Rig */
|
||||||
|
|
||||||
#define TEST_CASE(...)
|
#define TEST_CASE(...)
|
||||||
|
|
||||||
|
/* Include Passthroughs for Linking Tests */
|
||||||
|
void putcharSpy(int c) { (void)putchar(c);}
|
||||||
|
void flushSpy(int c) {}
|
||||||
|
|
||||||
#define EXPECT_ABORT_BEGIN \
|
#define EXPECT_ABORT_BEGIN \
|
||||||
if (TEST_PROTECT()) \
|
if (TEST_PROTECT()) \
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3335,6 +3335,14 @@ void putcharSpy(int c)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
void flushSpy(void)
|
||||||
|
{
|
||||||
|
static unsigned int calls = 0;
|
||||||
|
calls++; // count every call
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void testFailureCountIncrementsAndIsReturnedAtEnd(void)
|
void testFailureCountIncrementsAndIsReturnedAtEnd(void)
|
||||||
{
|
{
|
||||||
UNITY_UINT savedFailures = Unity.TestFailures;
|
UNITY_UINT savedFailures = Unity.TestFailures;
|
||||||
|
|||||||
Reference in New Issue
Block a user