MCPcopy
hub / github.com/stretchr/testify / NotRegexp

Method NotRegexp

assert/assertion_forward.go:1373–1378  ·  view source on GitHub ↗

NotRegexp asserts that a specified regexp does not match a string. a.NotRegexp(regexp.MustCompile("starts"), "it's starting") a.NotRegexp("^start", "it's not starting")

(rx interface{}, str interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1371// a.NotRegexp(regexp.MustCompile("starts"), "it's starting")
1372// a.NotRegexp("^start", "it's not starting")
1373func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {
1374 if h, ok := a.t.(tHelper); ok {
1375 h.Helper()
1376 }
1377 return NotRegexp(a.t, rx, str, msgAndArgs...)
1378}
1379
1380// NotRegexpf asserts that a specified regexp does not match a string.
1381//

Callers 1

TestRegexpWrapperFunction · 0.45

Calls 2

NotRegexpFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestRegexpWrapperFunction · 0.36