mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-12-18 06:18:37 +08:00
Implement optional printing of execution time for each test
This commit is contained in:
committed by
Shreyas Balakrishna
parent
05daf95d4e
commit
cc909efed3
@@ -370,6 +370,7 @@ void UnityConcludeTest(void)
|
||||
|
||||
Unity.CurrentTestFailed = 0;
|
||||
Unity.CurrentTestIgnored = 0;
|
||||
UNITY_EXEC_TIME_RESET();
|
||||
UNITY_PRINT_EOL();
|
||||
UNITY_FLUSH_CALL();
|
||||
}
|
||||
@@ -958,7 +959,7 @@ void UnityAssertNumbersWithin(const UNITY_UINT delta,
|
||||
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
|
||||
{
|
||||
if (actual > expected)
|
||||
Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(actual - expected) > delta);
|
||||
Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(actual - expected) > delta);
|
||||
else
|
||||
Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(expected - actual) > delta);
|
||||
}
|
||||
@@ -1351,6 +1352,7 @@ void UnityBegin(const char* filename)
|
||||
Unity.TestIgnores = 0;
|
||||
Unity.CurrentTestFailed = 0;
|
||||
Unity.CurrentTestIgnored = 0;
|
||||
UNITY_EXEC_TIME_RESET();
|
||||
|
||||
UNITY_CLR_DETAILS();
|
||||
UNITY_OUTPUT_START();
|
||||
|
||||
Reference in New Issue
Block a user