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

testing: API should be general purpose #3343

Closed
gopherbot opened this issue Mar 18, 2012 · 6 comments
Closed

testing: API should be general purpose #3343

gopherbot opened this issue Mar 18, 2012 · 6 comments

Comments

@gopherbot
Copy link

by nickdsnyder:

The testing package currently provides an API that is only useful to gotest, but it
would be nice if the API were made more general so that tests could be easily run from
any Go code.

Specifically, the test runners (RunTests, RunExamples, RunBenchmarks) just write output
to os.Stderr.

An easy improvement would be to add a io.Writer parameter to write output to.

Even better would be to define a test result structure and return a slice of test
results (one per test run).
@dsymonds
Copy link
Contributor

Comment 1:

Labels changed: added priority-later, packagechange, removed priority-triage.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 2:

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 3:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added repo-main.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@ysmolski
Copy link
Member

ysmolski commented Nov 1, 2018

Those functions are still exported because of cross-package usage, but they are part of "go test" implementation. I do not think that we ever will add this functionality.

@ysmolski ysmolski closed this as completed Nov 1, 2018
@golang golang locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants