mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-08-06 13:50:49 +08:00
Use Pass string from unity.c in unity_fixture.c to garuntee colour behavior
This commit is contained in:
@ -419,7 +419,8 @@ void UnityConcludeFixtureTest(void)
|
|||||||
{
|
{
|
||||||
if (UnityFixture.Verbose)
|
if (UnityFixture.Verbose)
|
||||||
{
|
{
|
||||||
UnityPrint(" PASS");
|
UnityPrint(" ");
|
||||||
|
UnityPrint(UnityStrPass);
|
||||||
UNITY_EXEC_TIME_STOP();
|
UNITY_EXEC_TIME_STOP();
|
||||||
UNITY_PRINT_EXEC_TIME();
|
UNITY_PRINT_EXEC_TIME();
|
||||||
UNITY_PRINT_EOL();
|
UNITY_PRINT_EOL();
|
||||||
|
16
src/unity.c
16
src/unity.c
@ -21,15 +21,15 @@ void UNITY_OUTPUT_CHAR(int);
|
|||||||
struct UNITY_STORAGE_T Unity;
|
struct UNITY_STORAGE_T Unity;
|
||||||
|
|
||||||
#ifdef UNITY_OUTPUT_COLOR
|
#ifdef UNITY_OUTPUT_COLOR
|
||||||
static const char UnityStrOk[] = "\033[42mOK\033[00m";
|
const char UnityStrOk[] = "\033[42mOK\033[00m";
|
||||||
static const char UnityStrPass[] = "\033[42mPASS\033[00m";
|
const char UnityStrPass[] = "\033[42mPASS\033[00m";
|
||||||
static const char UnityStrFail[] = "\033[41mFAIL\033[00m";
|
const char UnityStrFail[] = "\033[41mFAIL\033[00m";
|
||||||
static const char UnityStrIgnore[] = "\033[43mIGNORE\033[00m";
|
const char UnityStrIgnore[] = "\033[43mIGNORE\033[00m";
|
||||||
#else
|
#else
|
||||||
static const char UnityStrOk[] = "OK";
|
const char UnityStrOk[] = "OK";
|
||||||
static const char UnityStrPass[] = "PASS";
|
const char UnityStrPass[] = "PASS";
|
||||||
static const char UnityStrFail[] = "FAIL";
|
const char UnityStrFail[] = "FAIL";
|
||||||
static const char UnityStrIgnore[] = "IGNORE";
|
const char UnityStrIgnore[] = "IGNORE";
|
||||||
#endif
|
#endif
|
||||||
static const char UnityStrNull[] = "NULL";
|
static const char UnityStrNull[] = "NULL";
|
||||||
static const char UnityStrSpacer[] = ". ";
|
static const char UnityStrSpacer[] = ". ";
|
||||||
|
@ -639,6 +639,11 @@ UNITY_INTERNAL_PTR UnityDoubleToPtr(const double num);
|
|||||||
* Error Strings We Might Need
|
* Error Strings We Might Need
|
||||||
*-------------------------------------------------------*/
|
*-------------------------------------------------------*/
|
||||||
|
|
||||||
|
extern const char UnityStrOk[];
|
||||||
|
extern const char UnityStrPass[];
|
||||||
|
extern const char UnityStrFail[];
|
||||||
|
extern const char UnityStrIgnore[];
|
||||||
|
|
||||||
extern const char UnityStrErrFloat[];
|
extern const char UnityStrErrFloat[];
|
||||||
extern const char UnityStrErrDouble[];
|
extern const char UnityStrErrDouble[];
|
||||||
extern const char UnityStrErr64[];
|
extern const char UnityStrErr64[];
|
||||||
|
Reference in New Issue
Block a user