Add tests

This commit is contained in:
Nise Void 2020-05-12 18:01:11 +02:00
parent 5f6f4dd047
commit 0cc5d27277
Signed by: NiseVoid
GPG key ID: FBA14AC83EA602F3
2 changed files with 203 additions and 0 deletions

24
faket_test.go Normal file
View file

@ -0,0 +1,24 @@
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
}
func (_ *fakeT) Helper() {}
func (_ *fakeT) Cleanup(_ func()) {}
func (t *fakeT) GotError() bool {
r := t.gotError
t.gotError = false
return r
}