mirror of
https://github.com/jimeh/go-golden.git
synced 2026-02-19 11:16:47 +00:00
31 lines
520 B
Go
31 lines
520 B
Go
package golden
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
type fakeTestingT struct {
|
|
helper bool
|
|
name string
|
|
logs []string
|
|
fatals []string
|
|
}
|
|
|
|
func (m *fakeTestingT) Helper() {
|
|
m.helper = true
|
|
}
|
|
|
|
func (m *fakeTestingT) Fatalf(format string, args ...interface{}) {
|
|
m.fatals = append(m.fatals, fmt.Sprintf(format, args...))
|
|
runtime.Goexit()
|
|
}
|
|
|
|
func (m *fakeTestingT) Logf(format string, args ...interface{}) {
|
|
m.logs = append(m.logs, fmt.Sprintf(format, args...))
|
|
}
|
|
|
|
func (m *fakeTestingT) Name() string {
|
|
return m.name
|
|
}
|