mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-12-18 06:18:37 +08:00
Add options for different output formats
This commit is contained in:
32
src/unity.c
32
src/unity.c
@@ -570,12 +570,44 @@ void UnityPrintFloat(const UNITY_DOUBLE input_number)
|
||||
/*-----------------------------------------------*/
|
||||
static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
|
||||
{
|
||||
#ifdef UNITY_OUTPUT_FOR_ECLIPSE
|
||||
UNITY_OUTPUT_CHAR('(');
|
||||
UnityPrint(file);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
UnityPrintNumber((UNITY_INT)line);
|
||||
UNITY_OUTPUT_CHAR(')');
|
||||
UNITY_OUTPUT_CHAR(' ');
|
||||
UnityPrint(Unity.CurrentTestName);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
#else
|
||||
#ifdef UNITY_OUTPUT_FOR_IAR_WORKBENCH
|
||||
UnityPrint("<SRCREF line=");
|
||||
UnityPrintNumber((UNITY_INT)line);
|
||||
UnityPrint(" file=\"");
|
||||
UnityPrint(file);
|
||||
UNITY_OUTPUT_CHAR('"');
|
||||
UNITY_OUTPUT_CHAR('>');
|
||||
UnityPrint(Unity.CurrentTestName);
|
||||
UnityPrint("</SRCREF> ");
|
||||
#else
|
||||
#ifdef UNITY_OUTPUT_FOR_QT_CREATOR
|
||||
UnityPrint("file://");
|
||||
UnityPrint(file);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
UnityPrintNumber((UNITY_INT)line);
|
||||
UNITY_OUTPUT_CHAR(' ');
|
||||
UnityPrint(Unity.CurrentTestName);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
#else
|
||||
UnityPrint(file);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
UnityPrintNumber((UNITY_INT)line);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
UnityPrint(Unity.CurrentTestName);
|
||||
UNITY_OUTPUT_CHAR(':');
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user