mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
... changes
R=golang-dev, gri CC=golang-dev https://golang.org/cl/2273042
This commit is contained in:
parent
75dd8fdb34
commit
2ee420fa5e
29 changed files with 62 additions and 62 deletions
|
|
@ -89,35 +89,35 @@ func (t *T) FailNow() {
|
|||
|
||||
// Log formats its arguments using default formatting, analogous to Print(),
|
||||
// and records the text in the error log.
|
||||
func (t *T) Log(args ...interface{}) { t.errors += "\t" + tabify(fmt.Sprintln(args)) }
|
||||
func (t *T) Log(args ...interface{}) { t.errors += "\t" + tabify(fmt.Sprintln(args...)) }
|
||||
|
||||
// Log formats its arguments according to the format, analogous to Printf(),
|
||||
// and records the text in the error log.
|
||||
func (t *T) Logf(format string, args ...interface{}) {
|
||||
t.errors += "\t" + tabify(fmt.Sprintf(format, args))
|
||||
t.errors += "\t" + tabify(fmt.Sprintf(format, args...))
|
||||
}
|
||||
|
||||
// Error is equivalent to Log() followed by Fail().
|
||||
func (t *T) Error(args ...interface{}) {
|
||||
t.Log(args)
|
||||
t.Log(args...)
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
// Errorf is equivalent to Logf() followed by Fail().
|
||||
func (t *T) Errorf(format string, args ...interface{}) {
|
||||
t.Logf(format, args)
|
||||
t.Logf(format, args...)
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
// Fatal is equivalent to Log() followed by FailNow().
|
||||
func (t *T) Fatal(args ...interface{}) {
|
||||
t.Log(args)
|
||||
t.Log(args...)
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
// Fatalf is equivalent to Logf() followed by FailNow().
|
||||
func (t *T) Fatalf(format string, args ...interface{}) {
|
||||
t.Logf(format, args)
|
||||
t.Logf(format, args...)
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue