-
Notifications
You must be signed in to change notification settings - Fork 30
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
Added PropertyConfig #288
Merged
Merged
Added PropertyConfig #288
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1ad0e77
Added maxShrinks
dharmaturtle 3682c89
Added PropertyConfig
dharmaturtle 8728de9
More printing
dharmaturtle 50fec41
Added PropertyConfigExtensions and some more overloads
dharmaturtle b62f044
TestCount => TestLimit
dharmaturtle d884214
Merge remote-tracking branch 'origin/master' into maxShrinks
dharmaturtle c79d9e8
Fixing conflicts
dharmaturtle a812d97
DefaultConfig => Default
dharmaturtle 64fbbbd
Added withoutShrinkLimit
dharmaturtle 01bfc41
dropped the word 'Limit'
dharmaturtle 21b8eed
tests => testLimit in parameter name
dharmaturtle 432e3ca
Deleting <tests> and <shrinks> overloads
dharmaturtle ca67429
Added optional Config overloads to LINQ
dharmaturtle 0f9ca6e
Remove redundant space
moodmosaic a98b154
Wrap documentation at 80 characters width
moodmosaic afdd43a
Add missing references to Script.fsx
moodmosaic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that
shrinkLimit
is not anOption
. This means that they can't set the value toNone
. This makes for slightly cleaner usage (PropertyConfig.withShrinkLimit 0
vsPropertyConfig.withShrinkLimit (Some 0)
) but I don't feel strongly about it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since calling this function is an explicit choice a user would make, I'm fine with the parameter being a simple
int<shrinks>
. Making the parameter anOption<int<shrinks>>
exposes how we've chosen to implement this a bit too much. Also, if we later decided to make this required, this could be very confusing. Consider this code:PC.defaultConfig |> PC.withShrinkLimit None
If we decided to require that parameter, it would be very surprising when a test failed due to a shrink limit being imposed when the user explicitly chose
None
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add to the API
withoutShrinkLimit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I was torn between that and
withNoShrinkLimit
, but my libarts sisters talked me out of it.Inspired by Haskell, I dropped "Limit" from
withShrinkLimit
andwithTestLimit
, but kept "limit" in the parameter name.