mirror of https://github.com/golang/go.git
Add Output method
This commit is contained in:
parent
afa16e4906
commit
d8ebbea256
|
|
@ -0,0 +1,3 @@
|
|||
pkg testing, method (*B) Output() io.Writer #59928
|
||||
pkg testing, method (*F) Output() io.Writer #59928
|
||||
pkg testing, method (*T) Output() io.Writer #59928
|
||||
|
|
@ -0,0 +1 @@
|
|||
TODO by Arati.
|
||||
|
|
@ -1069,6 +1069,16 @@ func (c *common) callSite(skip int) string {
|
|||
return fmt.Sprintf("%s:%d: ", file, line)
|
||||
}
|
||||
|
||||
// // Output returns a Writer that writes to the same test output stream as TB.Log.
|
||||
// // The output is indented like TB.Log lines, but Output does not
|
||||
// // add source locations or newlines. The output is internally line
|
||||
// // buffered, and a call to TB.Log or the end of the test will implicitly
|
||||
// // flush the buffer, followed by a newline. After a test function returns,
|
||||
// // neither Output nor the Write method may be called.
|
||||
func (c *common) Output() io.Writer {
|
||||
return c.o
|
||||
}
|
||||
|
||||
// setOutputWriter initializes an outputWriter and sets it as a common field.
|
||||
func (c *common) setOutputWriter() {
|
||||
c.o = &outputWriter{c: c}
|
||||
|
|
|
|||
Loading…
Reference in New Issue