MCPcopy Create free account
hub / github.com/stretchr/testify / CommentFormat

Method CommentFormat

_codegen/main.go:288–294  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

286}
287
288func (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
296func (f *testFunc) CommentWithoutT(receiver string) string {
297 search := fmt.Sprintf("assert.%s(t, ", f.DocInfo.Name)

Callers

nothing calls this directly

Calls 1

CommentMethod · 0.95

Tested by

no test coverage detected