Skip to content
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

New TestWriter for logging to testing.TB #369

Merged
merged 4 commits into from Oct 4, 2021
Merged

New TestWriter for logging to testing.TB #369

merged 4 commits into from Oct 4, 2021

Conversation

emcfarlane
Copy link
Contributor

@emcfarlane emcfarlane commented Sep 30, 2021

Implements a writer to wrap testing.TB for help in testing, #368.

The go testing log injects the callers filename and line number, which is incorrect for deeply nested functions. To get around this we allow to specify the frame depth and rewrite it. Not necessary but makes it pretty. Added an option for the ConsoleWriter to set the correct frame (although it's brittle to rewrites, not sure how to test better).

Implements a writer to wrap testing.TB for help in testing.
writer.go Outdated Show resolved Hide resolved
writer.go Show resolved Hide resolved
writer.go Outdated Show resolved Hide resolved
writer.go Outdated Show resolved Hide resolved
@rs rs merged commit 78448ee into rs:master Oct 4, 2021
4 checks passed
@emcfarlane emcfarlane deleted the zerotest branch Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants