(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestFrameMarshalText(t *testing.T) { |
| 10 | var tests = []struct { |
| 11 | Frame |
| 12 | want string |
| 13 | }{{ |
| 14 | initpc, |
| 15 | `^github.com/pkg/errors\.init(\.ializers)? .+/github\.com/pkg/errors/stack_test.go:\d+$`, |
| 16 | }, { |
| 17 | 0, |
| 18 | `^unknown$`, |
| 19 | }} |
| 20 | for i, tt := range tests { |
| 21 | got, err := tt.Frame.MarshalText() |
| 22 | if err != nil { |
| 23 | t.Fatal(err) |
| 24 | } |
| 25 | if !regexp.MustCompile(tt.want).Match(got) { |
| 26 | t.Errorf("test %d: MarshalJSON:\n got %q\n want %q", i+1, string(got), tt.want) |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func TestFrameMarshalJSON(t *testing.T) { |
| 32 | var tests = []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…