Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
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).