MCPcopy Create free account
hub / github.com/coder/slog / TestEqual_error

Function TestEqual_error

sloggers/slogtest/assert/assert_test.go:25–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23}
24
25func TestEqual_error(t *testing.T) {
26 t.Parallel()
27
28 tb := &fakeTB{}
29 assert.Equal(tb, "meow", io.EOF, fmt.Errorf("failed: %w", io.EOF))
30
31 defer func() {
32 recover()
33 simpleassert.Equal(t, "fatals", 1, tb.fatals)
34 }()
35 assert.Equal(tb, "meow", io.ErrClosedPipe, fmt.Errorf("failed: %w", io.EOF))
36}
37
38func TestErrorContains(t *testing.T) {
39 t.Parallel()

Callers

nothing calls this directly

Calls 2

EqualFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected