Join GitHub today
testing: API should be general purpose #3343
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).