|
@@ -631,6 +631,7 @@ func TestMerge(t *testing.T) {
|
631
|
631
|
// location should add up to 0).
|
632
|
632
|
|
633
|
633
|
prof := testProfile1.Copy()
|
|
634
|
+ prof.Comments = []string{"comment1"}
|
634
|
635
|
p1, err := Merge([]*Profile{prof, prof})
|
635
|
636
|
if err != nil {
|
636
|
637
|
t.Errorf("merge error: %v", err)
|
|
@@ -640,6 +641,9 @@ func TestMerge(t *testing.T) {
|
640
|
641
|
if err != nil {
|
641
|
642
|
t.Errorf("merge error: %v", err)
|
642
|
643
|
}
|
|
644
|
+ if got, want := len(prof.Comments), 1; got != want {
|
|
645
|
+ t.Errorf("len(prof.Comments) = %d, want %d", got, want)
|
|
646
|
+ }
|
643
|
647
|
|
644
|
648
|
// Use aggregation to merge locations at function granularity.
|
645
|
649
|
if err := prof.Aggregate(false, true, false, false, false); err != nil {
|