mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-07-17 15:39:05 +08:00
- Added ability to tack on details to a Unity failure message.
This commit is contained in:
@ -399,6 +399,10 @@ struct _Unity
|
||||
{
|
||||
const char* TestFile;
|
||||
const char* CurrentTestName;
|
||||
#ifndef UNITY_EXCLUDE_DETAILS
|
||||
const char* CurrentDetail1;
|
||||
const char* CurrentDetail2;
|
||||
#endif
|
||||
UNITY_LINE_TYPE CurrentTestLineNumber;
|
||||
UNITY_COUNTER_TYPE NumberOfTests;
|
||||
UNITY_COUNTER_TYPE TestFailures;
|
||||
@ -419,6 +423,16 @@ int UnityEnd(void);
|
||||
void UnityConcludeTest(void);
|
||||
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
|
||||
|
||||
#ifndef UNITY_EXCLUDE_DETAILS
|
||||
#define UNITY_CLR_DETAILS() { Unity.CurrentDetail1 = 0; Unity.CurrentDetail2 = 0; }
|
||||
#define UNITY_SET_DETAIL(d1) { Unity.CurrentDetail1 = d1; Unity.CurrentDetail2 = 0; }
|
||||
#define UNITY_SET_DETAILS(d1,d2) { Unity.CurrentDetail1 = d1; Unity.CurrentDetail2 = d2; }
|
||||
#else
|
||||
#define UNITY_CLR_DETAILS()
|
||||
#define UNITY_SET_DETAIL(d1)
|
||||
#define UNITY_SET_DETAILS(d1,d2)
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Test Output
|
||||
//-------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user