MCPcopy
hub / github.com/uber-go/zap / TestTake

Function TestTake

internal/stacktrace/stack_test.go:32–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30)
31
32func TestTake(t *testing.T) {
33 trace := Take(0)
34 lines := strings.Split(trace, "\n")
35 require.NotEmpty(t, lines, "Expected stacktrace to have at least one frame.")
36 assert.Contains(
37 t,
38 lines[0],
39 "go.uber.org/zap/internal/stacktrace.TestTake",
40 "Expected stacktrace to start with the test.",
41 )
42}
43
44func TestTakeWithSkip(t *testing.T) {
45 trace := Take(1)

Callers

nothing calls this directly

Calls 1

TakeFunction · 0.85

Tested by

no test coverage detected