mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-05-21 09:27:53 +08:00
making new flush routines work under all defined conditions.
This commit is contained in:
@ -63,7 +63,7 @@ void tearDown(void)
|
|||||||
|
|
||||||
void test_%1$s_NeedToImplement(void)
|
void test_%1$s_NeedToImplement(void)
|
||||||
{
|
{
|
||||||
TEST_IGNORE();
|
TEST_IGNORE_MESSAGE("Need to Implement %1$s");
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -9,10 +9,7 @@
|
|||||||
|
|
||||||
/* If omitted from header, declare overrideable prototypes here so they're ready for use */
|
/* If omitted from header, declare overrideable prototypes here so they're ready for use */
|
||||||
#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
|
#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
|
||||||
int UNITY_OUTPUT_CHAR(int);
|
void UNITY_OUTPUT_CHAR(int);
|
||||||
#endif
|
|
||||||
#ifdef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
|
|
||||||
int UNITY_OUTPUT_FLUSH(void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Helpful macros for us to use here */
|
/* Helpful macros for us to use here */
|
||||||
@ -338,7 +335,7 @@ void UnityConcludeTest(void)
|
|||||||
Unity.CurrentTestFailed = 0;
|
Unity.CurrentTestFailed = 0;
|
||||||
Unity.CurrentTestIgnored = 0;
|
Unity.CurrentTestIgnored = 0;
|
||||||
UNITY_PRINT_EOL();
|
UNITY_PRINT_EOL();
|
||||||
UNITY_OUTPUT_FLUSH();
|
UNITY_FLUSH_CALL();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------*/
|
/*-----------------------------------------------*/
|
||||||
@ -1298,7 +1295,7 @@ int UnityEnd(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
UNITY_PRINT_EOL();
|
UNITY_PRINT_EOL();
|
||||||
UNITY_OUTPUT_FLUSH();
|
UNITY_FLUSH_CALL();
|
||||||
UNITY_OUTPUT_COMPLETE();
|
UNITY_OUTPUT_COMPLETE();
|
||||||
return (int)(Unity.TestFailures);
|
return (int)(Unity.TestFailures);
|
||||||
}
|
}
|
||||||
|
@ -299,9 +299,9 @@ extern void UNITY_OUTPUT_CHAR(int);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef UNITY_OUTPUT_FLUSH
|
#ifndef UNITY_OUTPUT_FLUSH
|
||||||
/* Default to using putchar, which is defined in stdio.h */
|
/* Default to using fflush, which is defined in stdio.h */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define UNITY_OUTPUT_FLUSH() (void)fflush(stdout)
|
#define UNITY_OUTPUT_FLUSH (void)fflush(stdout)
|
||||||
#else
|
#else
|
||||||
/* If defined as something else, make sure we declare it here so it's ready for use */
|
/* If defined as something else, make sure we declare it here so it's ready for use */
|
||||||
#ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
|
#ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
|
||||||
@ -309,6 +309,12 @@ extern void UNITY_OUTPUT_FLUSH(void);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef UNITY_OUTPUT_FLUSH
|
||||||
|
#define UNITY_FLUSH_CALL()
|
||||||
|
#else
|
||||||
|
#define UNITY_FLUSH_CALL() UNITY_OUTPUT_FLUSH
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef UNITY_PRINT_EOL
|
#ifndef UNITY_PRINT_EOL
|
||||||
#define UNITY_PRINT_EOL() UNITY_OUTPUT_CHAR('\n')
|
#define UNITY_PRINT_EOL() UNITY_OUTPUT_CHAR('\n')
|
||||||
#endif
|
#endif
|
||||||
|
@ -60,6 +60,8 @@ compiler:
|
|||||||
- UNITY_INCLUDE_DOUBLE
|
- UNITY_INCLUDE_DOUBLE
|
||||||
- UNITY_SUPPORT_TEST_CASES
|
- UNITY_SUPPORT_TEST_CASES
|
||||||
- UNITY_SUPPORT_64
|
- UNITY_SUPPORT_64
|
||||||
|
- UNITY_OUTPUT_FLUSH
|
||||||
|
- UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
|
||||||
object_files:
|
object_files:
|
||||||
prefix: '-o'
|
prefix: '-o'
|
||||||
extension: '.o'
|
extension: '.o'
|
||||||
|
Reference in New Issue
Block a user