Report failure unless chain has specified state. For httpexpect own tests.
(t testing.TB, result chainResult)
| 474 | // Report failure unless chain has specified state. |
| 475 | // For httpexpect own tests. |
| 476 | func (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. |