(t testing.TB, err error, fn string)
| 101 | } |
| 102 | |
| 103 | func wantErr(t testing.TB, err error, fn string) runtime.Frame { |
| 104 | if err == nil { |
| 105 | t.Fatalf("expected err") |
| 106 | } |
| 107 | |
| 108 | f, _, _ := errtrace.UnwrapFrame(err) |
| 109 | if !strings.HasSuffix(f.Function, "."+fn) { |
| 110 | t.Errorf("expected caller to be %v, got %v", fn, f.Function) |
| 111 | } |
| 112 | return f |
| 113 | } |
no test coverage detected