MCPcopy Index your code
hub / github.com/coder/slog / Success

Function Success

internal/assert/assert.go:30–35  ·  view source on GitHub ↗

Success asserts err == nil.

(t testing.TB, name string, err error)

Source from the content-addressed store, hash-verified

28
29// Success asserts err == nil.
30func Success(t testing.TB, name string, err error) {
31 t.Helper()
32 if err != nil {
33 t.Fatalf("unexpected error for %v: %+v", name, err)
34 }
35}
36
37// Error asserts exp != nil.
38func Error(t testing.TB, name string, err error) {

Callers 5

TestStdlibFunction · 0.92
indentJSONFunction · 0.92
marshalJSONFunction · 0.92
TestMakeFunction · 0.92

Calls 1

HelperMethod · 0.45

Tested by 5

TestStdlibFunction · 0.74
indentJSONFunction · 0.74
marshalJSONFunction · 0.74
TestMakeFunction · 0.74