(t *testing.T)
| 30 | ) |
| 31 | |
| 32 | func 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 | |
| 44 | func TestTakeWithSkip(t *testing.T) { |
| 45 | trace := Take(1) |