Add tests
This commit is contained in:
parent
5f6f4dd047
commit
0cc5d27277
2 changed files with 203 additions and 0 deletions
24
faket_test.go
Normal file
24
faket_test.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue