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

Function Len

internal/assert/assert.go:58–64  ·  view source on GitHub ↗

Len asserts n == len(a).

(t testing.TB, name string, n int, a interface{})

Source from the content-addressed store, hash-verified

56
57// Len asserts n == len(a).
58func Len(t testing.TB, name string, n int, a interface{}) {
59 t.Helper()
60 act := reflect.ValueOf(a).Len()
61 if n != act {
62 t.Fatalf("expected len(%v) == %v but got %v", name, n, act)
63 }
64}

Callers 3

TestLoggerFunction · 0.92
TestSkipCleanupFunction · 0.92
TestUnmarshalableFunction · 0.92

Calls 1

HelperMethod · 0.45

Tested by 3

TestLoggerFunction · 0.74
TestSkipCleanupFunction · 0.74
TestUnmarshalableFunction · 0.74