()
| 286 | } |
| 287 | |
| 288 | func (f *testFunc) CommentFormat() string { |
| 289 | search := fmt.Sprintf("%s", f.DocInfo.Name) |
| 290 | replace := fmt.Sprintf("%sf", f.DocInfo.Name) |
| 291 | comment := strings.Replace(f.Comment(), search, replace, -1) |
| 292 | exp := regexp.MustCompile(replace + `\(((\(\)|[^\n])+)\)`) |
| 293 | return exp.ReplaceAllString(comment, replace+`($1, "error message %s", "formatted")`) |
| 294 | } |
| 295 | |
| 296 | func (f *testFunc) CommentWithoutT(receiver string) string { |
| 297 | search := fmt.Sprintf("assert.%s(t, ", f.DocInfo.Name) |