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

Method Regexpf

assert/assertion_forward.go:1526–1531  ·  view source on GitHub ↗

Regexpf asserts that a specified regexp matches a string. a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") a.Regexpf("start...$", "it's not starting", "error message %s", "formatted")

(rx interface{}, str interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

1524// a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted")
1525// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted")
1526func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool {
1527 if h, ok := a.t.(tHelper); ok {
1528 h.Helper()
1529 }
1530 return Regexpf(a.t, rx, str, msg, args...)
1531}
1532
1533// Same asserts that two pointers reference the same object.
1534//

Callers

nothing calls this directly

Calls 2

RegexpfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected