(t *testing.T)
| 581 | } |
| 582 | |
| 583 | func TestDocURLInLabels(t *testing.T) { |
| 584 | const url = "http://example.com/pprof-help" |
| 585 | profile := testProfile.Copy() |
| 586 | profile.DocURL = url |
| 587 | rpt := New(profile, &Options{ |
| 588 | OutputFormat: Text, |
| 589 | Symbol: regexp.MustCompile(`.`), |
| 590 | TrimPath: "/some/path", |
| 591 | SampleValue: func(v []int64) int64 { return v[1] }, |
| 592 | SampleUnit: testProfile.SampleType[1].Unit, |
| 593 | }) |
| 594 | |
| 595 | labels := fmt.Sprintf("%v", ProfileLabels(rpt)) |
| 596 | if !strings.Contains(labels, url) { |
| 597 | t.Errorf("expected URL %q not found in %s", url, labels) |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | func TestProfileLabels(t *testing.T) { |
| 602 | // Force the local timezone to UTC for the duration of this function to get a |
nothing calls this directly
no test coverage detected
searching dependent graphs…