add test_scheduler to support marble tests#1665
Open
kirkshoop wants to merge 55 commits into
Open
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
test_contextimplements a time-scheduler with additional test features.test_contextis used to build tests using marble sequence sendersand marble recorders
test_clock_context&test_clockare used to represent time for the teststest_scheduleris used to queue tasks on thetest_contextat virtual-time pointsOne or more
__test_sequence(s) are constructed from marblediagrams and each schedules marbles on the
test_schedulerwhen connected and started
Once one or more
__test_sequence(s) have been composed into an expression,the
test_contextis used to record the expression results as aset of marbles. To support the testing of infinite sequences
the recording will be requested to stop at a default of 1000ms from
start()if the expression has not completed.The expression result marbles are then compared to an expected
set of marbles generated from a separate marble diagram
An example of usage:
with output:
Marbles:
marble_t<_Clock>represents a signal for a sequencesender and the frame at which the signal occurs/occured
a marble diagram is a string that is parsed into a
vector<marble_t<_Clock>>Example:
this marble diagram
"--a--b--c|"is equivalent to this set of marble_t
which is displayed as
Diagram reference:
Time:
Value:
Sequence:
record_marbles()will record a set of marbles from the signals of the specified sequence sender