Add property tests to resistor-color-duo (remake)#928
Merged
sshine merged 3 commits intoexercism:masterfrom Nov 15, 2020
sshine:resistor-duo-property-tests
Merged
Add property tests to resistor-color-duo (remake)#928sshine merged 3 commits intoexercism:masterfrom sshine:resistor-duo-property-tests
sshine merged 3 commits intoexercism:masterfrom
sshine:resistor-duo-property-tests
Conversation
Contributor
Author
|
@tejasbubane: Would you care to review these changes? I'd like to get your work pushed out. |
- Invalid local file link - Remove reference to Hedgehog here - Small modifications to phrasings - Simplified list of suggested properties - Use `-` for bullets instead of `*` - Small modifications to Test.QuickCheck imports - Changed `context` back to `describe` for conformity - derive `Enum` and `Bounded` for `colorGen` - Use `forAll` instead of `Arbitrary`
tejasbubane
approved these changes
Nov 14, 2020
Member
petertseng
approved these changes
Nov 14, 2020
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.
This PR resumes the work of and closes #907.
#907 appears to not have "Allow edits by maintainers" enabled, so I cannot push any changes there.
The only difference that is not already discussed in the feedback of #907 is that
instance Arbitrary Colorwas replaced withforAll colorGen. This removes the need for suppressing orphan instances and is generally a better way to express the relationship between properties and particular generators. For more background on this choice, read the parts of the FPComplete article QuickCheck, Hedgehog, Validity that isn't about shrinking.This PR could be squash-merged since my commit message is a bit meta.
The important part is addressing the actual change of #907.