Improved code quality
This commit is contained in:
parent
3ff7ac9a08
commit
acec282709
16 changed files with 128 additions and 69 deletions
19
errors_test.go
Normal file
19
errors_test.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package assert_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// noop implements the Test interface with noop functions so you can test the failure cases.
|
||||
type noop struct{}
|
||||
|
||||
// Errorf does nothing.
|
||||
func (t *noop) Errorf(format string, args ...any) {}
|
||||
|
||||
// FailNow does nothing.
|
||||
func (t *noop) FailNow() {}
|
||||
|
||||
// fail creates a new test that is expected to fail.
|
||||
func fail(t *testing.T) *noop {
|
||||
return &noop{}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue