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

Method assert

chain.go:476–489  ·  view source on GitHub ↗

Report failure unless chain has specified state. For httpexpect own tests.

(t testing.TB, result chainResult)

Source from the content-addressed store, hash-verified

474// Report failure unless chain has specified state.
475// For httpexpect own tests.
476func (c *chain) assert(t testing.TB, result chainResult) {
477 c.mu.Lock()
478 defer c.mu.Unlock()
479
480 switch result {
481 case success:
482 assert.Equal(t, chainFlags(0), c.flags&flagFailed,
483 "expected: chain is in success state")
484
485 case failure:
486 assert.NotEqual(t, chainFlags(0), c.flags&flagFailed,
487 "expected: chain is in failure state")
488 }
489}
490
491// Report failure unless chain has specified flags.
492// For httpexpect own tests.

Callers 15

TestDuration_FailedChainFunction · 0.80
TestDuration_RawFunction · 0.80
TestDuration_IsEqualFunction · 0.80
TestDuration_IsGreaterFunction · 0.80
TestDuration_IsLesserFunction · 0.80
TestDuration_InRangeFunction · 0.80
TestDuration_InListFunction · 0.80
TestCanon_NumberFunction · 0.80
TestCannon_ArrayFunction · 0.80
TestCanon_MapFunction · 0.80
TestCannon_DecodeFunction · 0.80

Calls 5

chainFlagsTypeAlias · 0.85
LockMethod · 0.80
UnlockMethod · 0.80
EqualMethod · 0.45
NotEqualMethod · 0.45

Tested by 15

TestDuration_FailedChainFunction · 0.64
TestDuration_RawFunction · 0.64
TestDuration_IsEqualFunction · 0.64
TestDuration_IsGreaterFunction · 0.64
TestDuration_IsLesserFunction · 0.64
TestDuration_InRangeFunction · 0.64
TestDuration_InListFunction · 0.64
TestCanon_NumberFunction · 0.64
TestCannon_ArrayFunction · 0.64
TestCanon_MapFunction · 0.64
TestCannon_DecodeFunction · 0.64