mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-07-14 16:45:45 +08: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:
@ -299,6 +299,7 @@ class UnityTestRunnerGenerator
|
||||
output.puts(' Unity.CurrentTestLineNumber = TestLineNum; \\')
|
||||
output.puts(' if (UnityTestMatches()) { \\') if @options[:cmdline_args]
|
||||
output.puts(' Unity.NumberOfTests++; \\')
|
||||
output.puts(' UNITY_EXEC_TIME_START(); \\')
|
||||
output.puts(' CMock_Init(); \\') unless used_mocks.empty?
|
||||
output.puts(' UNITY_CLR_DETAILS(); \\') unless used_mocks.empty?
|
||||
output.puts(' if (TEST_PROTECT()) \\')
|
||||
@ -315,6 +316,7 @@ class UnityTestRunnerGenerator
|
||||
output.puts(' CMock_Verify(); \\') unless used_mocks.empty?
|
||||
output.puts(' } \\')
|
||||
output.puts(' CMock_Destroy(); \\') unless used_mocks.empty?
|
||||
output.puts(' UNITY_EXEC_TIME_STOP(); \\')
|
||||
output.puts(' UnityConcludeTest(); \\')
|
||||
output.puts(' } \\') if @options[:cmdline_args]
|
||||
output.puts("}\n")
|
||||
|
Reference in New Issue
Block a user