Clean up tests to use assert.New(t)
Review Request #10002 — Created June 6, 2018 and submitted
The documentation for
assert
mentions that you should use
assert.New(t)
when doing more than one assertion, so this patch
updates all our unit tests to this format. Additionally, a helper method
was updated to accepttesting.T
and mark itself as a helper so any
crash or error in it will be reported in the correct test.
Ran
go test ./...
Rango fmt ./...
- Description:
-
~ The documentation for
assert
[1] mentiosn that you should use~ The documentation for
assert
mentiosn that you should useassert.New(t)
when doing more than one assertion, so this patchupdates all our unit tests to this format. Additionally, a helper method was updated to accept testing.T
and mark itself as a helper so anycrash or error in it will be reported in the correct test.
- Description:
-
~ The documentation for
assert
mentiosn that you should use~ The documentation for
assert
mentions that you should useassert.New(t)
when doing more than one assertion, so this patchupdates all our unit tests to this format. Additionally, a helper method was updated to accept testing.T
and mark itself as a helper so anycrash or error in it will be reported in the correct test.
- Commit:
-
8824381d3db52fcc5a6bd6b169af435aae7e6cc43ddbd7dde33394185387363518f9f65bec91b46e
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Depends On:
- Change Summary:
-
Rebase off /r/10006/
- Commit:
-
3ddbd7dde33394185387363518f9f65bec91b46e2b8acd7d124743b321e8a63eee8f8629794e57bf
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.