Fix #1912, Update time tests to use bitmask check macros #1913
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the contribution
The new bitmask check macros provide more concise information the resulting log file. This updates the time test to use those macros when checking the state flags.
Testing performed
Build and run all tests, confirm log output is correct
Expected behavior changes
Improved test log file info
System(s) tested on
Ubuntu
Additional context
Note this also changes the code to call
CFE_TIME_GetClockInfo()
repeatedly, rather than storing in a local variable and checking that value. The intent is to clearly indicate in the log that this function was invoked, not just what its output was. This helps with tracking/confirming that the function is covered by the functional test.This just reads a global so it should not be different in subsequent calls, unless the clock actually changes state during the test. But that was already a risk with the separate call to
CFE_TIME_GetClockState
, this does not really change that - and the flags are not really connected otherwise.Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.