wip: some more drastic refactoring

This commit is contained in:
2024-03-05 02:47:10 +00:00
parent f42dbf9010
commit 9d8db8e5f7
17 changed files with 2897 additions and 1533 deletions

30
testingt_test.go Normal file
View File

@@ -0,0 +1,30 @@
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
}