49
50 if !strings.Contains(res, "Cognitive") {
51▶ t.Errorf("wide cognitive output missing Cognitive header:\n%s", res)
52 }
53 // language total and grand total are both 11 + 20 = 31
· · ·
54 if !strings.Contains(res, "31") {
55▶ t.Errorf("wide cognitive output missing summed cognitive 31:\n%s", res)
56 }
57}
· · ·
64
65 if strings.Contains(res, "Cognitive") {
66▶ t.Errorf("wide output leaked Cognitive column while disabled:\n%s", res)
67 }
68 // Break lines must stay at the original 109-rune width when disabled.
· · ·
69 for _, line := range strings.Split(res, "\n") {
70 if strings.HasPrefix(line, "─") && len([]rune(line)) != 109 {
71▶ t.Errorf("disabled wide break width changed: got %d want 109", len([]rune(line)))
72 }
73 }
· · ·
85
86 if !strings.Contains(res, "Complexity") {
87▶ t.Errorf("short view lost the Complexity header:\n%s", res)
88 }
89 if strings.Contains(res, "Cognitive") {
+ 18 more matches in this file