-
Notifications
You must be signed in to change notification settings - Fork 1.7k
assert.InEpsilonSlice: include msgAndArgs on failed assertion #1454
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
base: master
Are you sure you want to change the base?
assert.InEpsilonSlice: include msgAndArgs on failed assertion #1454
Conversation
dolmen
left a comment
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.
We also need a regression test.
I expect that the test will also be a good base for further improvement (in separate PRs) in reporting errors such as the index of the mismatch.
|
Hi @dolmen, thank you for the quick review!
Can you provide more details about which regression tests you are referring to in the |
|
Related: #1231 (also about |
The test that you didn't write! We need to augment |
a2665e8 to
2be4cff
Compare
|
This blocked by #1483 that must be merged first. |
assert/assertions_test.go
Outdated
|
|
||
| False(t, InEpsilonSlice(mockT, "", nil, 1), "Expected non numeral slices to fail") | ||
|
|
||
| inEpsilonSliceMockT := new(mockTestingT) |
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.
Rename the variable to mockT for consistency.
|
Just ran into this bug, can this PR be picked back up since #1483 is merged? |
|
The merge conflicts are small, but I'm hesitant to touch them since I'm not in this codebase much any more. |
|
I can rebase and fix this. |
870ea86 to
d810081
Compare
|
It's done, if someone can review and tell me |
d810081 to
394bd1f
Compare
Summary
Added the
msgAndArgsparameter to theInEpsilonfunction for better error reporting in case of failed assertion.Related issues
Closes #1324