-
Notifications
You must be signed in to change notification settings - Fork 8
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
len: support len-len and value-len cases #204
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2f67c38
expected-actual: support len
Antonboom b1201e3
len: support len-len and value-len cases
Antonboom 1d666af
len: add disclaimer about not-len-first assetions
Antonboom 03ade38
len: add TestLenInterface as a proof
Antonboom e2e1092
len: support []byte/string/raw.Message type conversions
Antonboom 1bf6ee1
len: empty: add TestBytesReadability
Antonboom 2869872
Revert "len: support []byte/string/raw.Message type conversions"
Antonboom bd361af
debug: fix typo
Antonboom 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
len: add disclaimer about not-len-first assetions
- Loading branch information
commit 1d666af3dc3c74c17999df6bbdee40a38fba2064
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,10 @@ import ( | |
// assert.Len(t, arr, 42) | ||
// assert.Len(t, arr, value) | ||
// assert.Len(t, arr, len(expArr)) | ||
// | ||
// The checker ignores assertions in which length checking is not a priority, e.g | ||
// | ||
// assert.Equal(t, len(arr), value) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the link here too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would add it in the code, but I'm unsure about the exact line |
||
type Len struct{} | ||
|
||
// NewLen constructs Len checker. | ||
|
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.
Maybe a link to the issue where the reason are provided could help people to understand it's normal, and it would be a bad thing to change
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.
This link would be the best I think
#167 (comment)