(t *testing.T)
| 54 | } |
| 55 | |
| 56 | func TestTakeWithSkipInnerFunc(t *testing.T) { |
| 57 | var trace string |
| 58 | func() { |
| 59 | trace = Take(2) |
| 60 | }() |
| 61 | lines := strings.Split(trace, "\n") |
| 62 | require.NotEmpty(t, lines, "Expected stacktrace to have at least one frame.") |
| 63 | assert.Contains( |
| 64 | t, |
| 65 | lines[0], |
| 66 | "testing.", |
| 67 | "Expected stacktrace to start with the test function (skipping the test function).", |
| 68 | ) |
| 69 | } |
| 70 | |
| 71 | func TestTakeDeepStack(t *testing.T) { |
| 72 | const ( |