(t *testing.T, comments []parsedComment)
| 114 | } |
| 115 | |
| 116 | func normalizeParsedComments(t *testing.T, comments []parsedComment) []parsedComment { |
| 117 | t.Helper() |
| 118 | |
| 119 | prefix := 0x1234567 |
| 120 | date, err := time.Parse(gitDateFormat, "Fri Aug 19 07:00:00 2022 +1900") |
| 121 | require.NoError(t, err) |
| 122 | |
| 123 | var out []parsedComment |
| 124 | |
| 125 | for i, comment := range comments { |
| 126 | comment.id = fmt.Sprintf("%7x", prefix+i) |
| 127 | comment.date = date.Add(time.Duration(i) * time.Minute) |
| 128 | out = append(out, comment) |
| 129 | } |
| 130 | |
| 131 | return out |
| 132 | } |
| 133 | |
| 134 | func requireCommentsEqual(t *testing.T, golden string, env *execenv.Env) { |
| 135 | t.Helper() |
no test coverage detected