Implement optional printing of execution time for each test

This commit is contained in:
balaksh
2017-04-10 15:08:01 +12:00
committed by Shreyas Balakrishna
parent 05daf95d4e
commit cc909efed3
5 changed files with 75 additions and 1 deletions

View File

@@ -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();