MCPcopy Index your code
hub / github.com/gavv/httpexpect / NotEqualFold

Method NotEqualFold

string.go:284–304  ·  view source on GitHub ↗

NotEqualFold succeeds if string is not equal to given Go string after applying Unicode case-folding (so it's a case-insensitive match). Example: str := NewString(t, "Hello") str.NotEqualFold("gOODBYe")

(value string)

Source from the content-addressed store, hash-verified

282// str := NewString(t, "Hello")
283// str.NotEqualFold("gOODBYe")
284func (s *String) NotEqualFold(value string) *String {
285 opChain := s.chain.enter("NotEqualFold()")
286 defer opChain.leave()
287
288 if opChain.failed() {
289 return s
290 }
291
292 if strings.EqualFold(s.value, value) {
293 opChain.fail(AssertionFailure{
294 Type: AssertNotEqual,
295 Actual: &AssertionValue{s.value},
296 Expected: &AssertionValue{value},
297 Errors: []error{
298 errors.New("expected: strings are non-equal (if folded)"),
299 },
300 })
301 }
302
303 return s
304}
305
306// Deprecated: use IsEqualFold instead.
307func (s *String) EqualFold(value string) *String {

Callers 2

TestString_FailedChainFunction · 0.80
TestString_IsEqualFunction · 0.80

Calls 5

enterMethod · 0.80
leaveMethod · 0.80
failedMethod · 0.80
EqualFoldMethod · 0.80
failMethod · 0.80

Tested by 2

TestString_FailedChainFunction · 0.64
TestString_IsEqualFunction · 0.64