Fix issues #131 and #132 to get more readable output on failures#133
Open
ijt wants to merge 5 commits intoproper-testing:masterfrom
Open
Fix issues #131 and #132 to get more readable output on failures#133ijt wants to merge 5 commits intoproper-testing:masterfrom
ijt wants to merge 5 commits intoproper-testing:masterfrom
Conversation
This makes it a lot easier to understand what went wrong when a test fails. This fixes proper-testing#131.
This was found by a dialyzer run: https://travis-ci.org/manopapad/proper/jobs/188348558 dialyzer -n -nn --plt .plt/proper_plt -Wunmatched_returns ebin
Instead of testing methods on the erlang module, test proxies for them on ?MODULE so it's easy to replace them with buggy versions and see if the bugs are found. Also the error messages have been improved, comparing what happened to what was meant to happen.
This makes it a bit more challenging for PropEr to find bugs since it has less information to go on, so it makes for a slightly more interesting example. The change made it necessary to change the precondition for get/1 to always return true since we need to be able to get keys that should be undefined to detect if the erase function is no longer working.
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.
#132