mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-26 18:01:35 +01:00
Improvements to the execution time feature
- Running time macros have been made more portable, previously it was not possible to override all macros - Running time macros will be executed by default test runner, and auto test runners - Adds a default execution time implementation for unix. (Previous default implementation only worked on Windows) - For embedded platforms there is a simple method of getting a default implementation by defining a single macro UNITY_CLOCK_MS() - Removed need for UNITY_EXEC_TIME_RESET. This was not being used for the default implementations, if anything ever did need reset-like functionality it could simply be wrapped up with the start or stop macros for that platform
This commit is contained in:
@@ -599,7 +599,7 @@ void UnityConcludeTest(void)
|
||||
|
||||
Unity.CurrentTestFailed = 0;
|
||||
Unity.CurrentTestIgnored = 0;
|
||||
UNITY_EXEC_TIME_RESET();
|
||||
UNITY_PRINT_EXEC_TIME();
|
||||
UNITY_PRINT_EOL();
|
||||
UNITY_FLUSH_CALL();
|
||||
}
|
||||
@@ -1589,6 +1589,7 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
|
||||
Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)FuncLineNum;
|
||||
Unity.NumberOfTests++;
|
||||
UNITY_CLR_DETAILS();
|
||||
UNITY_EXEC_TIME_START();
|
||||
if (TEST_PROTECT())
|
||||
{
|
||||
setUp();
|
||||
@@ -1598,6 +1599,7 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
|
||||
{
|
||||
tearDown();
|
||||
}
|
||||
UNITY_EXEC_TIME_STOP();
|
||||
UnityConcludeTest();
|
||||
}
|
||||
|
||||
@@ -1612,7 +1614,6 @@ 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