assert/faket_test.go

24 lines
305 B
Go
Raw Normal View History

2020-05-12 18:01:11 +02:00
package assert
type fakeT struct {
gotError bool
}
func newFakeT() (*fakeT, Assert) {
var ft fakeT
return &ft, New(&ft)
}
func (t *fakeT) Error(_ ...interface{}) {
t.gotError = true
}
2020-06-12 16:27:05 +02:00
func (_ *fakeT) Helper() {}
2020-05-12 18:01:11 +02:00
func (t *fakeT) GotError() bool {
r := t.gotError
t.gotError = false
return r
}