Repository navigation
Run procedures in tests the way a run does, and share the test DUTs - #60
Merged
Merged
Conversation
Tests that run a whole procedure now go through the runner's own step execution (Run.outcome/passes/passing): the steps, then their deferred checks, then the cleanup. About 25 tests had their own loops, many of which never evaluated the deferred checks or ran the cleanup. Tests that look at every request, or count the steps that fail, use Run.everyStep. The test DUTs that each declared a response queue now extend RespondingDriver, and StubDriver builds its reporter lazily from an overridable plugin, so DUTs whose plugin refers to their own state no longer build a reporter and replace it. A leftover debug print in CtoChecksTest is gone. Part of #59.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Item 1 of #59.
TestRunner.runStepsis nowprivate[conformance]. A new test helper,Run, runs a definition the way a run does: steps, then deferred checks, then cleanup. It offersoutcome,passesandpassing, wherepassingthrows unless the procedure passes.passesnow counts a skipped procedure as not passing.Run.everyStepruns every step whatever happens and counts the failures, as before. It's for the tests that look at every request a procedure sends, or count the steps that fail.RespondingDriver, which now hasenqueue(a message or hex),responseWaitingandclose.StubDriverbuilds its reporter lazily, either from a supplied reporter or from an overridabletestPlugin. The eight DUTs whose plugin refers to their own state no longer build a reporter only to replace it.CtoChecksTest.Production behavior doesn't change: the only main-code change is
runSteps's visibility. The full suite passes with the same number of tests, and now evaluates deferred checks it used to skip.