-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor: rename *test.Test*
identifiers
#3260
Conversation
587ef74
to
34d284a
Compare
// TestState is an alias for State because ava-labs/coreth uses the original | ||
// identifier and this change would otherwise break the build. | ||
// | ||
// Deprecated: use [State]. |
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.
so there will be a subsequent coreth PR to clean it up, right?
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.
If I remember. Otherwise this will become lost to the sands of time. But at least nobody else will use 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.
Why this should be merged
Because Stephen said so. Also https://google.github.io/styleguide/go/decisions#repetition but mainly the former.
How this works
Test*(*testing.T...
prefix, in keeping with stdlib fstest, iotest, and slogtest. This signals at the call site that a test is actually being performed. Similarly forBenchmark
andFuzz
.Test
prefix/suffix elided because they are always referred to by their package-qualified name*test.Thing
.tb.Helper()
is not added toTest*
andBenchmark*
functions as this would report the call site as being in the package under test, which isn't useful in debugging.([context.Context], testing.TB, ...)
because pedantry.require.Assertions
are changed to accepttesting.TB
asrequire
is an implementation detail.t.Run()
. A failure in one causing others to not run results in whack-a-mole debugging. This may not be comprehensive.All
*test
packages were checked for conformity with the above. Those that have no changes were already compliant.How this was tested
CI