assert/errors_test.go
Eduard Urbach b3b33f85f5
All checks were successful
/ test (push) Successful in 14s
Updated formatting
2025-06-06 16:49:43 +02:00

19 lines
No EOL
391 B
Go

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{}
}