assert.InEpsilonSlice: include msgAndArgs on failed assertion#1454
assert.InEpsilonSlice: include msgAndArgs on failed assertion#1454VladPetriv wants to merge 5 commits intostretchr:masterfrom
Conversation
dolmen
left a comment
There was a problem hiding this comment.
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.
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