(t *testing.T)
| 72 | } |
| 73 | |
| 74 | func TestOptionsIgnoreAnyFunction(t *testing.T) { |
| 75 | cur := stack.Current() |
| 76 | opts := buildOpts(IgnoreAnyFunction("go.uber.org/goleak.(*blockedG).run")) |
| 77 | |
| 78 | for _, s := range stack.All() { |
| 79 | if s.ID() == cur.ID() { |
| 80 | continue |
| 81 | } |
| 82 | |
| 83 | if opts.filter(s) { |
| 84 | continue |
| 85 | } |
| 86 | |
| 87 | t.Errorf("Unexpected goroutine: %v", s) |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func TestOptionsRetry(t *testing.T) { |
| 92 | opts := buildOpts() |