-
Notifications
You must be signed in to change notification settings - Fork 9
Some state machine test fixes and refactorings #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
ff05138
to
f990599
Compare
f990599
to
3b75198
Compare
mheinzel
approved these changes
Feb 13, 2025
3b75198
to
07b4506
Compare
5 tasks
58737da
to
61657e4
Compare
There are cases where we allow the model and SUT to disagree, for example in the presence of injected disk faults. Previously, this allowed disagreement was encoded in the `Eq Err` instance, but I (Joris) had forgotten that we should actually use the `Eq (Obs h a)` instance for this.
We're not using it, but might be useful in the future. Seemed wasteful to throw it away.
Previously, if `checkForgottenRefs` threw an error, no counterexample output would be produced by the test. Now that is a property, counterexamples are properly printed again.
Changes include: * Add a new `ErrOther` model error. * Define a separate error handler for each specific type of SUT exception. * Create `realErrorHandlers`, the set of error handlers used on the SUT. * Define a new `catchAllErrorHandler`, which matches on `SomeException` and maps it to `ErrOther`. The main intent of this refactoring is to map *all* SUT exceptions to a model `Err`. If a SUT exception is not explicitly caught by specialised error handlers such as `lsmTreeErrorHandler`, then `catchAllErrorHandler` will make sure to catch the exception and map it to the catch-all `ErrOther` value. As a result, we get proper counterexample output, which would not happen if we were to get an uncaught exception in the test.
61657e4
to
3360e72
Compare
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.
No description provided.