-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add Helper() method in internal mocks and assert.CollectT #1423
base: master
Are you sure you want to change the base?
Conversation
1d5a0dd
to
f79712c
Compare
Add an Helper() method to all mocks in tests of package 'assert'.
Add Helper() method to CollectT like testing.T as we intend to add Helper() to the assert.TestingT interface.
f79712c
to
da99481
Compare
@@ -1874,6 +1874,9 @@ type CollectT struct { | |||
errors []error | |||
} | |||
|
|||
// Helper is like [testing.T.Helper] but does nothing. | |||
func (CollectT) Helper() {} |
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.
Should the newly merged captureTestingT
also get a Helper()
method? (Or, should captureTestingT
be replaced with CollectT
?)
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.
Given this doesn't change the interface I don't want to block progress, so approving.
But I think @craig65535 is right, ideally re-base this and add consolidate the new internal type using one of those approaches.
Summary
Start to extend our definition of
testing.TB
to include itsHelper()
method. See #1422 for details.Changes
Helper()
method on all internal mocks oftesting.T
.Helper()
method on typeassert.CollectT
.Motivation
These are steps 1 and 2 of #1422.